Merge branch 'sit-Leung' into sit-jiamin-v2

This commit is contained in:
952108534@qq.com
2022-01-23 21:11:26 +08:00
7 changed files with 33 additions and 11 deletions

View File

@@ -274,6 +274,15 @@ export default {
// });
},
plus(num, index) {
let leftAllotment = this.cartData[index].leftAllotment;
if(this.cartData[index].buyCount >= leftAllotment) {
this.$message({
type: "error",
message: "已达到本品最大购买上限",
});
return;
}
this.cartData[index].buyCount =
parseInt(this.cartData[index].buyCount) + 1;
},