Skip to content

Commit 1e6ceab

Browse files
YunaiVgitee-org
authored andcommitted
!343 ✨ 优化:商品库存为0时,商品列表商品封面显示已售罄,商品详情页用户无法下单
Merge pull request !343 from 奕泽云/master
2 parents ee96675 + dee8215 commit 1e6ceab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"editor.defaultFormatter": "esbenp.prettier-vscode"
8484
},
8585
"editor.codeActionsOnSave": {
86-
"source.fixAll.eslint": true
86+
"source.fixAll.eslint": "explicit"
8787
},
8888
"[vue]": {
8989
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"

src/views/mall/product/spu/form/BasicInfoForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ defineOptions({ name: 'ProductSpuBasicInfoForm' })
197197
const ruleConfig: RuleConfig[] = [
198198
{
199199
name: 'stock',
200-
rule: (arg) => arg >= 1,
200+
rule: (arg) => arg >= 0,
201201
message: '商品库存必须大于等于 1 !!!'
202202
},
203203
{
@@ -213,7 +213,7 @@ const ruleConfig: RuleConfig[] = [
213213
{
214214
name: 'costPrice',
215215
rule: (arg) => arg >= 0.01,
216-
message: '商品成本价格必须大于等于 0.01 元!!!'
216+
message: '商品成本价格必须大于等于 0.00 元!!!'
217217
}
218218
]
219219

0 commit comments

Comments
 (0)