Przeglądaj źródła

merge featue/1002478 into main

merge "featue/1002478" into "main"
1002478,
1002478

Created-by: lizi
Author-id: 7030146
MR-id: 6789
Commit-by: lizi
Merged-by: Kevin
Description: merge "featue/1002478" into "main"
1002478,
1002478

See merge request: zhcqdn00001/front!39
Kevin 2 lat temu
rodzic
commit
ef1c274196
2 zmienionych plików z 6 dodań i 2 usunięć
  1. 4 0
      src/router/index.ts
  2. 2 2
      src/views/LoginView.vue

+ 4 - 0
src/router/index.ts

@@ -150,6 +150,10 @@ export function routeToLogin() {
   router.push({ name: "Login" });
 }
 
+export function routeToSearchPage() {
+  router.push({ name: "SearchIndex"})
+}
+
 /**
  * 路由到报告编辑界面
  * @param id 报告ID

+ 2 - 2
src/views/LoginView.vue

@@ -2,7 +2,7 @@
 import { reactive, ref } from 'vue';
 import user from "@/services/user.service";
 import { useAuthStore } from '@/stores/auth.store';
-import { routeToHome } from '@/router';
+import { routeToSearchPage } from '@/router';
 
 interface FormState {
   username: string;
@@ -31,7 +31,7 @@ const onFinish = (values: any) => {
   user.login(param).then((resp) => {
     authStore.setCurrentUser(resp.data.data);
     authStore.setToken(resp.data.data.token);
-    routeToHome();
+    routeToSearchPage();
     loading.value = false;
   }).catch((err) => {
     loading.value = false;