From 17bb1250f2120415e5fc9f47fe50b60f72b47a07 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期日, 04 八月 2024 12:50:01 +0800 Subject: [PATCH] update 优化搜索事件 --- components/footer/customer-footer.vue | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/components/footer/customer-footer.vue b/components/footer/customer-footer.vue index 1ddd505..3cc049b 100644 --- a/components/footer/customer-footer.vue +++ b/components/footer/customer-footer.vue @@ -84,19 +84,26 @@ if (this.flg == index) { return } - if (index===1||index===2) { - //交易大厅和购物车,这2个可以用跳转方式 - uni.navigateTo({ - url:item.pagePath - }) - - }else{ - uni.redirectTo({ - url: item.pagePath - - }); + if (index === 1 || index === 2) { + //交易大厅和购物车,这2个可以用跳转方式 + if (index === 2) { + if (!this.currentInfo.id) { + this.$message.showToast('请先登录') + return + } + + } + uni.navigateTo({ + url: item.pagePath + }) + + } else { + uni.redirectTo({ + url: item.pagePath + + }); } - + }, } } -- Gitblit v1.9.3