Merge pull request #1553 from dataease/pr@dev@fix_mobile_api

fix: 移动端仪表板访问异常
This commit is contained in:
fit2cloud-chenyw 2021-12-29 14:37:50 +08:00 committed by GitHub
commit 7f46a1be0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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