From eb0faad7ecbff4006634ac8ab67c507ad4cbef14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?= <17633066053@163.com> Date: Fri, 30 Sep 2022 09:58:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20:bug:=20=E4=BC=98=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{seckill.vue => base-list.vue} | 10 +++++++- pages/cart/payment/payOrder.vue | 24 +++++++++---------- 2 files changed, 21 insertions(+), 13 deletions(-) rename components/m-goods-list/{seckill.vue => base-list.vue} (94%) diff --git a/components/m-goods-list/seckill.vue b/components/m-goods-list/base-list.vue similarity index 94% rename from components/m-goods-list/seckill.vue rename to components/m-goods-list/base-list.vue index 4e7b834..df3b036 100644 --- a/components/m-goods-list/seckill.vue +++ b/components/m-goods-list/base-list.vue @@ -3,7 +3,7 @@
- +
@@ -55,6 +55,14 @@ return [] } }, + }, + methods:{ + // 跳转到商品详情 + navigateToDetailPage(item) { + uni.navigateTo({ + url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}`, + }); + }, } } diff --git a/pages/cart/payment/payOrder.vue b/pages/cart/payment/payOrder.vue index 71be635..a145a4b 100644 --- a/pages/cart/payment/payOrder.vue +++ b/pages/cart/payment/payOrder.vue @@ -98,18 +98,18 @@ }, onBackPress(e) { if (e.from == "backbutton") { - if(this.routerVal.recharge_sn){ - uni.switchTab({ - url: '/pages/tabbar/user/my' - }); - } - else{ - uni.redirectTo({ - url: "/pages/order/myOrder?status=0", - }); - } - return true; //阻止默认返回行为 - } + if(this.routerVal.recharge_sn){ + uni.switchTab({ + url: '/pages/tabbar/user/my' + }); + } + else{ + uni.navigateTo({ + url: "/pages/order/myOrder?status=0", + }); + } + return true; //阻止默认返回行为 + } }, mounted() { this.cashierData();