Commit 3bd475ff772365eef684e4094e36d0af61cbedef

Authored by zhiyangdu
1 parent 88be308e

解决用户输入为0this.stepperValue未自动获取input的值问题

src/pages/goodDetails/goodDetails.vue
@@ -283,6 +283,10 @@ export default { @@ -283,6 +283,10 @@ export default {
283 }, 283 },
284 // 跳转到确认订单详情 284 // 跳转到确认订单详情
285 jumpToConfirmOrderPage (item) { 285 jumpToConfirmOrderPage (item) {
  286 + // 解决用户输入为0this.stepperValue未自动获取input的值问题
  287 + if (this.stepperValue == 0) {
  288 + this.stepperValue = 1;
  289 + }
286 if ((parseInt(this.goodsInfo.stock) > -1 && parseInt(this.stepperValue) > parseInt(this.goodsInfo.stock)) || parseInt(this.stepperValue) > 999) { 290 if ((parseInt(this.goodsInfo.stock) > -1 && parseInt(this.stepperValue) > parseInt(this.goodsInfo.stock)) || parseInt(this.stepperValue) > 999) {
287 Toast("数量超出库存范围~") 291 Toast("数量超出库存范围~")
288 } else { 292 } else {