申请页面处理
This commit is contained in:
parent
1175f019cb
commit
43aaa8d9f0
@ -67,7 +67,8 @@ export const ROLE_PERMISSIONS = {
|
|||||||
PAGES.PERSONAL_SALARY, // 个人薪资查看
|
PAGES.PERSONAL_SALARY, // 个人薪资查看
|
||||||
PAGES.HOST_SETTING, // 主播设置
|
PAGES.HOST_SETTING, // 主播设置
|
||||||
'/information-details',
|
'/information-details',
|
||||||
'/search-payee'
|
'/search-payee',
|
||||||
|
'/apply'
|
||||||
],
|
],
|
||||||
|
|
||||||
// Guest (访客/申请者)
|
// Guest (访客/申请者)
|
||||||
|
|||||||
@ -265,13 +265,32 @@ export function usePageInitialization(options = {}) {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取团队信息失败:', error)
|
console.error('获取团队信息失败:', error)
|
||||||
if (error.message && error.message.includes('401')) {
|
|
||||||
await router.push({
|
// 检查错误状态码
|
||||||
path: '/not_app',
|
const errorMessage = error.message || ''
|
||||||
query: { message: error.message }
|
const errorStatus = error.response?.status || error.status
|
||||||
})
|
|
||||||
return
|
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
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apply-view">
|
<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">
|
<div class="content">
|
||||||
<!-- 申请说明 -->
|
<!-- 申请说明 -->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user