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}}