shish 1 ano atrás
pai
commit
6773e1ae89
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      app-ghs/controllers/CustomController.php

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

@@ -807,7 +807,12 @@ class CustomController extends BaseController
         $home = isset($get['home']) ? $get['home'] : 0;
         $customId = !empty($get['customId']) ?? 0;
         $custom = CustomClass::getById($customId, true);
-        CustomClass::valid($custom, $this->shopId);
+        if (empty($custom)) {
+            util::fail('没有找到客户呢');
+        }
+        if ($custom->shopId != $this->shopId) {
+            util::fail('不是你的客户');
+        }
         $ghsId = $custom->ghsId ?? 0;
         $ghs = GhsClass::getById($ghsId, true);
         if (empty($ghs)) {