Pre Merge pull request !410 from mccreexu/subRouter

pull/410/MERGE
mccreexu 1 month ago committed by Gitee
commit 059fcfb46d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -102,7 +102,9 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index'
// 使 BASE_PATH
const basePath = process.env.VUE_APP_BASE_PATH || '/'; //
location.href = `${basePath}index`;
})
}).catch(() => {})
}

@ -178,6 +178,9 @@ Router.prototype.replace = function push(location) {
export default new Router({
mode: 'history', // 去掉url中的#
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
base: process.env.NODE_ENV === "production" ? "/" : "/",
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})

@ -7,6 +7,10 @@ import { tansParams, blobValidate } from "@/utils/ruoyi"
import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
export const BASE_PATH = '/'
let downloadLoadingInstance
// 是否显示重新登录
export let isRelogin = { show: false }

Loading…
Cancel
Save