fix:登录

main
cr 2026-04-25 13:40:55 +08:00
parent d31e99fba0
commit 8bac945106
1 changed files with 13 additions and 0 deletions

View File

@ -5,11 +5,24 @@ import { ref } from 'vue';
import test from '@/sheep/helper/test.js';
import AuthUtil from '@/sheep/api/member/auth';
// 防止重复跳转登录页
let isNavigatingToLogin = false;
// 打开授权弹框 - 改为页面跳转
export function showAuthModal(type = 'smsLogin') {
// 正在跳转中,直接返回,防止重复跳转
if (isNavigatingToLogin) return;
isNavigatingToLogin = true;
// 跳转到登录页面,传递登录类型
uni.navigateTo({
url: `/pages/index/login-page?type=${type}`,
complete: () => {
// 延时重置标志位,避免短时间内连续触发
setTimeout(() => {
isNavigatingToLogin = false;
}, 800);
},
fail: () => {
// 如果跳转失败,降级使用弹窗方式
const modal = $store('modal');