lex 2 anni fa
parent
commit
bc0fc72ba1
1 ha cambiato i file con 10 aggiunte e 11 eliminazioni
  1. 10 11
      src/router/index.ts

+ 10 - 11
src/router/index.ts

@@ -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,14 +52,13 @@ router.beforeEach((to, from, next) => {
 
 router.afterEach((to, from) => {
   // 为了处理全屏弹窗loading没有关闭
-  if (to.path === from.path) {
-    baseEvent.emit('toastClose')
-  } else {
-    setTimeout(() => {
-      // const toastStatus = baseEvent.emit('toastStatus')
-      baseEvent.emit('toastClose')
-    }, 300);
-  }
+  // if (to.path === from.path) {
+  //   baseEvent.emit('toastClose')
+  // } else {
+  //   setTimeout(() => {
+  //     baseEvent.emit('toastClose')
+  //   }, 300);
+  // }
 })
 
 let isOpen = false