2025-02-05 09:00:22 +00:00
|
|
|
<script setup>
|
|
|
|
import {useI18n} from "vue-i18n";
|
|
|
|
import XVanSelect from '@/components/x-van-select/index.vue'
|
|
|
|
import XVanDate from '@/components/x-van-date/index.vue'
|
2025-02-19 07:14:01 +00:00
|
|
|
import {codeAuthStore} from "@/stores-collect-code/auth/index.js";
|
|
|
|
import {message} from "@/components/x-message/useMessage.js";
|
2025-02-20 03:35:23 +00:00
|
|
|
import {fddInfo, offlineQrcode} from "~/api-collect-code/goods/index.js";
|
2025-02-19 07:14:01 +00:00
|
|
|
import {signOffline} from "~/api/goods/index.js";
|
2025-02-20 03:35:23 +00:00
|
|
|
const {formData,number,auctionArtworkUuid,qrUid,qrData}=codeAuthStore()
|
2025-02-05 09:00:22 +00:00
|
|
|
definePageMeta({
|
|
|
|
layout: 'default',
|
|
|
|
i18n: 'menu.profile',
|
|
|
|
})
|
|
|
|
|
2025-02-19 07:14:01 +00:00
|
|
|
const {t} = useI18n()
|
|
|
|
const router = useRouter()
|
|
|
|
const route = useRoute()
|
2025-02-05 09:00:22 +00:00
|
|
|
const columns = ref([
|
|
|
|
{text: t('realAuth.male'), value: 1},
|
|
|
|
{text: t('realAuth.female'), value: 2},
|
|
|
|
])
|
2025-02-19 07:14:01 +00:00
|
|
|
const columns1 = ref([
|
2025-02-28 07:29:00 +00:00
|
|
|
{text: t('realAuth.idTypeString'), value: 1},
|
2025-02-25 09:00:07 +00:00
|
|
|
{text: t('realAuth.passport'), value: 2},
|
|
|
|
{text: t('realAuth.other'), value: 3},
|
2025-02-19 07:14:01 +00:00
|
|
|
])
|
|
|
|
const goCountryRegion=()=>{
|
|
|
|
router.push({
|
|
|
|
path:'/countryRegion'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
function isFormComplete(obj) {
|
|
|
|
for (const key in obj) {
|
|
|
|
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
|
|
if (!isFormComplete(obj[key])) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
} else if (obj[key] === "") {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2025-02-20 03:35:23 +00:00
|
|
|
const getData=async ()=>{
|
|
|
|
const res=await offlineQrcode({
|
|
|
|
qrUid:qrUid.value
|
|
|
|
})
|
|
|
|
if (res.status===0){
|
|
|
|
qrData.value=res.data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const initData= async ()=>{
|
2025-02-19 07:36:45 +00:00
|
|
|
if (route.query.number){
|
2025-02-19 10:42:58 +00:00
|
|
|
number.value=Number(route.query.number)
|
|
|
|
}
|
2025-02-20 03:35:23 +00:00
|
|
|
if (route.query.qrUid){
|
|
|
|
qrUid.value=route.query.qrUid
|
2025-02-19 10:42:58 +00:00
|
|
|
}
|
2025-02-20 07:47:54 +00:00
|
|
|
//扫付款码进来才有的步骤
|
2025-02-20 10:30:48 +00:00
|
|
|
if (number.value==2){
|
2025-02-20 06:55:51 +00:00
|
|
|
await getData()
|
2025-02-20 07:47:54 +00:00
|
|
|
if (qrData.value.payStatus===4){
|
|
|
|
router.replace('/collectCode/payment')
|
|
|
|
}
|
2025-02-20 06:55:51 +00:00
|
|
|
}
|
2025-02-20 07:47:54 +00:00
|
|
|
|
2025-02-19 07:14:01 +00:00
|
|
|
if (route.query.zone){
|
|
|
|
formData.value.countryCode=route.query.zone
|
|
|
|
}else {
|
|
|
|
formData.value.countryCode='86'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const nextClick=async ()=>{
|
2025-02-19 10:42:58 +00:00
|
|
|
//扫号牌
|
2025-02-25 09:00:07 +00:00
|
|
|
if (number.value==1){
|
|
|
|
if (!isFormComplete(formData.value)){
|
|
|
|
message.warning(t('signature.error.incompleteForm'))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
//国内签署要用法大大
|
|
|
|
if (formData.value.countryCode==='86'&&formData.value.cardType===1){
|
|
|
|
const res=await fddInfo({
|
|
|
|
phone:formData.value.phone
|
|
|
|
})
|
|
|
|
if (res.status===0){
|
|
|
|
if (res.data.status===2){
|
|
|
|
router.push('/collectCode/signature/protocol')
|
|
|
|
}else {
|
|
|
|
const res1=await signOffline({
|
|
|
|
userInfo:formData.value,
|
|
|
|
signOrder:Number(number.value),
|
2025-02-27 01:46:51 +00:00
|
|
|
testReturnHost:window.location.origin,
|
|
|
|
testReturnEndPoint:'/collectCode/signature/protocol',
|
2025-02-25 09:00:07 +00:00
|
|
|
})
|
|
|
|
if (res1.status===0){
|
|
|
|
window.location.href=res1.data.fddVerifyUrl
|
|
|
|
}
|
2025-02-19 10:19:57 +00:00
|
|
|
}
|
|
|
|
}
|
2025-02-25 09:00:07 +00:00
|
|
|
} else {
|
|
|
|
//国外签署直接去确认然后签字版
|
|
|
|
router.push('/collectCode/signature/protocol')
|
|
|
|
}
|
|
|
|
} else if(number.value==2) {
|
|
|
|
if (!formData.value.phone || !formData.value.countryCode || !formData.value.userName){
|
|
|
|
message.warning('请填写完整信息')
|
|
|
|
return
|
2025-02-19 10:19:57 +00:00
|
|
|
}
|
|
|
|
router.push('/collectCode/signature/protocol')
|
2025-02-19 07:14:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
initData()
|
2025-02-05 09:00:22 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
2025-02-06 02:20:11 +00:00
|
|
|
class="w-[100vw] bg-[url('@/static/images/asdfsdd.png')] h-screen-nav bg-cover pt-77px flex-grow-1 flex flex-col ">
|
|
|
|
<div class="text-16px text-#191919 font-bold mb-40px px-34px">
|
2025-02-25 09:00:07 +00:00
|
|
|
{{ $t('personal.title') }}
|
2025-02-05 09:00:22 +00:00
|
|
|
</div>
|
2025-02-06 02:20:11 +00:00
|
|
|
<div class="grow-1 px-34px">
|
2025-02-25 09:00:07 +00:00
|
|
|
<van-field v-model="formData.phone" type="tel" :label-width="161" :label="$t('personal.text')" class="mb-10px" :placeholder="$t('realAuth.phonePlaceholder')">
|
2025-02-05 09:00:22 +00:00
|
|
|
<template #label>
|
|
|
|
<div class="flex">
|
2025-02-25 09:00:07 +00:00
|
|
|
<div class="mr-41px whitespace-nowrap">{{ $t('profile.phone') }}</div>
|
2025-02-19 07:14:01 +00:00
|
|
|
<div @click="goCountryRegion">
|
|
|
|
<span class="mr-13px">+ {{ formData.countryCode }}</span>
|
2025-02-05 09:00:22 +00:00
|
|
|
<van-icon name="arrow-down" class="text-#777777"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</van-field>
|
2025-02-25 09:00:07 +00:00
|
|
|
<van-field :label="$t('profile.name')" v-model="formData.userName" class="mb-10px" :placeholder="$t('realAuth.namePlaceholder')"/>
|
2025-02-20 03:35:23 +00:00
|
|
|
<template v-if="number===1">
|
2025-02-25 09:00:07 +00:00
|
|
|
<x-van-select v-model="formData.gender" :label="$t('realAuth.gender')" :columns="columns"/>
|
|
|
|
<x-van-date :label="$t('realAuth.birthday')" v-model="formData.birthday" />
|
|
|
|
<van-field :label="$t('realAuth.adress')" v-model="formData.address" class="mb-10px" :placeholder="$t('realAuth.adressPlaceholder')"/>
|
|
|
|
<van-field :label="$t('realAuth.bank')" v-model="formData.bankName" class="mb-10px" :placeholder="$t('realAuth.bankPlaceholder')"/>
|
|
|
|
<van-field :label="$t('realAuth.bankCard')" v-model="formData.bankNo" class="mb-10px" :placeholder="$t('realAuth.bankCardPlaceholder')"/>
|
2025-02-28 03:14:57 +00:00
|
|
|
<x-van-select v-model="formData.cardType" :label="$t('realAuth.idTye')" :columns="columns1"/>
|
2025-02-25 09:00:07 +00:00
|
|
|
<van-field :label="$t('realAuth.idCard')" v-model="formData.cardId" class="mb-10px" :placeholder="$t('realAuth.idCardPlaceholder')"/>
|
2025-02-28 03:14:57 +00:00
|
|
|
<x-van-select v-model="formData.gender" :label="$t('realAuth.gender')" :columns="columns"/>
|
2025-02-20 03:35:23 +00:00
|
|
|
</template>
|
|
|
|
|
2025-02-05 09:00:22 +00:00
|
|
|
</div>
|
2025-02-19 10:42:58 +00:00
|
|
|
<div class="h-81px bg-#fff flex justify-center pt-7px border-t shrink-0">
|
2025-02-25 09:00:07 +00:00
|
|
|
<van-button color="#2B53AC" class="w-213px van-btn-h-38px" @click="nextClick">{{ $t('personal.next') }}</van-button>
|
2025-02-06 02:20:11 +00:00
|
|
|
</div>
|
2025-02-05 09:00:22 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2025-02-06 02:20:11 +00:00
|
|
|
<style scoped lang="scss">
|
|
|
|
:deep(.van-cell.van-field){
|
|
|
|
padding-left: 0;
|
|
|
|
}
|
2025-02-05 09:00:22 +00:00
|
|
|
|
|
|
|
</style>
|