From bb88c82d4584d072cb9562e3fe77d707c9942d27 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Wed, 29 May 2024 13:35:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E4=BA=8E=E5=A4=9A=E5=95=86=E6=88=B7=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cart/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pages/cart/index.vue b/pages/cart/index.vue index 7c162ff..b122127 100644 --- a/pages/cart/index.vue +++ b/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