diff --git a/application/common.php b/application/common.php index 3e8c2c9202a6dc7b3cb4e57d296ca1b846d1add3..9b6807d192eb22b90c58b0db559f25958b80410c 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 c1feda17d1163acde776549eb9831a31d9d73384..87ae9185b7a650d4ceb3f0dd2d5dd49adaa4722e 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 497a1322fdb51e50642cb8949348e84605ad5f25..66e0d5dbc12d64c523bb058fadac7e6f77a0ff48 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 @@
-