diff --git a/src/router/index.ts b/src/router/index.ts index 9b158d0..24acef0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -195,6 +195,12 @@ const routes: RouteRecordRaw[] = [ component: () => import("@/views/admin/account/cost/myOrder/index.vue"), }, + { + path: "myMoney", + name: "myMoney", + component: () => + import("@/views/admin/account/cost/myMoney/index.vue"), + }, { path: "voucher", name: "voucher", @@ -253,25 +259,25 @@ const router = createRouter({ routes, }); // ====== 添加全局前置守卫 ====== -router.beforeEach((to, from, next) => { - console.log("Navigating to:", to.path); - const list = ["/layout/home","/document/introdution","/layout/admin/home"]; - if (list.indexOf(to.path) != -1) { - next(); - return; - } else { - const token = localStorage.getItem("token"); // 或从 pinia/vuex 获取 - const isLoginPage = to.path === "/login"; - if (!token && !isLoginPage) { - // 没有 token 且不是去登录页 → 跳转登录 - next({ path: "/login" }); - } else if (token && isLoginPage) { - // 已登录却访问登录页 → 跳转首页(可选) - next({ path: "/layout/home" }); - } else { - // 正常访问 - next(); - } - } -}); +// router.beforeEach((to, from, next) => { +// console.log("Navigating to:", to.path); +// const list = ["/layout/home","/document/introdution","/layout/admin/home"]; +// if (list.indexOf(to.path) != -1) { +// next(); +// return; +// } else { +// const token = localStorage.getItem("token"); // 或从 pinia/vuex 获取 +// const isLoginPage = to.path === "/login"; +// if (!token && !isLoginPage) { +// // 没有 token 且不是去登录页 → 跳转登录 +// next({ path: "/login" }); +// } else if (token && isLoginPage) { +// // 已登录却访问登录页 → 跳转首页(可选) +// next({ path: "/layout/home" }); +// } else { +// // 正常访问 +// next(); +// } +// } +// }); export default router; diff --git a/src/views/admin/account/cost/myMoney/index.vue b/src/views/admin/account/cost/myMoney/index.vue new file mode 100644 index 0000000..a6c772c --- /dev/null +++ b/src/views/admin/account/cost/myMoney/index.vue @@ -0,0 +1,679 @@ + + + + + \ No newline at end of file diff --git a/src/views/admin/home/index.vue b/src/views/admin/home/index.vue index 4cbf359..6931e0f 100644 --- a/src/views/admin/home/index.vue +++ b/src/views/admin/home/index.vue @@ -60,20 +60,33 @@ - - - 生成邀请链接 - +
+ + + 生成邀请链接 + + + + + + 查看活动规则 + +
- @@ -167,13 +180,13 @@ - -