pref:购物车不允许多类型商品同时结算

fix/0523-ch
ch 3 years ago
parent 742b847a45
commit 1173416e6c

@ -301,7 +301,16 @@ export default {
* 结算选中的商品
*/
handleOrder() {
const ids = this.checkedIds;
const ids = this.checkedIds;
//
const baseType = this.list.find(i => ids[0] === i.id).productType;
for(let id of ids){
const item = this.list.find(i => id === i.id);
if(item.productType != baseType){
uni.$u.toast('虚拟商品跟实物商品不能同时结算哦~');
return false;
}
}
if (ids.length) {
this.$Router.push({
path : '/orderSubmit',

Loading…
Cancel
Save