shish hace 5 años
padre
commit
2f3f617536
Se han modificado 1 ficheros con 6 adiciones y 3 borrados
  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
     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);
     }