From 44a4d393c65c550a667b1af78f94184e2bf7486f Mon Sep 17 00:00:00 2001 From: sszdot Date: Thu, 12 Dec 2024 19:40:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E4=BC=A0=E5=80=BC=E5=88=B0=20=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=20=20=E7=94=B1=E4=BA=8E=E6=8F=90=E5=89=8D?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E8=B4=AD=E7=89=A9=E8=BD=A6=20=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=B4=AF=E8=AE=A1=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E6=B8=85=E7=A9=BA=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=89=8D?= =?UTF-8?q?=20=E8=AE=B0=E5=BD=95=E5=95=86=E5=93=81=E6=80=BB=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=20=E5=88=B0=E4=B8=80=E4=B8=AA=E5=8F=98=E9=87=8F=20?= =?UTF-8?q?=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- pages/shop/order.vue | 7 ++++--- pages/shop/pay.vue | 13 +++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pages/shop/order.vue b/pages/shop/order.vue index 7ee1ece..d84dd90 100644 --- a/pages/shop/order.vue +++ b/pages/shop/order.vue @@ -127,7 +127,7 @@ }, //购物车总价 total() { - return this.totalPrice(this.$store.state.cartList) + return Number(this.totalPrice(this.$store.state.cartList)) }, //外送费 transportPrice() { @@ -149,7 +149,7 @@ }, //所有总价包括 商品总价 打包费 等总和 fullPrice() { - return this.total + this.transportPrice + this.packPrice + return Number(this.total) + Number(this.transportPrice) + Number(this.packPrice) }, //用户信息 userInfo() { @@ -182,11 +182,12 @@ }).then(res => { //订单添加成功 if (res.data.status === 1) { + let fullPrice = String(this.fullPrice) //清空购物车 this.$store.commit('clearCartList') //跳转到支付页面 uni.navigateTo({ - url: `/pages/shop/pay?order_sn=${res.data.order_sn}` + url: `/pages/shop/pay?order_sn=${res.data.order_sn}&fullPrice=${fullPrice}` }); } else if (res.data.status === -1) { uni.removeStorage({ //清除用户信息 跳转首页 diff --git a/pages/shop/pay.vue b/pages/shop/pay.vue index 464a733..1b68f03 100644 --- a/pages/shop/pay.vue +++ b/pages/shop/pay.vue @@ -7,23 +7,32 @@ - + {{fullPrice | formatPrice}}