diff --git a/.env.production b/.env.production index dab7dc0..12852c4 100644 --- a/.env.production +++ b/.env.production @@ -6,5 +6,4 @@ ENV = 'production' VUE_APP_ENV = 'production' # 安薪宝一体化平台/生产环境 -VUE_APP_BASE_API = '/gs-real-name-prod-api -' +VUE_APP_BASE_API = '/gs-real-name' diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 54ae816..f0a3954 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -114,7 +114,7 @@ export default { this.$store.dispatch('LogOut').then(() => { location.href = process.env.VUE_APP_ENV === 'production' - ? '/gs-real-name/index' + ? '/gs-realname/index' : '/index' }) }) diff --git a/src/layout/index.vue b/src/layout/index.vue index 1aec99d..8465fe1 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -201,7 +201,10 @@ export default { }, close() { this.$store.dispatch('LogOut').then(() => { - location.href = '/index' + location.href = + process.env.VUE_APP_ENV === 'production' + ? '/gs-realname/index' + : '/index' }) }, diff --git a/src/router/index.js b/src/router/index.js index 4141f2a..3117d14 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -266,5 +266,5 @@ export default new Router({ mode: 'history', // 去掉url中的# scrollBehavior: () => ({ y: 0 }), routes: constantRoutes, - base: process.env.VUE_APP_ENV === 'production' ? '/gs-real-name' : '', + base: process.env.VUE_APP_ENV === 'production' ? '/gs-realname' : '', }) diff --git a/src/utils/request_formdata.js b/src/utils/request_formdata.js index 9422111..774b353 100644 --- a/src/utils/request_formdata.js +++ b/src/utils/request_formdata.js @@ -221,7 +221,7 @@ service.interceptors.response.use( // location.href = '/index' location.href = process.env.VUE_APP_ENV === 'production' - ? '/gs-real-name/index' + ? '/gs-realname/index' : '/index' }) }) diff --git a/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue b/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue index 690b23d..27beb1a 100644 --- a/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue +++ b/src/views/basic-manage/sub-manage/sub-entry-and-exit/entry-form.vue @@ -76,7 +76,7 @@ - + diff --git a/src/views/construction-person/entry-and-exit-manage/person-entry/index.vue b/src/views/construction-person/entry-and-exit-manage/person-entry/index.vue index 32bd241..a07a3b0 100644 --- a/src/views/construction-person/entry-and-exit-manage/person-entry/index.vue +++ b/src/views/construction-person/entry-and-exit-manage/person-entry/index.vue @@ -317,7 +317,7 @@ export default { // 判断是否为测试环境 if (process.env.VUE_APP_ENV === 'production') { window.open( - window.origin + '/gs-real-name' + '/人员入场-模版.xlsx', + window.origin + '/gs-realname' + '/人员入场-模版.xlsx', ) } else { window.open(window.origin + '/人员入场-模版.xlsx') diff --git a/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue b/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue index bf49aca..fe60bbf 100644 --- a/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue +++ b/src/views/construction-person/red-green-light-mange/dishonesty-person/index.vue @@ -478,7 +478,7 @@ export default { // 判断是否为测试环境 if (process.env.VUE_APP_ENV === 'production') { window.open( - window.origin + '/gs-real-name' + '/失信人员-模板.xlsx', + window.origin + '/gs-realname' + '/失信人员-模板.xlsx', ) } else { window.open(window.origin + '/失信人员-模板.xlsx') diff --git a/vue.config.js b/vue.config.js index 2b1f501..2bbd2da 100644 --- a/vue.config.js +++ b/vue.config.js @@ -18,7 +18,7 @@ module.exports = { // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。 - publicPath: process.env.NODE_ENV === 'production' ? '/gs-real-name' : '/', + publicPath: process.env.NODE_ENV === 'production' ? '/gs-realname' : '/', // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) outputDir: 'dist', // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)