fix: 公共链接移动端跳转被拦截问题

This commit is contained in:
wangjiahao 2022-01-06 23:53:45 +08:00
parent 7623a7dca5
commit 009cdaaab9

View File

@ -27,9 +27,10 @@ const whiteList = ['/login', '/401', '/404', '/delink', '/nolic'] // no redirect
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
const mobileIgnores = ['/delink']
const mobilePreview = '/preview/'
const mobiePreview = '/preview/'
if (isMobile() && !to.path.includes(mobiePreview)) {
if (isMobile() && !to.path.includes(mobilePreview) && mobileIgnores.indexOf(to.path) === -1) {
window.location.href = window.origin + '/app.html'
NProgress.done()
}