团购:默认curDiscount值

This commit is contained in:
luying
2022-10-11 17:33:25 +08:00
parent 057475039a
commit 764333e1c4

View File

@@ -81,6 +81,7 @@ class GroupShopItem {
if(item.discount && item.discount.length > 0) {
for(let discount of item.discount) {
this.discount.push(new GroupShopDiscount(item.price, discount));
if(!this.curDiscount) this.curDiscount = new GroupShopDiscount(item.price, discount);
}
}
}