|
|
@ -413,9 +413,15 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 生成订单; |
|
|
|
// 生成订单; |
|
|
|
subOrder: function() { |
|
|
|
subOrder: function() { |
|
|
|
|
|
|
|
this.getCartList(1); |
|
|
|
if(!uni.getStorageSync('pay_vip_status')){ |
|
|
|
if(!uni.getStorageSync('pay_vip_status')){ |
|
|
|
this.$refs.popup.open('center') |
|
|
|
this.$refs.popup.open('center') |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
|
|
title: '确定下单吗?', |
|
|
|
|
|
|
|
content: '下单后购物车商品将不能操作', |
|
|
|
|
|
|
|
success: (res) => { |
|
|
|
|
|
|
|
if (res.confirm) { |
|
|
|
placeOrder({ |
|
|
|
placeOrder({ |
|
|
|
tableId: this.info.tableId, |
|
|
|
tableId: this.info.tableId, |
|
|
|
storeId: this.info.store_id, |
|
|
|
storeId: this.info.store_id, |
|
|
@ -429,6 +435,9 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 计算总价; |
|
|
|
// 计算总价; |
|
|
|
getTotalPrice: function() { |
|
|
|
getTotalPrice: function() { |
|
|
@ -494,9 +503,10 @@ |
|
|
|
getCartLists() { |
|
|
|
getCartLists() { |
|
|
|
console.log('this.footerOpen',this.footerOpen); |
|
|
|
console.log('this.footerOpen',this.footerOpen); |
|
|
|
if (this.footerOpen) { |
|
|
|
if (this.footerOpen) { |
|
|
|
this.getCartList(); |
|
|
|
this.getCartList(1); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.footerOpen = true; |
|
|
|
this.footerOpen = true; |
|
|
|
|
|
|
|
this.getCartList(1); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
getCartList(iSshow) { |
|
|
|
getCartList(iSshow) { |
|
|
@ -511,7 +521,8 @@ |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
that.$set(that.cartData, 'cartList', res.data); |
|
|
|
that.$set(that.cartData, 'cartList', res.data); |
|
|
|
if (res.data.length) { |
|
|
|
if (res.data.length) { |
|
|
|
that.$set(that.cartData, 'iScart', iSshow ? false : !that.cartData.iScart); |
|
|
|
that.$set(that.cartData, 'iScart', iSshow); |
|
|
|
|
|
|
|
that.footerOpen = true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
that.$set(that.cartData, 'iScart', false); |
|
|
|
that.$set(that.cartData, 'iScart', false); |
|
|
|
} |
|
|
|
} |
|
|
@ -818,7 +829,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
that.getCartNum(); |
|
|
|
that.getCartNum(); |
|
|
|
if (!cart) { |
|
|
|
if (!cart) { |
|
|
|
that.getCartList(1); |
|
|
|
that.getCartList(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
that.$util.Tips({ |
|
|
|
that.$util.Tips({ |
|
|
|