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 @@
+
+
+
+
+
+
+
+
+
+ ¥ {{ formatAmount(balance) }}
+
+
+
+
+
+
+
+
+
+
+ {{ formatComputingPoints(computingPoints) }}
+ 点
+
+
+
+
+
+
+
+
+
+ {{ availableCoupons }}
+ 张
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ record.serialNumber }}
+
+
+
+
+
+ {{ record.transactionType }}
+
+
+
+
+
+
+ ¥ {{ formatAmount(Math.abs(record[column.key])) }}
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
-
-
+
+
@@ -192,7 +205,8 @@ import {
WalletOutlined,
RightOutlined,
LinkOutlined,
- PlusOutlined
+ PlusOutlined,
+ QuestionCircleOutlined // 新增图标
} from '@ant-design/icons-vue'
import router from '@/router'
import { message } from 'ant-design-vue'
@@ -239,6 +253,16 @@ const generateInviteLink = () => {
// const link = await api.generateInviteLink()
}
+// 新增:跳转到活动规则页面
+const goToRules = () => {
+ // 跳转到活动规则页面,假设路由为 '/invite/rules'
+ // 如果是在新窗口打开,可以使用 window.open('/invite/rules', '_blank')
+ router.push('/invite/rules')
+
+ // 或者使用外部链接
+ // window.open('https://your-domain.com/invite-rules', '_blank')
+}
+
// 跳转到充值页面
const goToRecharge = () => {
router.push('/recharge')
@@ -382,6 +406,13 @@ const goToInvoice = () => {
line-height: 1.6;
}
+.invite-actions {
+ display: flex;
+ align-items: center;
+ gap: 16px;
+ margin-top: 8px;
+}
+
.generate-btn {
height: 40px;
font-size: 14px;
@@ -408,6 +439,23 @@ const goToInvoice = () => {
}
}
+/* 新增:活动规则链接样式 */
+.rules-link {
+ padding: 0;
+ height: auto;
+ font-size: 14px;
+ color: #1890ff;
+
+ &:hover {
+ color: #40a9ff;
+ }
+
+ .anticon {
+ margin-right: 4px;
+ font-size: 14px;
+ }
+}
+
/* 活动规则样式 */
.rules-section {
padding-left: 24px;
@@ -760,5 +808,15 @@ const goToInvoice = () => {
.rules-section {
padding-left: 0;
}
+
+ .invite-actions {
+ flex-direction: column;
+ align-items: flex-start;
+ gap: 12px;
+ }
+
+ .rules-link {
+ margin-left: 0;
+ }
}
\ No newline at end of file
diff --git a/src/views/admin/index.vue b/src/views/admin/index.vue
index 4ff9430..e026c96 100644
--- a/src/views/admin/index.vue
+++ b/src/views/admin/index.vue
@@ -55,6 +55,7 @@ const menuItems: MenuItem[] = [
icon: MoneyCollectOutlined,
children: [
// { path: '/layout/admin/costDetail', name: '收支明细' },
+ { path: '/layout/admin/myMoney', name: '费用总览' },
{ path: '/layout/admin/myOrder', name: '我的订单' },
{ path: '/layout/admin/flow', name: '账单明细' },
{ path: '/layout/admin/coupon', name: '优惠券(待开发)', disabled: true },