From 3ae92c6fa55922af770ebc8e9355c5c0255e69cd Mon Sep 17 00:00:00 2001 From: xuxy <1059738716@qq.com> Date: 星期一, 12 八月 2024 21:54:23 +0800 Subject: [PATCH] update花店详情 --- components/footer/customer-footer.vue | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/components/footer/customer-footer.vue b/components/footer/customer-footer.vue index 3cc049b..0627f98 100644 --- a/components/footer/customer-footer.vue +++ b/components/footer/customer-footer.vue @@ -93,12 +93,23 @@ } } + //判断,如果上上上级别,就是要跳转的,改为返回,避免堆栈太多 + const pages = getCurrentPages(); + //如果上一层就是购物车,那么就返回,而不是跳转 + // console.log('toShopping',pages) + if (pages && pages.length >= 2) { + if ( ('/' + pages[pages.length - 2].route) === item.pagePath) { + uni.navigateBack() + return + } + } + uni.navigateTo({ url: item.pagePath }) } else { - uni.redirectTo({ + uni.reLaunch({ url: item.pagePath }); -- Gitblit v1.9.3