chenhao 2 жил өмнө
parent
commit
485a12d910

+ 8 - 1
src/pages/login/index.vue

@@ -41,6 +41,7 @@
         >
       </a-form>
     </div>
+    <div class="record-info">鄂ICP备12000033号-16</div>
   </div>
 </template>
 
@@ -75,7 +76,7 @@ const onLogin = () => {
         message.success({ content: "登录成功", key: "success" });
         setTimeout(() => {
           message.destroy("success");
-          router.replace({ path: "/" });
+          router.replace({ name: "school" });
         }, 500);
       })
       .finally(() => {
@@ -132,5 +133,11 @@ const doLogin = () => {
       }
     }
   }
+  .record-info {
+    width: 428px;
+    margin-left: auto;
+    text-align: center;
+    font-size: 16px;
+  }
 }
 </style>

+ 6 - 6
src/routes/index.ts

@@ -6,11 +6,6 @@ import { SESSION_STORAGE_KEYS } from "@/constants/storage";
 
 const router = createRouter({
   routes: [
-    {
-      path: "/login",
-      name: "login",
-      component: () => import("@/pages/login/index.vue"),
-    },
     {
       path: "/",
       component: LayOut,
@@ -31,12 +26,17 @@ const router = createRouter({
           component: () => import("@/pages/user-manage/index.vue"),
         },
         {
-          path: "/|school",
+          path: "school",
           name: "school",
           component: () => import("@/pages/school-manage/index.vue"),
         },
       ],
     },
+    {
+      path: "/",
+      name: "login",
+      component: () => import("@/pages/login/index.vue"),
+    },
   ],
   history: createWebHistory(),
 });