申请页面处理
This commit is contained in:
parent
1175f019cb
commit
43aaa8d9f0
@ -67,7 +67,8 @@ export const ROLE_PERMISSIONS = {
|
||||
PAGES.PERSONAL_SALARY, // 个人薪资查看
|
||||
PAGES.HOST_SETTING, // 主播设置
|
||||
'/information-details',
|
||||
'/search-payee'
|
||||
'/search-payee',
|
||||
'/apply'
|
||||
],
|
||||
|
||||
// Guest (访客/申请者)
|
||||
|
||||
@ -265,13 +265,32 @@ export function usePageInitialization(options = {}) {
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取团队信息失败:', error)
|
||||
if (error.message && error.message.includes('401')) {
|
||||
await router.push({
|
||||
path: '/not_app',
|
||||
query: { message: error.message }
|
||||
})
|
||||
return
|
||||
|
||||
// 检查错误状态码
|
||||
const errorMessage = error.message || ''
|
||||
const errorStatus = error.response?.status || error.status
|
||||
|
||||
console.log('Error details:', { errorMessage, errorStatus, error })
|
||||
|
||||
// HTTP 406错误通常表示NOT_TEAM_MEMBER,应该跳转到apply
|
||||
if (errorStatus === 406 || errorMessage.includes('406')) {
|
||||
console.log('跳转到 apply 页面')
|
||||
await router.replace('/apply')
|
||||
return null
|
||||
}
|
||||
|
||||
// HTTP 401错误表示未授权,应该跳转到not_app
|
||||
if (errorStatus === 401 || errorMessage.includes('401')) {
|
||||
console.log('跳转到 not_app 页面')
|
||||
await router.replace({
|
||||
path: '/not_app',
|
||||
query: { message: errorMessage }
|
||||
})
|
||||
return null
|
||||
}
|
||||
|
||||
// 其他错误,记录但不跳转
|
||||
console.warn('未处理的错误:', error)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="apply-view">
|
||||
<MobileHeader title="Apply to join the team" :showHelp="true" @help="showHelp" />
|
||||
<MobileHeader title="Apply to join the team" :showBack="false" :showHelp="true" @help="showHelp" />
|
||||
|
||||
<div class="content">
|
||||
<!-- 申请说明 -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user