|
|
@@ -53,7 +53,9 @@ class StoreProductAttr extends BaseModel
|
|
|
}
|
|
|
$attrCount = count($attrList);
|
|
|
foreach ($valueList as $index => $value) {
|
|
|
- if (!isset($value['detail']) || count($value['detail']) != $attrCount) return self::setErrorInfo('请填写正确的商品信息');
|
|
|
+ if (!isset($value['detail']) || count($value['detail']) != $attrCount) {
|
|
|
+ return self::setErrorInfo('请填写正确的商品信息');
|
|
|
+ }
|
|
|
if (!isset($value['price']) || !is_numeric($value['price']) || floatval($value['price']) != $value['price'])
|
|
|
return self::setErrorInfo('请填写正确的商品价格');
|
|
|
if (!isset($value['stock']) || !is_numeric($value['stock']) || intval($value['stock']) != $value['stock'])
|