From 95719e57d926de1ccfec1fff97e3267c32cdd533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Mon, 3 Apr 2023 11:02:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BF=94=E5=9B=9E=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/layout.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/layout/layout.vue b/src/components/layout/layout.vue index 450caf5..c04daa8 100644 --- a/src/components/layout/layout.vue +++ b/src/components/layout/layout.vue @@ -105,7 +105,13 @@ export default { if (this.customBtn) { this.$emit("onClickBtn"); } else { - uni.navigateBack({ delta: 1 }); + if (getCurrentPages().length < 2) { + uni.switchTab({ + url: "/pages/index/index", + }); + } else { + uni.navigateBack({ delta: 1 }); + } } }, changeCity() {