|
@@ -42,9 +42,9 @@ const router: Router = createRouter({
|
|
|
|
|
|
const whitePath = ['/coursewarePlay']
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
- // if (!whitePath.includes(to.path)){
|
|
|
- // baseEvent.emit('toastShow')
|
|
|
- // }
|
|
|
+ if (!whitePath.includes(to.path)){
|
|
|
+ baseEvent.emit('toastShow')
|
|
|
+ }
|
|
|
// console.log(to, from)
|
|
|
document.title = (to.meta.title || '管乐团') as any
|
|
|
next()
|
|
@@ -52,13 +52,14 @@ router.beforeEach((to, from, next) => {
|
|
|
|
|
|
router.afterEach((to, from) => {
|
|
|
// 为了处理全屏弹窗loading没有关闭
|
|
|
- // if (to.path === from.path) {
|
|
|
- // baseEvent.emit('toastClose')
|
|
|
- // } else {
|
|
|
- // setTimeout(() => {
|
|
|
- // baseEvent.emit('toastClose')
|
|
|
- // }, 300);
|
|
|
- // }
|
|
|
+ if (to.path === from.path) {
|
|
|
+ baseEvent.emit('toastClose')
|
|
|
+ } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ // const toastStatus = baseEvent.emit('toastStatus')
|
|
|
+ baseEvent.emit('toastClose')
|
|
|
+ }, 300);
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
let isOpen = false
|