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

This commit is contained in:
zhouyanli
2026-07-08 16:11:29 +08:00
parent cb3166302d
commit be4bae64d1
3 changed files with 11 additions and 9 deletions

View File

@@ -56,7 +56,8 @@
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>"
],
"schemes" : ""
"schemes" : "",
"targetSdkVersion" : 30
},
/* ios */
"ios" : {

View File

@@ -201,7 +201,6 @@ page {
background-color: #ccc;
color: #999;
}
.status-bar {
width: 100vw;
height: 46px;

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,16 +92,16 @@ const handleBtnClick = () => {
if (currentStep.value < 2) {
currentStep.value++;
} else {
// 立即体验,跳转首页
// 防重复跳转:已触发过跳转则直接返回
if (isNavigating.value) return;
isNavigating.value = true;
// 立即体验,跳转登录页
// 1. 记录引导已完成
uni.setStorageSync('hasShowGuide', true);
// 2. 跳转
uni.navigateTo({
// 2. 跳转登录
uni.redirectTo({
url: "/pageSubPack/loginSub/pwd-login"
})
// uni.switchTab({
// url: '/pages/index/index'
// });
}
};
</script>