diff --git a/.env.production b/.env.production index 66da123..f93926a 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http -VUE_APP_BASE_API = 'https://eladmin.vip' +VUE_APP_BASE_API = 'http://8.138.171.103/aerocraftAdminApi' # 如果接口是 http 形式, wss 需要改为 ws VUE_APP_WS_API = 'wss://eladmin.vip' diff --git a/src/router/routers.js b/src/router/routers.js index 8a4cf6c..bbbc87d 100644 --- a/src/router/routers.js +++ b/src/router/routers.js @@ -61,8 +61,8 @@ export const constantRouterMap = [ ] export default new Router({ - // mode: 'hash', - mode: 'history', + mode: 'hash', + // mode: 'history', scrollBehavior: () => ({ y: 0 }), routes: constantRouterMap }) diff --git a/vue.config.js b/vue.config.js index 0733651..9c48bb9 100644 --- a/vue.config.js +++ b/vue.config.js @@ -14,8 +14,8 @@ const port = 8013 // 端口配置 // All configuration item explanations can be find in https://cli.vuejs.org/config/ module.exports = { // hash 模式下可使用 - // publicPath: process.env.NODE_ENV === 'development' ? '/' : './', - publicPath: '/', + publicPath: process.env.NODE_ENV === 'development' ? '/' : './', + // publicPath: '/', outputDir: 'dist', assetsDir: 'static', lintOnSave: process.env.NODE_ENV === 'development',