shish 5 лет назад
Родитель
Сommit
2f3f617536
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      app-mall/controllers/CustomController.php

+ 6 - 3
app-mall/controllers/CustomController.php

@@ -14,9 +14,12 @@ class CustomController extends BaseController
     //生成客户信息 shish 2021.5.1
     //生成客户信息 shish 2021.5.1
     public function actionInitCustom()
     public function actionInitCustom()
     {
     {
-        $custom = CustomClass::replaceCustom($this->sjId, $this->user, $this->shopId);
-        if (empty($custom)) {
-            util::fail('没有找到客户信息');
+        $custom = [];
+        if(!empty($this->shopId)){
+            $custom = CustomClass::replaceCustom($this->sjId, $this->user, $this->shopId);
+            if (empty($custom)) {
+                util::fail('没有找到客户信息');
+            }
         }
         }
         util::success($custom);
         util::success($custom);
     }
     }