From 92224e3d5e03f223bf2fb4b0eb88b74e790d8da9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 一月 2022 10:00:05 +0800 Subject: [PATCH] 2022-01-17 --- src/index.js | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index d96c6c3..cee8479 100644 --- a/src/index.js +++ b/src/index.js @@ -10,9 +10,7 @@ import '@/assets/css/minkeicon.css' import '@/assets/css/viewstyle.scss' -if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { - window.location.replace(window.location.href.split(/(index.html)+/ig)[0] + 'mob/index.html') -} else if (window.location.href.indexOf('#/design') > -1) { // 缂栬緫椤甸潰鍒锋柊鏃讹紝璺宠浆鑷充富椤� +if (window.location.href.indexOf('#/design') > -1) { // 缂栬緫椤甸潰鍒锋柊鏃讹紝璺宠浆鑷充富椤� window.location.replace(window.location.href.replace(/design/ig, 'main')) } @@ -67,6 +65,13 @@ .then(config => { if (!config) return + if (config.defaultApp) { + if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { + window.location.replace(window.location.href.split(/(index.html)+/ig)[0].replace('admin/', '') + 'mob/index.html#/index') + return + } + } + let GLOB = {} GLOB.appId = config.appId || '' GLOB.lineColor = config.lineColor || '' -- Gitblit v1.8.0