shish %!s(int64=4) %!d(string=hai) anos
pai
achega
cd433bc651
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      app-ghs/controllers/ProductController.php

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

@@ -353,14 +353,18 @@ class ProductController extends BaseController
             //修改售价 shish 20210703
             if ($type == 'price') {
                 $product = ProductClass::getLockById($id);
+                $currentName = $product->name ?? '';
                 if (empty($product)) {
                     continue;
                 }
                 if ($product->shopId != $this->shopId) {
                     util::fail("不是您的产品");
                 }
-                if (empty($val) || is_numeric($val) == false) {
-                    util::fail("请填写价格");
+                if (empty($val)) {
+                    util::fail("没有填写价格:" . $currentName);
+                }
+                if (is_numeric($val) == false) {
+                    util::fail("价格不是数值:" . $currentName);
                 }
                 $currentItemId = $product->itemId ?? 0;
                 if (empty($currentItemId)) {