소스 검색

perf: 优化在登陆页点击登录按钮时的内部逻辑 (#867)

otis 1 년 전
부모
커밋
f728629437
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/views/login/index.vue

+ 1 - 1
src/views/login/index.vue

@@ -77,7 +77,7 @@ const onLogin = async (formEl: FormInstance | undefined) => {
         .then(res => {
         .then(res => {
           if (res.success) {
           if (res.success) {
             // 获取后端路由
             // 获取后端路由
-            initRouter().then(() => {
+            return initRouter().then(() => {
               router.push(getTopMenu(true).path);
               router.push(getTopMenu(true).path);
               message("登录成功", { type: "success" });
               message("登录成功", { type: "success" });
             });
             });