合并分支 'fix_foton_20230613' 到 'master'
Fix foton 20230613 查看合并请求 laws-foton-slrs/foton-laws-system-front!99
This commit is contained in:
+11
-2
@@ -66,13 +66,22 @@ import { Loading } from 'element-ui';
|
|||||||
|
|
||||||
// 路由拦截
|
// 路由拦截
|
||||||
router.beforeEach(function (to, from, next) {
|
router.beforeEach(function (to, from, next) {
|
||||||
|
const currentURL = window.location.href
|
||||||
|
if (currentURL.indexOf('#/') > 0) {
|
||||||
|
const index = currentURL.indexOf('#/')
|
||||||
|
const startUrl = currentURL.slice(0, index)
|
||||||
|
const endUrl = currentURL.slice(index + 2)
|
||||||
|
window.location.href = startUrl + endUrl
|
||||||
|
}
|
||||||
let loading = Loading.service({
|
let loading = Loading.service({
|
||||||
text: '加载中...',
|
text: '加载中...',
|
||||||
background: '#fff'
|
background: '#fff'
|
||||||
});
|
});
|
||||||
function closeLoading(){
|
function closeLoading(){
|
||||||
loading.close()
|
setTimeout(() => {
|
||||||
loading = null
|
loading.close()
|
||||||
|
loading = null
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
let fromName = from.name
|
let fromName = from.name
|
||||||
if(fromName === undefined || fromName === null){
|
if(fromName === undefined || fromName === null){
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeWindow(){
|
closeWindow(){
|
||||||
hwh5.close()
|
// hwh5.close()
|
||||||
|
this.$router.go(-2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4466,7 +4466,7 @@ Router.prototype.push = function push (location) {
|
|||||||
|
|
||||||
const router = new Router({
|
const router = new Router({
|
||||||
routes,
|
routes,
|
||||||
mode: 'history', // default: hash ,history
|
mode: 'hash', // default: hash ,history
|
||||||
scrollBehavior (to, from, savedPosition) {
|
scrollBehavior (to, from, savedPosition) {
|
||||||
if (savedPosition) {
|
if (savedPosition) {
|
||||||
return savedPosition
|
return savedPosition
|
||||||
|
|||||||
Reference in New Issue
Block a user