fix: login landing from menu_access, silent optional Layout 403
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -256,18 +256,13 @@ import {
|
||||
setMenuAccess,
|
||||
getMenuAccess,
|
||||
canSwitchClubByMenu,
|
||||
shouldShowAllMenus,
|
||||
ensureMenuAccess,
|
||||
canShowMenuPage,
|
||||
} from '@/utils/club-context'
|
||||
|
||||
const menuAccessState = ref(getMenuAccess())
|
||||
|
||||
const canShow = (pageId) => {
|
||||
const access = menuAccessState.value ?? getMenuAccess()
|
||||
if (shouldShowAllMenus(access)) return true
|
||||
if (access.visible_page_ids.length === 0) return false
|
||||
return access.visible_page_ids.includes(pageId)
|
||||
}
|
||||
const canShow = (pageId) => canShowMenuPage(pageId)
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const route = useRoute()
|
||||
@@ -327,7 +322,7 @@ const loadMenuAccess = async () => {
|
||||
|
||||
const loadClubContext = async () => {
|
||||
try {
|
||||
const res = await request.get(JITUAN_API.meContext)
|
||||
const res = await request.get(JITUAN_API.meContext, { skipErrorToast: true })
|
||||
if (res.code === 0 && res.data) {
|
||||
mergeServerClubContext(res.data)
|
||||
clubOptions.value = res.data.clubs || []
|
||||
@@ -386,7 +381,7 @@ const fetchStats = async () => {
|
||||
try {
|
||||
const res = await request.post('/yonghu/kfjrhqzl', {
|
||||
phone: userPhone.value
|
||||
}, { signal: abortController.signal })
|
||||
}, { signal: abortController.signal, skipErrorToast: true })
|
||||
if (res.code === 0) {
|
||||
stats.value = res.data
|
||||
}
|
||||
@@ -427,7 +422,7 @@ const fetchKefuPermission = async () => {
|
||||
try {
|
||||
const res = await request.post('/houtai/kfhqltqx', {
|
||||
phone: userPhone.value
|
||||
})
|
||||
}, { skipErrorToast: true })
|
||||
if (res.code === 0) {
|
||||
const { permissions, goeasy_appkey } = res.data
|
||||
kefuPermissions.value = permissions || []
|
||||
|
||||
Reference in New Issue
Block a user