提交 009cdaaa authored 作者: wangjiahao's avatar wangjiahao

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

上级 7623a7dc
...@@ -27,9 +27,10 @@ const whiteList = ['/login', '/401', '/404', '/delink', '/nolic'] // no redirect ...@@ -27,9 +27,10 @@ const whiteList = ['/login', '/401', '/404', '/delink', '/nolic'] // no redirect
router.beforeEach(async(to, from, next) => { router.beforeEach(async(to, from, next) => {
// start progress bar // start progress bar
NProgress.start() NProgress.start()
const mobileIgnores = ['/delink']
const mobilePreview = '/preview/'
const mobiePreview = '/preview/' if (isMobile() && !to.path.includes(mobilePreview) && mobileIgnores.indexOf(to.path) === -1) {
if (isMobile() && !to.path.includes(mobiePreview)) {
window.location.href = window.origin + '/app.html' window.location.href = window.origin + '/app.html'
NProgress.done() NProgress.done()
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论