合并分支 'fix_foton_20230613' 到 'master'
拦截路由 查看合并请求 laws-foton-slrs/foton-laws-system-front!100
This commit is contained in:
+7
-7
@@ -66,13 +66,13 @@ import { Loading } from 'element-ui';
|
|||||||
|
|
||||||
// 路由拦截
|
// 路由拦截
|
||||||
router.beforeEach(function (to, from, next) {
|
router.beforeEach(function (to, from, next) {
|
||||||
const currentURL = window.location.href
|
// const currentURL = window.location.href
|
||||||
if (currentURL.indexOf('#/') > 0) {
|
// if (currentURL.indexOf('#/') > 0) {
|
||||||
const index = currentURL.indexOf('#/')
|
// const index = currentURL.indexOf('#/')
|
||||||
const startUrl = currentURL.slice(0, index)
|
// const startUrl = currentURL.slice(0, index)
|
||||||
const endUrl = currentURL.slice(index + 2)
|
// const endUrl = currentURL.slice(index + 2)
|
||||||
window.location.href = startUrl + endUrl
|
// window.location.href = startUrl + endUrl
|
||||||
}
|
// }
|
||||||
let loading = Loading.service({
|
let loading = Loading.service({
|
||||||
text: '加载中...',
|
text: '加载中...',
|
||||||
background: '#fff'
|
background: '#fff'
|
||||||
|
|||||||
Reference in New Issue
Block a user