购物车商品来源于多商户,无法结算

version/0412
wangdong 6 months ago
parent 00d151376f
commit bb88c82d45
  1. 10
      pages/cart/index.vue

@ -402,6 +402,16 @@
const app = this
if (app.checkedIds.length) {
const cartIds = app.checkedIds.join()
const merchant_ids = [];
app.list.forEach(item => {
if (app.checkedIds.includes(item.id) && !merchant_ids.includes(item.goods.merchant_id)) {
merchant_ids.push(item.goods.merchant_id);
}
});
if (merchant_ids.length > 1) {
app.$toast('结算商品来源于多少家商户,无法结算!');
return false;
}
// app.$navTo('pages/checkout/index', {
// mode: 'cart',
// cartIds

Loading…
Cancel
Save