diff --git a/src/main.js b/src/main.js index f4a0580c6..b2bdb84a4 100644 --- a/src/main.js +++ b/src/main.js @@ -66,13 +66,22 @@ import { Loading } from 'element-ui'; // 路由拦截 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({ text: '加载中...', background: '#fff' }); function closeLoading(){ - loading.close() - loading = null + setTimeout(() => { + loading.close() + loading = null + }, 1000) } let fromName = from.name if(fromName === undefined || fromName === null){ diff --git a/src/pages/blankPage/index.vue b/src/pages/blankPage/index.vue index 160185587..117a20ca7 100644 --- a/src/pages/blankPage/index.vue +++ b/src/pages/blankPage/index.vue @@ -19,7 +19,8 @@ export default { }, methods: { closeWindow(){ - hwh5.close() + // hwh5.close() + this.$router.go(-2) } } } diff --git a/src/router/index.js b/src/router/index.js index 863051a93..7299ca608 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4466,7 +4466,7 @@ Router.prototype.push = function push (location) { const router = new Router({ routes, - mode: 'history', // default: hash ,history + mode: 'hash', // default: hash ,history scrollBehavior (to, from, savedPosition) { if (savedPosition) { return savedPosition