Przeglądaj źródła

修改登录。

jxq 2 miesięcy temu
rodzic
commit
c3452b119c
1 zmienionych plików z 7 dodań i 6 usunięć
  1. 7 6
      src/views/login/index.vue

+ 7 - 6
src/views/login/index.vue

@@ -115,7 +115,7 @@ import { getCaptchaApi, getOrgListApi, getUserDicts } from "@/api/auth";
 import { LoginData } from "@/api/auth/types";
 import { Sunny, Moon } from "@element-plus/icons-vue";
 import { LocationQuery, LocationQueryValue, useRoute } from "vue-router";
-import router from "@/router";
+
 import defaultSettings from "@/settings";
 import { ThemeEnum } from "@/enums/ThemeEnum";
 import { usePermissionStore } from "@/store/modules/permission";
@@ -196,6 +196,7 @@ function getOrgList() {
  * 登录
  */
 const route = useRoute();
+const router = useRouter();
 function handleLogin() {
   loginFormRef.value.validate((valid: boolean) => {
     if (valid) {
@@ -231,13 +232,13 @@ const toLogin = () => {
         }
       });
 
-      router.push({ path: redirect, query: otherQueryParams });
+      router.push({
+        path: redirect,
+        query: { ...otherQueryParams, date: new Date().getTime() },
+      });
       // router.push("/welcome");
     })
-    .catch(() => {
-      // getCaptcha();
-      console.log("catch");
-    })
+
     .finally(() => {
       loading.value = false;
     });