From a6b5160c6ab04aa79ecbcad7f79158625f0acfcf Mon Sep 17 00:00:00 2001 From: aaron <> Date: Mon, 10 Mar 2025 11:04:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BA=AB=E4=BB=BD=E8=AE=A4?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user.js | 26 +++++ src/layouts/AdminLayout.vue | 14 ++- src/router/index.js | 6 + src/views/UserAuth.vue | 226 ++++++++++++++++++++++++++++++++++++ 4 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 src/views/UserAuth.vue diff --git a/src/api/user.js b/src/api/user.js index 17e144d..8d6885f 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -19,4 +19,30 @@ export function login(postData) { role: 'partner' } }); +} + +/** + * 获取用户认证信息 + * @returns {Promise} - 返回用户认证信息 + */ +export function getUserAuth() { + return request({ + url: '/api/user/auth', + method: 'get' + }); +} + +/** + * 提交用户认证 + * @param {Object} data - 认证信息 + * @param {string} data.name - 真实姓名 + * @param {string} data.id_number - 身份证号 + * @returns {Promise} - 返回认证结果 + */ +export function submitUserAuth(data) { + return request({ + url: '/api/user/auth', + method: 'post', + data + }); } \ No newline at end of file diff --git a/src/layouts/AdminLayout.vue b/src/layouts/AdminLayout.vue index e5c10ef..880f799 100644 --- a/src/layouts/AdminLayout.vue +++ b/src/layouts/AdminLayout.vue @@ -32,6 +32,11 @@ 银行卡管理 + + $router.push('/user/auth')"> + + 实名认证 + @@ -95,7 +100,8 @@ import { HomeOutlined, DollarOutlined, CreditCardOutlined, - WalletOutlined + WalletOutlined, + UserOutlined } from '@ant-design/icons-vue'; export default { @@ -105,7 +111,8 @@ export default { HomeOutlined, DollarOutlined, CreditCardOutlined, - WalletOutlined + WalletOutlined, + UserOutlined }, setup() { const store = useStore(); @@ -133,6 +140,9 @@ export default { // 如果是财务管理的子路由 selectedKeys.value = [`finance-${pathParts[2]}`]; openKeys.value = ['finance']; + } else if (pathParts.length >= 3 && pathParts[1] === 'user') { + // 如果是用户相关的子路由 + selectedKeys.value = [`user-${pathParts[2]}`]; } else { // 如果是顶级路由 const key = pathParts[1] || 'dashboard'; diff --git a/src/router/index.js b/src/router/index.js index 26c8e16..4cf9515 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -46,6 +46,12 @@ const routes = [ component: () => import('../views/BankCard.vue'), meta: { title: '银行卡管理', icon: 'credit-card' }, hidden: true + }, + { + path: 'user/auth', + name: 'UserAuth', + component: () => import('../views/UserAuth.vue'), + meta: { title: '实名认证', icon: 'user' } } ] }, diff --git a/src/views/UserAuth.vue b/src/views/UserAuth.vue new file mode 100644 index 0000000..eddf18f --- /dev/null +++ b/src/views/UserAuth.vue @@ -0,0 +1,226 @@ + + + + + + + + + + 认证姓名:{{ authInfo.name }} + 身份证号:{{ authInfo.id_number }} + 认证时间:{{ authInfo.create_time }} + + + + + + + + + + + + + + + + + + + + + + + 提交认证 + + + + + + 注意事项: + + 请确保填写的是您本人的真实身份信息 + 身份信息一经认证无法修改,请仔细核对 + 我们将严格保护您的个人信息安全 + + + + + + + + + + + \ No newline at end of file
认证姓名:{{ authInfo.name }}
身份证号:{{ authInfo.id_number }}
认证时间:{{ authInfo.create_time }}
注意事项: