瀏覽代碼

移除路由钩子async

songxy 1 年之前
父節點
當前提交
5c184bcb7b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      client_h5/src/router/index.ts

+ 1 - 1
client_h5/src/router/index.ts

@@ -14,7 +14,7 @@ const router = createRouter({
 })
 
 // 路由加载前
-router.beforeEach(async (to, from, next) => {
+router.beforeEach((to, from, next) => {
   getUserInfoPromise(true).then((isLogin) => {
     next(); 
     if (!isLogin) {