Explorar el Código

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 hace 2 años
padre
commit
ef1c274196
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  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;