This commit is contained in:
parent
b9240fa75b
commit
ba60234933
@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
VUE_APP_TITLE = 代申
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
@ -9,4 +9,4 @@ VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
VITE_BASE_PATH = ''
|
||||
VUE_APP_VITE_BASE_PATH = '/weverse/'
|
||||
|
@ -1,9 +1,9 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
VUE_APP_TITLE = 代申
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/weverse-prod-api'
|
||||
VITE_BASE_PATH = '/weverse/'
|
||||
VUE_APP_VITE_BASE_PATH = '/weverse/'
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
VUE_APP_TITLE = 代申
|
||||
|
||||
BABEL_ENV = production
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar"/>
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||
@ -102,9 +103,10 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = process.env.VITE_BASE_PATH;
|
||||
location.href = process.env.VITE_BASE_PATH + "/index";
|
||||
})
|
||||
}).catch(() => {});
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ Vue.use(Element, {
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
base: process.env.VUE_APP_SUB_PATH,
|
||||
base: process.env.VUE_APP_VITE_BASE_PATH,
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
|
@ -182,6 +182,7 @@ Router.prototype.replace = function push(location) {
|
||||
}
|
||||
|
||||
export default new Router({
|
||||
base: process.env.VUE_APP_VITE_BASE_PATH,
|
||||
mode: 'history', // 去掉url中的#
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes
|
||||
|
@ -84,10 +84,14 @@ service.interceptors.response.use(res => {
|
||||
if (code === 401) {
|
||||
if (!isRelogin.show) {
|
||||
isRelogin.show = true;
|
||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = process.env.VITE_BASE_PATH;
|
||||
location.href = process.env.VITE_BASE_PATH + '/index';
|
||||
})
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
@ -124,9 +128,15 @@ service.interceptors.response.use(res => {
|
||||
|
||||
// 通用下载方法
|
||||
export function download(url, params, filename, config) {
|
||||
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
||||
downloadLoadingInstance = Loading.service({
|
||||
text: "正在下载数据,请稍候",
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
})
|
||||
return service.post(url, params, {
|
||||
transformRequest: [(params) => { return tansParams(params) }],
|
||||
transformRequest: [(params) => {
|
||||
return tansParams(params)
|
||||
}],
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||
responseType: 'blob',
|
||||
...config
|
||||
|
Loading…
Reference in New Issue
Block a user