shish пре 3 година
родитељ
комит
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;
         $id = $get['id'] ?? 0;
         $isHd = $get['isHd'] ?? 1;
         $isHd = $get['isHd'] ?? 1;
         $custom = CustomClass::getById($id, true);
         $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;
         $ghsId = $custom->ghsId ?? 0;
         $ghs = GhsClass::getById($ghsId, true);
         $ghs = GhsClass::getById($ghsId, true);