diff --git a/.env.production b/.env.production index aa22a93..78968a8 100644 --- a/.env.production +++ b/.env.production @@ -1,8 +1,9 @@ # 页面标题 -VUE_APP_TITLE = 博诺思管理系统 +VUE_APP_TITLE = 庐江智慧工地 # 生产环境配置 ENV = 'production' +BASE_URL=/zhgd-ht/ # 博诺思管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +VUE_APP_BASE_API = '/ljzhgd-api' diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 1696f54..5b59f83 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -35,7 +35,7 @@ export default { const first = matched[0] if (!this.isDashboard(first)) { - matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) + matched = [{ path: '/zhgd-ht/index', meta: { title: '首页' }}].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 6ca10a7..3b7a717 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -102,7 +102,7 @@ export default { type: 'warning' }).then(() => { this.$store.dispatch('LogOut').then(() => { - location.href = '/index'; + location.href = '/zhgd-ht/'; }) }).catch(() => {}); } diff --git a/src/permission.js b/src/permission.js index c568979..4aaf40e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -34,7 +34,7 @@ router.beforeEach((to, from, next) => { }).catch(err => { store.dispatch('LogOut').then(() => { Message.error(err) - next({ path: '/' }) + next({ path: '/zhgd-ht' }) }) }) } else { diff --git a/src/router/index.js b/src/router/index.js index 71907b6..54f375a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -177,6 +177,7 @@ Router.prototype.replace = function push(location) { } export default new Router({ + base: process.env.BASE_URL, // 添加环境变量作为基础路径 mode: 'history', // 去掉url中的# scrollBehavior: () => ({ y: 0 }), routes: constantRoutes diff --git a/src/utils/request.js b/src/utils/request.js index 2250d20..851149b 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -136,7 +136,7 @@ service.interceptors.response.use(res => { MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { - location.href = '/index'; + location.href = '/zhgd-ht'; }) }).catch(() => { isRelogin.show = false; diff --git a/src/views/construction/manage/hoistManage/hoistManage.vue b/src/views/construction/manage/hoistManage/hoistManage.vue index ab1407a..3b1e304 100644 --- a/src/views/construction/manage/hoistManage/hoistManage.vue +++ b/src/views/construction/manage/hoistManage/hoistManage.vue @@ -156,7 +156,7 @@ export default { }, // 表单校验 rules: {}, - htmlContent: '/dz_video.html', + htmlContent: '/zhgd-ht/dz_video.html', nocheckStyle: ['dev-info-box', 'layout', 'nocheck'], checkStyle: ['dev-info-box', 'layout', 'check'], warnStyle: ['dev-info-box', 'layout', 'warn'], @@ -596,4 +596,4 @@ export default { max-height: 70vh; overflow-y: auto; } - \ No newline at end of file + diff --git a/src/views/index.vue b/src/views/index.vue index aadaf73..f29b8a1 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -36,7 +36,7 @@