This commit is contained in:
Zy
2026-07-08 16:49:36 +08:00

View File

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