diff --git a/crmeb/public/mobile.html b/crmeb/public/mobile.html new file mode 100644 index 000000000..f4d9b5be2 --- /dev/null +++ b/crmeb/public/mobile.html @@ -0,0 +1,23 @@ + + + + + <?=$siteName?> + + + + + + \ No newline at end of file diff --git a/crmeb/route/route.php b/crmeb/route/route.php index ccdf6de23..65503abc0 100644 --- a/crmeb/route/route.php +++ b/crmeb/route/route.php @@ -24,8 +24,16 @@ Route::miss(function () { case 'pages': return view(app()->getRootPath() . 'public' . DS . 'index.html'); default: - if (!request()->isMobile() && is_dir(app()->getRootPath() . 'public' . DS . 'home') && !request()->get('type')) { - return view(app()->getRootPath() . 'public' . DS . 'home' . DS . 'index.html'); + if (!request()->isMobile()) { + if (is_dir(app()->getRootPath() . 'public' . DS . 'home') && !request()->get('type')) { + return view(app()->getRootPath() . 'public' . DS . 'home' . DS . 'index.html'); + } else { + if (request()->get('type')) { + return view(app()->getRootPath() . 'public' . DS . 'index.html'); + } else { + return view(app()->getRootPath() . 'public' . DS . 'mobile.html', ['siteName' => sys_config('site_name'), 'siteUrl' => sys_config('site_url') . '/pages/index/index']); + } + } } else { return view(app()->getRootPath() . 'public' . DS . 'index.html'); } diff --git a/template/uni-app/App.vue b/template/uni-app/App.vue index 85cba6b6d..bb19b2424 100644 --- a/template/uni-app/App.vue +++ b/template/uni-app/App.vue @@ -246,14 +246,6 @@ // #endif // #ifdef H5 - uni.getSystemInfo({ - success(e) { - /* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */ - if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) { - window.location.pathname = '/static/html/pc.html'; - } - } - }); if (option.query.hasOwnProperty('type') && option.query.type == "iframeWindow") { this.globalData.isIframe = true; } else { diff --git a/template/uni-app/static/html/pc.html b/template/uni-app/static/html/pc.html deleted file mode 100644 index 89a13f10c..000000000 --- a/template/uni-app/static/html/pc.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - crmeb-PC端 - - - - - - - - - - - \ No newline at end of file