吴昊天 2 лет назад
Родитель
Сommit
000360a309
2 измененных файлов с 5 добавлено и 6 удалено
  1. 4 5
      crmeb/route/route.php
  2. 1 1
      template/admin/src/setting.env.js

+ 4 - 5
crmeb/route/route.php

@@ -12,18 +12,17 @@ Route::miss(function () {
     }
 
     switch (strtolower($appName)) {
-        case config('app.admin_prefix','admin'):
-            return view(app()->getRootPath() . 'public'  . DS . 'system.html');
+        case config('app.admin_prefix', 'admin'):
+        case 'kefu':
+            return view(app()->getRootPath() . 'public' . DS . config('app.admin_prefix', 'admin') . 'system.html');
         case 'home':
             if (request()->isMobile()) {
                 return redirect(app()->route->buildUrl('/'));
             } else {
                 return view(app()->getRootPath() . 'public' . DS . 'home' . DS . 'index.html');
             }
-        case 'kefu':
-            return view(app()->getRootPath() . 'public'  . DS . 'system.html');
         case 'pages':
-            return view(app()->getRootPath() . 'public' .DS . 'index.html');
+            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');

+ 1 - 1
template/admin/src/setting.env.js

@@ -19,7 +19,7 @@ const Setting = {
   // 部署应用包时的基本 URL
   publicPath: env === 'development' ? '/admin/' : '/admin/',
   // 生产环境构建文件的目录名
-  outputDir: 'dist',
+  outputDir: 'dist/admin',
   // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
   assetsDir: 'view_admin',
   // 开发环境每次保存时 lint 代码,会将 lint 错误输出为编译警告