feat(auth): 新增合同用户信息验证功能
- 在 auth API 中添加了 contractUserinfo 函数,用于验证用户信息 - 在签名协议页面中集成了合同用户信息验证功能 - 优化了验证状态的显示逻辑,增加了"验证中..."状态 - 调整了直播室广播组件的更新频率
This commit is contained in:
parent
5fe9645cfb
commit
9ee59626a5
@ -37,3 +37,10 @@ export async function userCaptchaValidate(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export async function contractUserinfo(data) {
|
||||||
|
return await request( {
|
||||||
|
url:'/api/v1/contract/userinfo',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
@ -148,11 +148,13 @@
|
|||||||
>
|
>
|
||||||
<transition name="fade-slide">
|
<transition name="fade-slide">
|
||||||
<div
|
<div
|
||||||
v-if="verifyStatus.show"
|
v-if="verifyStatus.show || isVerifying"
|
||||||
class="absolute left-0 bottom-0 w-full h-25px leading-25px text-center text-14px text-white"
|
:class="`absolute left-0 bottom-0 w-full h-25px leading-25px text-center text-14px text-white ${
|
||||||
:class="verifyStatus.type === 'success' ? 'bg-#52c41a' : 'bg-#ff4d4f'"
|
isVerifying ? 'bg-#3B91FF' :
|
||||||
|
verifyStatus.type === 'success' ? 'bg-#52c41a' : 'bg-#ff4d4f'
|
||||||
|
}`"
|
||||||
>
|
>
|
||||||
{{ verifyStatus.message }}
|
{{ isVerifying ? '验证中...' : verifyStatus.message }}
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
@ -42,7 +42,7 @@ onMounted(async()=>{
|
|||||||
await fetchBuyList()
|
await fetchBuyList()
|
||||||
timer.value = setInterval(async () => {
|
timer.value = setInterval(async () => {
|
||||||
await fetchBuyList()
|
await fetchBuyList()
|
||||||
}, 10000)
|
}, 5000)
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
@ -5,6 +5,7 @@ import { signOnline } from "~/api/goods/index.js"
|
|||||||
import { authStore } from "~/stores/auth/index.js"
|
import { authStore } from "~/stores/auth/index.js"
|
||||||
import {useI18n} from "vue-i18n";
|
import {useI18n} from "vue-i18n";
|
||||||
import { useThrottleFn } from '@vueuse/core'
|
import { useThrottleFn } from '@vueuse/core'
|
||||||
|
import { contractUserinfo } from "@/api/auth/index.js"
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default',
|
layout: 'default',
|
||||||
i18n: 'signature.protocol.title'
|
i18n: 'signature.protocol.title'
|
||||||
@ -47,7 +48,17 @@ const handleCollapseChange = (name) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goSignature =useThrottleFn(async () => {
|
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({
|
const res = await signOnline({
|
||||||
auctionArtworkUuid:payment.value.auctionArtworkUuid
|
auctionArtworkUuid:payment.value.auctionArtworkUuid
|
||||||
})
|
})
|
||||||
@ -66,6 +77,10 @@ const goSignature =useThrottleFn(async () => {
|
|||||||
path: '/signature/panel'
|
path: '/signature/panel'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},2000)
|
},2000)
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user