shish 5 yıl önce
ebeveyn
işleme
cb07a66c5b
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      app-ghs/controllers/ProductController.php

+ 2 - 2
app-ghs/controllers/ProductController.php

@@ -256,10 +256,10 @@ class ProductController extends BaseController
         if (empty($data) || empty($type)) {
         if (empty($data) || empty($type)) {
             util::fail("参数错误");
             util::fail("参数错误");
         }
         }
-        if (in_array($type, ['inTurn', 'addPrice', 'cost', 'weight', 'ratio', 'status', 'ratio', 'price', 'stockWarning', 'shelfLife'])) {
+        if (in_array($type, ['inTurn', 'addPrice', 'cost', 'weight', 'ratio', 'ratio', 'price', 'stockWarning', 'shelfLife'])) {
             $data = json_decode($data, true);
             $data = json_decode($data, true);
         } else {
         } else {
-            util::fail('不允许的类型');
+            util::fail('非法操作');
         }
         }
         foreach ($data as $v) {
         foreach ($data as $v) {
             if ($type == 'status') {
             if ($type == 'status') {