部署修改
This commit is contained in:
parent
d42d8a680b
commit
af9c67ec02
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export default {
|
|||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
location.href = '/zhgd-ht/';
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<li>Axios</li>
|
||||
<li>Echarts</li>
|
||||
<li>Quill</li>
|
||||
<li>...</li>
|
||||
|
||||
</ul>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -54,8 +54,7 @@
|
|||
<i class="el-icon-s-promotion"></i> 官网:<el-link
|
||||
href="http://www.ahbonus.cn"
|
||||
target="_blank"
|
||||
>http://www.ahbonus.cn</el-link
|
||||
>
|
||||
>http://www.ahbonus.cn</el-link>
|
||||
</p>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ module.exports = {
|
|||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/zhgd-ht/" : "/zhgd-ht/",
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
outputDir: 'zhgd-ht',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
assetsDir: 'static',
|
||||
// 是否开启eslint保存检测,有效值:ture | false | 'error'
|
||||
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://127.0.0.1:18080/ljzhgd/`,
|
||||
target: `http://192.168.0.14:21900/ljzhgd/`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
|
|
|||
Loading…
Reference in New Issue