diff --git a/src/layouts/AdminLayout.vue b/src/layouts/AdminLayout.vue index e022783..8a98a56 100644 --- a/src/layouts/AdminLayout.vue +++ b/src/layouts/AdminLayout.vue @@ -16,6 +16,14 @@ 仪表盘 + $router.push('/finance')"> + + 财务管理 + + $router.push('/bank-card')"> + + 银行卡管理 + @@ -71,14 +79,18 @@ import { useStore } from 'vuex'; import { useRoute, useRouter } from 'vue-router'; import { DashboardOutlined, - HomeOutlined + HomeOutlined, + DollarOutlined, + CreditCardOutlined } from '@ant-design/icons-vue'; export default { name: 'AdminLayout', components: { DashboardOutlined, - HomeOutlined + HomeOutlined, + DollarOutlined, + CreditCardOutlined }, setup() { const store = useStore(); diff --git a/src/router/index.js b/src/router/index.js index fb6133a..1ed109e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,6 +12,18 @@ const routes = [ name: 'Dashboard', component: () => import('../views/Dashboard.vue'), meta: { title: '仪表盘', icon: 'dashboard' } + }, + { + path: 'finance', + name: 'Finance', + component: () => import('../views/Finance.vue'), + meta: { title: '财务管理', icon: 'money' } + }, + { + path: 'bank-card', + name: 'BankCard', + component: () => import('../views/BankCard.vue'), + meta: { title: '银行卡管理', icon: 'credit-card' } } ] }, diff --git a/src/utils/config.js b/src/utils/config.js index b2e501c..085e2b7 100644 --- a/src/utils/config.js +++ b/src/utils/config.js @@ -28,7 +28,11 @@ export default { BASE_URL, BUILD_TIMESTAMP, API: { - LOGIN: '/api/user/password-login' + LOGIN: '/api/user/password-login', + ACCOUNT_SUMMARY: '/api/account/summary', + ACCOUNT_WITHDRAWALS: '/api/withdraw/user', + BANK_CARDS: '/api/bank-cards', + WITHDRAW: '/api/withdraw' }, // 添加时间戳参数到 URL,用于破除缓存 addTimestamp: (url) => { diff --git a/src/views/BankCard.vue b/src/views/BankCard.vue new file mode 100644 index 0000000..3a8e07c --- /dev/null +++ b/src/views/BankCard.vue @@ -0,0 +1,288 @@ + + + + + 我的银行卡 + + + + 添加银行卡 + + + + + + + + + + + 添加银行卡 + + + + + + + + + {{ card.bank_name }} + 储蓄卡 + + {{ card.card_number }} + {{ card.name }} + + + + + + + + + + + + + + + + + + 工商银行 + 建设银行 + 农业银行 + 招商银行 + 中国银行 + 交通银行 + 邮储银行 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/Finance.vue b/src/views/Finance.vue new file mode 100644 index 0000000..74b0346 --- /dev/null +++ b/src/views/Finance.vue @@ -0,0 +1,544 @@ + + + + + + + + + + + 账户余额 + + + + ¥ + {{ accountInfo.total_balance || '0.00' }} + + + + + + + + + 可提现金额 + + + + ¥ + {{ accountInfo.balance || '0.00' }} + + + 申请提现 + 管理银行卡 + + + + + + + + + 锁定金额 + + + + ¥ + {{ accountInfo.lock_balance || '0.00' }} + + + + + + + + + + 提现记录 + + + + + 刷新 + + + + + + + + + {{ formatDate(text) }} + + + + + ¥ {{ text }} + + + + + + {{ getStatusText(text) }} + + + + + + {{ record.bank_name }} ({{ record.bank_card_number }}) + + + + + + {{ text ? formatDate(text) : '-' }} + + + + + + + 取消申请 + + + 已取消 + 已驳回 + 处理中 + 已完成 + + + + + + + + + + + + + 可提现金额: ¥{{ accountInfo.balance || '0.00' }},最低提现金额: ¥1.00 + + + + + + {{ card.bank_name }} ({{ card.card_number }}) + + + + + + 添加银行卡 + + + + + + + + + + + \ No newline at end of file