소스 검색

标准会员

shish 4 년 전
부모
커밋
7346473de0
1개의 변경된 파일4개의 추가작업 그리고 9개의 파일을 삭제
  1. 4 9
      app-ghs/controllers/CustomLevelController.php

+ 4 - 9
app-ghs/controllers/CustomLevelController.php

@@ -39,23 +39,18 @@ class CustomLevelController extends BaseController
         if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
             util::fail('管理员才能操作');
         }
-
         $post = Yii::$app->request->post();
         $info = CustomLevelClass::getByCondition(['shopId' => $this->shopId], true);
         if (empty($info)) {
             util::fail('出错了');
         }
         $id = $info->id ?? 0;
-        $qtNum = $post['qtNum'] ?? 0;
-        if (is_numeric($qtNum) == false || $qtNum <= 0) {
-            util::fail('青铜等级的数量要大于0');
-        }
-        $byNum = $post['byNum'] ?? 0;
-        if ($byNum <= $qtNum) {
-            util::fail('白银等级的数量要大于青铜');
+        $num = $post['num'] ?? 0;
+        if (is_numeric($num) == false || $num <= 0) {
+            util::fail('标准会员的数量要大于0');
         }
         $hjNum = $post['hjNum'] ?? 0;
-        if ($hjNum <= $byNum) {
+        if ($hjNum <= $num) {
             util::fail('黄金等级的数量要大于白银');
         }
         $zsNum = $post['zsNum'] ?? 0;