|
|
@@ -256,7 +256,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log(this.fragment)
|
|
|
},
|
|
|
subNum () {
|
|
|
let newNum = this.fragment.num - this.commodity.minPackQty
|
|
|
@@ -269,8 +268,13 @@ export default {
|
|
|
getFragment(this.commodity, this.fragment)
|
|
|
},
|
|
|
inputNum () {
|
|
|
- this.changeNum(this.fragment.num)
|
|
|
- getFragment(this.commodity, this.fragment)
|
|
|
+ if ((/^[\d]*$/).test(this.fragment.num)) {
|
|
|
+ this.changeNum(this.fragment.num)
|
|
|
+ getFragment(this.commodity, this.fragment)
|
|
|
+ } else {
|
|
|
+ this.$message.error('请输入数字')
|
|
|
+ this.fragment.num = this.commodity.minBuyQty
|
|
|
+ }
|
|
|
},
|
|
|
buyNow: function (isBuy, item) {
|
|
|
if (!this.$store.state.option.user.logged) {
|