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

+ 5 - 2
app-ghs/controllers/CustomController.php

@@ -30,8 +30,11 @@ class CustomController extends BaseController
         $id = $get['id'] ?? 0;
         $isHd = $get['isHd'] ?? 1;
         $custom = CustomClass::getById($id, true);
-        if (empty($custom) || $custom->ownMainId != $this->mainId) {
-            util::fail('修改失败');
+        if (empty($custom)) {
+            util::fail('没有找到客户');
+        }
+        if ($custom->ownMainId != $this->mainId) {
+            util::fail('没有权限');
         }
         $ghsId = $custom->ghsId ?? 0;
         $ghs = GhsClass::getById($ghsId, true);