From 1a4cad719648876059924d3cdaff6a25c9efe96f Mon Sep 17 00:00:00 2001 From: BigBoss <2280520255@qq.com> Date: Wed, 10 Jun 2020 23:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BE=85=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91&?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=B2=E5=AE=8C=E6=88=90=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/cart/cart.vue | 4 +- src/pages/confirmOrder/confirmOrder.vue | 2 +- src/pages/myOrder/components/OrderCard.vue | 28 +++++++++-- src/pages/myOrderPaying/myOrderPaying.vue | 80 ++++++++++++++++++++---------- 4 files changed, 82 insertions(+), 32 deletions(-) diff --git a/src/pages/cart/cart.vue b/src/pages/cart/cart.vue index f3f1e12..0bd973e 100644 --- a/src/pages/cart/cart.vue +++ b/src/pages/cart/cart.vue @@ -167,8 +167,8 @@ export default { item.isChecked = false }) }, - onLoad: async function() { - }, + // onLoad: async function() { + // }, methods: { // 全选按钮 pClick() { diff --git a/src/pages/confirmOrder/confirmOrder.vue b/src/pages/confirmOrder/confirmOrder.vue index 16a5906..14eab55 100644 --- a/src/pages/confirmOrder/confirmOrder.vue +++ b/src/pages/confirmOrder/confirmOrder.vue @@ -334,7 +334,7 @@ export default { // return this.$store.state.cart.checkedCartLst // }, goodInfo() { - console.log('state', this.$store.state.read.goodInfo) + // console.log('state', this.$store.state.read.goodInfo) return this.$store.state.read.goodInfo }, skuInfo() { diff --git a/src/pages/myOrder/components/OrderCard.vue b/src/pages/myOrder/components/OrderCard.vue index 83fc7d4..1b0d46e 100644 --- a/src/pages/myOrder/components/OrderCard.vue +++ b/src/pages/myOrder/components/OrderCard.vue @@ -52,8 +52,8 @@ class="btns" v-if="status == '0'" > - 取消订单 - 去支付 + 取消订单 + 去支付 @@ -146,10 +165,10 @@ export default { }; }, onLoad:async function ({payId,status,isPay}) { - // console.log('++++++++++++++++++',payId,status,isPay) this.payId = payId this.status = status this.isPay = isPay + console.log('++++++++++++++++++',this.status) const openid = uni.getStorageSync('openid') const uid = this.$store.state.user.userInfo.uid this.uid = uid @@ -197,8 +216,17 @@ export default { // console.log(totalDiscount) return totalDiscount; } - }, - methods: { + }, + + methods: { + //再次购买 暂时只支持跳转第一个商品 + toDetail(){ + const pid = this.orderInfo.order_info.list[0].pid + uni.navigateTo({ + url: '../details/details?pid='+pid, + fail: (res) => {console.log(res)}, + }); + }, // 取消订单 timeup() { this.cancleOrder(); @@ -272,7 +300,7 @@ export default { }) // 跳转订单详情页->状态 待收货 uni.reLaunch({ - url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=2&isPay=1`, + url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=1&isPay=1`, }) }, fail: (res) => { @@ -282,9 +310,9 @@ export default { showCancel: false, }) // 跳转订单详情页->刷新本页面 - uni.redirectTo({ - url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=1&isPay=1`, - }) + // uni.redirectTo({ + // url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`, + // }) }, complete: () => { uni.hideLoading() @@ -297,9 +325,9 @@ export default { }) console.log('支付失败') uni.hideLoading() - uni.redirectTo({ - url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=1&isPay=1`, - }) + // uni.redirectTo({ + // url: `../myOrderPaying/myOrderPaying?payId=${payId}&status=0&isPay=1`, + // }) } }) -- 2.0.0