修改点击立即跳转重复跳转问题

This commit is contained in:
zhouyanli
2026-07-08 16:09:41 +08:00
parent 0c01bea060
commit 58d628aa6b

View File

@@ -77,6 +77,8 @@ import { ref } from 'vue';
// 当前引导步骤(0/1/2)
const currentStep = ref(0);
const mode = ref("default")
// 防重复跳转锁
const isNavigating = ref(false)
// ========== 方法 ==========
// 滑动swiper切换步骤
@@ -90,11 +92,14 @@ const handleBtnClick = () => {
if (currentStep.value < 2) {
currentStep.value++;
} else {
// 防重复跳转:已触发过跳转则直接返回
if (isNavigating.value) return;
isNavigating.value = true;
// 立即体验,跳转首页
// 1. 记录引导已完成
uni.setStorageSync('hasShowGuide', true);
// 2. 跳转首页
uni.navigateTo({
uni.redirectTo({
url: "/pageSubPack/loginSub/pwd-login"
})
// uni.switchTab({