forked from github/dataease
Merge pull request #10005 from dataease/pr@dev-v2@fix_mobile_platform
fix(X-Pack): 第三方平台使用移动端免登进入pc版首页
This commit is contained in:
commit
e30a604f5c
@ -29,20 +29,24 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
start()
|
start()
|
||||||
loadStart()
|
loadStart()
|
||||||
checkPlatform()
|
checkPlatform()
|
||||||
|
let isDesktop = wsCache.get('app.desktop')
|
||||||
|
if (isDesktop === null) {
|
||||||
|
await appStore.setAppModel()
|
||||||
|
isDesktop = appStore.getDesktop
|
||||||
|
}
|
||||||
if (isMobile()) {
|
if (isMobile()) {
|
||||||
done()
|
done()
|
||||||
loadDone()
|
loadDone()
|
||||||
if (to.name === 'link') {
|
if (to.name === 'link') {
|
||||||
window.location.href = window.origin + '/mobile.html#' + to.path
|
window.location.href = window.origin + '/mobile.html#' + to.path
|
||||||
} else if (!isPlatformClient() && !isLarkPlatform()) {
|
} else if (
|
||||||
|
wsCache.get('user.token') ||
|
||||||
|
isDesktop ||
|
||||||
|
(!isPlatformClient() && !isLarkPlatform())
|
||||||
|
) {
|
||||||
window.location.href = window.origin + '/mobile.html#/index'
|
window.location.href = window.origin + '/mobile.html#/index'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let isDesktop = wsCache.get('app.desktop')
|
|
||||||
if (isDesktop === null) {
|
|
||||||
await appStore.setAppModel()
|
|
||||||
isDesktop = appStore.getDesktop
|
|
||||||
}
|
|
||||||
await appearanceStore.setAppearance()
|
await appearanceStore.setAppearance()
|
||||||
if (wsCache.get('user.token') || isDesktop) {
|
if (wsCache.get('user.token') || isDesktop) {
|
||||||
if (!userStore.getUid) {
|
if (!userStore.getUid) {
|
||||||
|
Loading…
Reference in New Issue
Block a user