From 9a75a033425924bfe0dfe45e4d7239c6a35e398a Mon Sep 17 00:00:00 2001 From: Songsl <2431955898@qq.com> Date: Thu, 14 May 2026 16:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E8=84=B8=E9=AA=8C=E8=AF=81=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/livenessVerification.ts | 8 +- src/api/modules/user.ts | 6 + src/views/livenessVerification/index.vue | 10 +- src/views/profile/kyc/index.vue | 286 +++++++++-------------- src/views/profile/kyc/options.ts | 15 -- 5 files changed, 132 insertions(+), 193 deletions(-) delete mode 100644 src/views/profile/kyc/options.ts diff --git a/src/api/modules/livenessVerification.ts b/src/api/modules/livenessVerification.ts index ec816ee..cf53b8c 100644 --- a/src/api/modules/livenessVerification.ts +++ b/src/api/modules/livenessVerification.ts @@ -1,7 +1,11 @@ import { request } from '@/api' - - +/** + * 获取照片 + */ +export async function getCardInfo(): Promise { + return request.get('/aws/getInfo') +} /** * 上传实时照片 diff --git a/src/api/modules/user.ts b/src/api/modules/user.ts index 97e299e..bdb5a42 100644 --- a/src/api/modules/user.ts +++ b/src/api/modules/user.ts @@ -93,3 +93,9 @@ export async function editUserApi(params: { export async function checkAccountIdIsSonForUser(params: { account_id: string }) { return request.get('/user/checkAccountIdIsSonForUser', params) } +/** + * 获取用户信息 + */ +export async function getUserBaseInfo(params: { account_id: string }) { + return request.get('/user/getUserBaseInfo', params) +} diff --git a/src/views/livenessVerification/index.vue b/src/views/livenessVerification/index.vue index 804c904..adc8e55 100644 --- a/src/views/livenessVerification/index.vue +++ b/src/views/livenessVerification/index.vue @@ -18,7 +18,8 @@ import { ref, reactive, onMounted } from 'vue' import * as faceapi from 'face-api.js' import { checkLiveness, uploadLivePhoto, verifyCard } from '@/api/modules/livenessVerification.ts' import { useRouter } from 'vue-router' -import { clearStorage } from '@/utils/storage/index.ts' +import { setStorage } from '@/utils/storage/index.ts' +import { getUserBaseInfo } from '@/api/modules/user.ts' const router = useRouter() @@ -86,8 +87,11 @@ function startDetection() { router.back() return ElMessage.error('检测失败') } - clearStorage() - router.push('/user/login') + const user = await getUserBaseInfo() + data.userInfo = user.user + setStorage('userInfo', user.user) + // clearStorage() + router.push('/dashboard') ElMessage.warning('请重新登录') } catch (e) { ElMessage.error(e.message) diff --git a/src/views/profile/kyc/index.vue b/src/views/profile/kyc/index.vue index a3382ec..12091a4 100644 --- a/src/views/profile/kyc/index.vue +++ b/src/views/profile/kyc/index.vue @@ -1,207 +1,147 @@ diff --git a/src/views/profile/kyc/options.ts b/src/views/profile/kyc/options.ts deleted file mode 100644 index 07563aa..0000000 --- a/src/views/profile/kyc/options.ts +++ /dev/null @@ -1,15 +0,0 @@ -export const identityFormItems = [ - // 联系电话 - { prop: 'phone', label: '联系电话', type: 'input' as const, width: '200px' }, - // 国籍 - { prop: 'nationality', label: '国籍', type: 'select' as const, width: '200px' }, - // 证件类型 - // { prop: 'idType', label: '证件类型', type: 'select' as const, width: '200px' }, - // 上传证件 - { prop: 'idCard', slotName: 'upload', label: '上传证件', type: 'upload' as const }, -] - -export const contactFormItems = [ - -] -