loading 也需要检查,解决跳转问题

This commit is contained in:
tianfeng 2025-08-25 11:15:13 +08:00
parent 57aa8fc1b2
commit bf968996b0
3 changed files with 3 additions and 20 deletions

2
.env
View File

@ -1,5 +1,5 @@
# 应用版本号
VITE_APP_VERSION=1.1.0
VITE_APP_VERSION=1.1.1
# 构建时间戳(会在构建时自动更新)
VITE_BUILD_TIME=""

View File

@ -388,7 +388,6 @@ class RouteGuard {
*/
isPublicPage(path) {
const publicPages = [
'/loading', // 加载页面 - 不需要任何检查
PAGES.APPLY, // 申请页面 - 重要:申请页面不需要权限检查
PAGES.NOT_APP, // 错误页面 - APP连接失败时的页面
'/404', // 404页面

View File

@ -49,8 +49,7 @@ import { ref, onMounted, onUnmounted } from 'vue'
import { useRouter } from 'vue-router'
import { isInApp, connectApplication, parseAccessOrigin, parseHeader, setHttpHeaders } from '../utils/appBridge.js'
import { appConnectionManager } from '../utils/appConnectionManager.js'
import {getMemberProfile} from '../api/wallet.js'
import { setUserInfo } from '../utils/userStore.js'
import {getDefaultPage} from "@/utils/permissionManager.js";
const router = useRouter()
@ -161,22 +160,7 @@ const waitForLoadingComplete = () => {
//
const navigateToTargetPage = async () => {
try {
//
const response = await getMemberProfile()
if (response && response.status && response.body) {
//
const memberProfile = response.body
if (memberProfile) {
setUserInfo(memberProfile, null)
router.replace('/host-center')
} else {
router.replace('/apply')
}
} else {
//
router.replace('/apply')
}
router.replace(getDefaultPage())
} catch (error) {
console.error('Failed to get team entry:', error)
//