shish 4 лет назад
Родитель
Сommit
3db18faba0

+ 1 - 1
app-ghs/controllers/CustomController.php

@@ -270,7 +270,7 @@ class CustomController extends BaseController
 
         $get = Yii::$app->request->get();
         $customId = $get['customId'] ?? 0;
-        $level = $get['level'] ?? 0;
+        $level = $get['level'] ?? 1;
         $custom = CustomClass::getById($customId, true);
         CustomClass::valid($custom, $this->shopId);
         $custom->level = $level;

+ 2 - 2
app-ghs/controllers/ProductController.php

@@ -62,10 +62,10 @@ class ProductController extends BaseController
 
         //客户等级
         $customId = Yii::$app->request->get('customId', 0);
-        $level = 0;
+        $level = 1;
         if (!empty($customId)) {
             $custom = CustomClass::getById($customId, true);
-            $level = $custom->level ?? 0;
+            $level = $custom->level ?? 1;
         }
 
         $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");

+ 1 - 1
app-hd/controllers/OrderController.php

@@ -165,7 +165,7 @@ class OrderController extends BaseController
             }
             $currentPrice = $post['packingFee'] ?? 0; //包装费
             $orderProduct = [];
-            $level = 0;
+            $level = 1;
             $productInfo = ProductClass::formatProductInfo($product, $level);
             $currentPrice = bcadd($currentPrice, $productInfo['price'], 2);
             $sendCost = isset($post['sendCost']) && is_numeric($post['sendCost']) ? $post['sendCost'] : 0;

+ 1 - 1
biz-ghs/custom/classes/CustomClass.php

@@ -98,7 +98,7 @@ class CustomClass extends BaseClass
             $list[$key]['avatar'] = $avatar;
             $list[$key]['shortAvatar'] = $currentInfo['shortLogoUrl'];
             $list[$key]['sn'] = $val['id'];
-            $level = $val['level'] ?? 0;
+            $level = $val['level'] ?? 1;
             $levelName = $levelMap[$level] ?? '';
             $list[$key]['levelName'] = $levelName;
         }

+ 1 - 1
biz-ghs/product/classes/ProductClass.php

@@ -92,7 +92,7 @@ class ProductClass extends BaseClass
         if (empty($info)) {
             return $info;
         }
-        $level = $ghs->giveLevel ?? 0;
+        $level = $ghs->giveLevel ?? 1;
         $list = self::groupProductInfo([$info], $level);
         return current($list);
     }