diff --git a/config/config.local.js b/config/config.local.js index 22160a0..50f10f1 100644 --- a/config/config.local.js +++ b/config/config.local.js @@ -3,6 +3,9 @@ const Utils = require('ee-core').Utils; const logDir = Utils.getLogDir(); +/* + * 日志dir目录,会随开发环境变动,请谨慎修改 + */ exports.logger = { dir: logDir, }; diff --git a/config/config.prod.js b/config/config.prod.js index c9e7b1a..c188d58 100644 --- a/config/config.prod.js +++ b/config/config.prod.js @@ -3,6 +3,9 @@ const Utils = require('ee-core').Utils; const logDir = Utils.getLogDir(); +/* + * 日志dir目录,会随开发环境变动,请谨慎修改 + */ exports.logger = { dir: logDir, }; diff --git a/frontend/.env b/frontend/.env index b73cd6c..14fc0a8 100644 --- a/frontend/.env +++ b/frontend/.env @@ -1,3 +1,5 @@ NODE_ENV=production VUE_APP_PREVIEW=false + +# 生产环境,请留空,不要占用该属性 VUE_APP_API_BASE_URL= \ No newline at end of file diff --git a/frontend/.env.development b/frontend/.env.development index 4226ea9..63f02bf 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,3 +1,6 @@ NODE_ENV=development + VUE_APP_PREVIEW=true + +# 开发环境时,要调用的egg服务地址 VUE_APP_API_BASE_URL=http://localhost:7068 \ No newline at end of file diff --git a/frontend/src/api/main.js b/frontend/src/api/main.js index 3e0cc83..f266c8d 100644 --- a/frontend/src/api/main.js +++ b/frontend/src/api/main.js @@ -1,5 +1,4 @@ import request from '@/utils/request' -// import storage from 'store' const mainApi = { openDir: '/api/v1/example/openLocalDir', diff --git a/frontend/src/config/router.config.js b/frontend/src/config/router.config.js index b7a5b84..5002aa0 100644 --- a/frontend/src/config/router.config.js +++ b/frontend/src/config/router.config.js @@ -2,7 +2,7 @@ * 基础路由 * @type { *[] } */ - import {AppSider, DemoMenu} from '@/layouts' + import {AppSider, Menu} from '@/layouts' const RouteView = { name: 'RouteView', @@ -14,79 +14,79 @@ export const constantRouterMap = [ component: AppSider, children: [ { - path: '/demo', + path: '/', name: 'Demo', - component: DemoMenu, + component: Menu, children: [ { - path: '/demo/file/index', - name: 'DemoFileIndex', - component: () => import('@/views/demo/file/Index') + path: '/base/file/index', + name: 'BaseFileIndex', + component: () => import('@/views/base/file/Index') }, { - path: '/demo/socket/index', - name: 'DemoSocketIndex', - component: () => import('@/views/demo/socket/Index') + path: '/base/socket/index', + name: 'BaseSocketIndex', + component: () => import('@/views/base/socket/Index') }, { - path: '/demo/db/index', - name: 'DemoDBIndex', - component: () => import('@/views/demo/db/Index') + path: '/base/db/index', + name: 'BaseDBIndex', + component: () => import('@/views/base/db/Index') }, { - path: '/demo/windowview/index', - name: 'DemoWindowViewIndex', - component: () => import('@/views/demo/windowview/Index') + path: '/base/windowview/index', + name: 'BaseWindowViewIndex', + component: () => import('@/views/base/windowview/Index') }, { - path: '/demo/window/index', - name: 'DemoWindowIndex', - component: () => import('@/views/demo/window/Index') + path: '/base/window/index', + name: 'BaseWindowIndex', + component: () => import('@/views/base/window/Index') }, { - path: '/demo/extension/index', - name: 'DemoExtensionIndex', - component: () => import('@/views/demo/extension/Index') + path: '/base/extension/index', + name: 'BaseExtensionIndex', + component: () => import('@/views/base/extension/Index') }, { - path: '/demo/notification/index', - name: 'DemoNotificationIndex', - component: () => import('@/views/demo/notification/Index') + path: '/base/notification/index', + name: 'BaseNotificationIndex', + component: () => import('@/views/base/notification/Index') }, { - path: '/demo/powermonitor/index', - name: 'DemoPowerMonitorIndex', - component: () => import('@/views/demo/powermonitor/Index') + path: '/base/powermonitor/index', + name: 'BasePowerMonitorIndex', + component: () => import('@/views/base/powermonitor/Index') }, { - path: '/demo/screen/index', - name: 'DemoScreenIndex', - component: () => import('@/views/demo/screen/Index') + path: '/base/screen/index', + name: 'BaseScreenIndex', + component: () => import('@/views/base/screen/Index') }, { - path: '/demo/theme/index', - name: 'DemoThemeIndex', - component: () => import('@/views/demo/theme/Index') + path: '/base/theme/index', + name: 'BaseThemeIndex', + component: () => import('@/views/base/theme/Index') }, { - path: '/demo/shortcut/index', - name: 'DemoShortcutIndex', - component: () => import('@/views/demo/shortcut/Index') + path: '/base/shortcut/index', + name: 'BaseShortcutIndex', + component: () => import('@/views/base/shortcut/Index') }, { - path: '/demo/software/open', - name: 'DemoSoftwareIndex', - component: () => import('@/views/demo/software/Index') + path: '/base/software/open', + name: 'BaseSoftwareIndex', + component: () => import('@/views/base/software/Index') }, { - path: '/demo/system/index', - name: 'DemoSystemIndex', - component: () => import('@/views/demo/system/Index') + path: '/base/system/index', + name: 'BaseSystemIndex', + component: () => import('@/views/base/system/Index') }, { - path: '/demo/testapi/index', - name: 'DemoTestApiIndex', - component: () => import('@/views/demo/testapi/Index') + path: '/base/testapi/index', + name: 'BaseTestApiIndex', + component: () => import('@/views/base/testapi/Index') }, ] }, diff --git a/frontend/src/layouts/DemoMenu.vue b/frontend/src/layouts/Menu.vue similarity index 81% rename from frontend/src/layouts/DemoMenu.vue rename to frontend/src/layouts/Menu.vue index acc1548..fe989d1 100644 --- a/frontend/src/layouts/DemoMenu.vue +++ b/frontend/src/layouts/Menu.vue @@ -1,5 +1,5 @@