From 9ee59626a53f62017acba2cae72a4e52b5938616 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:37:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(auth):=20=E6=96=B0=E5=A2=9E=E5=90=88?= =?UTF-8?q?=E5=90=8C=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 auth API 中添加了 contractUserinfo 函数,用于验证用户信息 - 在签名协议页面中集成了合同用户信息验证功能 - 优化了验证状态的显示逻辑,增加了"验证中..."状态 - 调整了直播室广播组件的更新频率 --- app/api/auth/index.js | 7 +++++++ app/components/puzzleComponent/index.vue | 10 ++++++---- .../components/broadcast/index.vue | 2 +- app/pages/signature/protocol/index.vue | 17 ++++++++++++++++- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/app/api/auth/index.js b/app/api/auth/index.js index b1056b6..87fdd22 100644 --- a/app/api/auth/index.js +++ b/app/api/auth/index.js @@ -36,4 +36,11 @@ export async function userCaptchaValidate(data) { method: 'POST', data }) +} +export async function contractUserinfo(data) { + return await request( { + url:'/api/v1/contract/userinfo', + method: 'POST', + data + }) } \ No newline at end of file diff --git a/app/components/puzzleComponent/index.vue b/app/components/puzzleComponent/index.vue index c031771..a95cfde 100644 --- a/app/components/puzzleComponent/index.vue +++ b/app/components/puzzleComponent/index.vue @@ -148,11 +148,13 @@ >
- {{ verifyStatus.message }} + {{ isVerifying ? '验证中...' : verifyStatus.message }}
diff --git a/app/pages/publicLiveRoom/components/broadcast/index.vue b/app/pages/publicLiveRoom/components/broadcast/index.vue index 9c4235c..0f3de41 100644 --- a/app/pages/publicLiveRoom/components/broadcast/index.vue +++ b/app/pages/publicLiveRoom/components/broadcast/index.vue @@ -42,7 +42,7 @@ onMounted(async()=>{ await fetchBuyList() timer.value = setInterval(async () => { await fetchBuyList() - }, 10000) + }, 5000) }) onUnmounted(() => { diff --git a/app/pages/signature/protocol/index.vue b/app/pages/signature/protocol/index.vue index 718c49a..da3c71f 100644 --- a/app/pages/signature/protocol/index.vue +++ b/app/pages/signature/protocol/index.vue @@ -5,6 +5,7 @@ import { signOnline } from "~/api/goods/index.js" import { authStore } from "~/stores/auth/index.js" import {useI18n} from "vue-i18n"; import { useThrottleFn } from '@vueuse/core' +import { contractUserinfo } from "@/api/auth/index.js" definePageMeta({ layout: 'default', i18n: 'signature.protocol.title' @@ -47,7 +48,17 @@ const handleCollapseChange = (name) => { } const goSignature =useThrottleFn(async () => { - if(userInfo.value.userExtend.isMainland===1){ + //先走特殊验证接口 + const res1 = await contractUserinfo({phone:userInfo.value.telNum}) + if(res1.status===0){ + //特殊验证通过 + if(res1.data.specialType===1){ + router.push({ + path: '/signature/panel' + }) + }else if(res1.data.specialType===0){ + //特殊验证不通过 + if(userInfo.value.userExtend.isMainland===1){ const res = await signOnline({ auctionArtworkUuid:payment.value.auctionArtworkUuid }) @@ -66,6 +77,10 @@ const goSignature =useThrottleFn(async () => { path: '/signature/panel' }) } + } + } + + },2000)