diff --git a/application/common.php b/application/common.php index 3e8c2c920..9b6807d19 100755 --- a/application/common.php +++ b/application/common.php @@ -2086,20 +2086,23 @@ function ParamsChecked($data, $params) } if(empty($data[$v['key_name']])) { - return $v['error_msg']; + return str_replace('{$var}', 'unique验证', $v['error_msg']); } $temp = db($v['checked_data'])->where([$v['key_name']=>$data[$v['key_name']]])->find(); if(!empty($temp)) { + // 错误数据变量替换 + $error_msg = str_replace('{$var}', $data[$v['key_name']], $v['error_msg']); + // 是否需要排除当前操作数据 if(isset($v['checked_key'])) { if(empty($data[$v['checked_key']]) || (isset($temp[$v['checked_key']]) && $temp[$v['checked_key']] != $data[$v['checked_key']])) { - return str_replace('{$var}', $data[$v['key_name']], $v['error_msg']); + return $error_msg; } } else { - return $v['error_msg']; + return $error_msg; } } break; diff --git a/application/index/controller/Goods.php b/application/index/controller/Goods.php index c1feda17d..87ae9185b 100755 --- a/application/index/controller/Goods.php +++ b/application/index/controller/Goods.php @@ -56,6 +56,7 @@ class Goods extends Common ], 'is_photo' => true, 'is_spec' => true, + 'is_params' => true, ]; $ret = GoodsService::GoodsList($params); if(empty($ret['data'][0]) || $ret['data'][0]['is_delete_time'] != 0) diff --git a/application/index/view/default/goods/index.html b/application/index/view/default/goods/index.html index 497a1322f..66e0d5dbc 100755 --- a/application/index/view/default/goods/index.html +++ b/application/index/view/default/goods/index.html @@ -226,7 +226,7 @@ {{/if}} - + + {{if !empty($goods['parameters']) and !empty($goods['parameters']['base'])}} + + + {{/if}} + {{if $goods['is_shelves'] == 1 and $goods['inventory'] gt 0}}
@@ -257,7 +269,7 @@
-