From bbbf2ff2452744c012cda7b217a2a6d01daeff35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com> Date: Mon, 22 Mar 2021 17:52:03 +0800 Subject: [PATCH] cart change --- src/subpackage/retail/pages/index/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue index ee99477..8103b08 100644 --- a/src/subpackage/retail/pages/index/index.vue +++ b/src/subpackage/retail/pages/index/index.vue @@ -352,6 +352,9 @@ export default { else { this.addToCartList(); // 将主页数据加入到购物车列表 this.cartListStatusChange(); // 购物车列表状态变化 + + this.cartTotalPrice = this.totalPrice; + this.cartTotalCount = this.totalCount; this.isShowCartList = true; this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量 } @@ -393,8 +396,6 @@ export default { this.totalPrice = price.toFixed(2); this.totalCount = count; - this.cartTotalPrice = this.totalPrice; - this.cartTotalCount = this.totalCount; }, // 主页数量选项触发