2025-02-05 09:00:22 +00:00
|
|
|
<script setup>
|
2025-03-04 11:06:01 +00:00
|
|
|
import { useI18n } from "vue-i18n";
|
|
|
|
import XVanSelect from "@/components/x-van-select/index.vue";
|
|
|
|
import XVanDate from "@/components/x-van-date/index.vue";
|
|
|
|
import { codeAuthStore } from "@/stores-collect-code/auth/index.js";
|
|
|
|
import { message } from "@/components/x-message/useMessage.js";
|
|
|
|
import { fddInfo, offlineQrcode } from "~/api-collect-code/goods/index.js";
|
|
|
|
import { signOffline } from "~/api/goods/index.js";
|
|
|
|
const { formData, number, auctionArtworkUuid, qrUid, qrData } = codeAuthStore();
|
2025-02-05 09:00:22 +00:00
|
|
|
definePageMeta({
|
2025-03-04 11:06:01 +00:00
|
|
|
layout: "default",
|
|
|
|
i18n: "menu.profile",
|
|
|
|
});
|
2025-02-05 09:00:22 +00:00
|
|
|
|
2025-03-04 11:06:01 +00:00
|
|
|
const { t } = useI18n();
|
|
|
|
const router = useRouter();
|
|
|
|
const route = useRoute();
|
2025-02-05 09:00:22 +00:00
|
|
|
const columns = ref([
|
2025-03-04 11:06:01 +00:00
|
|
|
{ text: t("realAuth.male"), value: 1 },
|
|
|
|
{ text: t("realAuth.female"), value: 2 },
|
|
|
|
]);
|
2025-02-19 07:14:01 +00:00
|
|
|
const columns1 = ref([
|
2025-03-04 11:06:01 +00:00
|
|
|
{ text: t("realAuth.idTypeString"), value: 1 },
|
|
|
|
{ text: t("realAuth.passport"), value: 2 },
|
|
|
|
{ text: t("realAuth.other"), value: 3 },
|
|
|
|
]);
|
|
|
|
const goCountryRegion = () => {
|
2025-02-19 07:14:01 +00:00
|
|
|
router.push({
|
2025-03-04 11:06:01 +00:00
|
|
|
path: "/countryRegion",
|
|
|
|
});
|
|
|
|
};
|
2025-02-19 07:14:01 +00:00
|
|
|
function isFormComplete(obj) {
|
|
|
|
for (const key in obj) {
|
2025-03-04 11:06:01 +00:00
|
|
|
if (typeof obj[key] === "object" && obj[key] !== null) {
|
2025-02-19 07:14:01 +00:00
|
|
|
if (!isFormComplete(obj[key])) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
} else if (obj[key] === "") {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2025-03-04 11:06:01 +00:00
|
|
|
const getData = async () => {
|
|
|
|
const res = await offlineQrcode({
|
|
|
|
qrUid: qrUid.value,
|
|
|
|
});
|
|
|
|
if (res.status === 0) {
|
|
|
|
qrData.value = res.data;
|
2025-02-20 03:35:23 +00:00
|
|
|
}
|
2025-03-04 11:06:01 +00:00
|
|
|
};
|
|
|
|
const initData = async () => {
|
|
|
|
if (route.query.number) {
|
|
|
|
number.value = Number(route.query.number);
|
2025-02-19 10:42:58 +00:00
|
|
|
}
|
2025-03-04 11:06:01 +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-03-04 11:06:01 +00:00
|
|
|
if (number.value == 2) {
|
|
|
|
await getData();
|
|
|
|
if (qrData.value.payStatus === 4) {
|
|
|
|
router.replace("/collectCode/payment");
|
2025-02-20 07:47:54 +00:00
|
|
|
}
|
2025-02-20 06:55:51 +00:00
|
|
|
}
|
2025-02-20 07:47:54 +00:00
|
|
|
|
2025-03-04 11:06:01 +00:00
|
|
|
if (route.query.zone) {
|
|
|
|
formData.value.countryCode = route.query.zone;
|
|
|
|
} else {
|
|
|
|
formData.value.countryCode = "86";
|
2025-02-19 07:14:01 +00:00
|
|
|
}
|
2025-03-04 11:06:01 +00:00
|
|
|
};
|
|
|
|
const nextClick = async () => {
|
2025-02-19 10:42:58 +00:00
|
|
|
//扫号牌
|
2025-03-04 11:06:01 +00:00
|
|
|
if (number.value == 2) {
|
|
|
|
if (
|
|
|
|
!formData.value.phone ||
|
|
|
|
!formData.value.countryCode ||
|
|
|
|
!formData.value.userName
|
|
|
|
) {
|
|
|
|
message.warning("请填写完整信息");
|
|
|
|
return;
|
2025-02-25 09:00:07 +00:00
|
|
|
}
|
2025-03-04 11:06:01 +00:00
|
|
|
router.push("/collectCode/signature/protocol");
|
2025-02-19 07:14:01 +00:00
|
|
|
}
|
2025-03-04 11:06:01 +00:00
|
|
|
};
|
|
|
|
initData();
|
2025-02-05 09:00:22 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
2025-03-04 11:06:01 +00:00
|
|
|
class="w-[100vw] bg-[url('@/static/images/asdfsdd.png')] h-screen-nav bg-cover pt-77px flex-grow-1 flex flex-col"
|
|
|
|
>
|
2025-02-06 02:20:11 +00:00
|
|
|
<div class="text-16px text-#191919 font-bold mb-40px px-34px">
|
2025-03-04 11:06:01 +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-03-04 11:06:01 +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-03-04 11:06:01 +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-03-04 11:06:01 +00:00
|
|
|
<van-icon name="arrow-down" class="text-#777777" />
|
2025-02-05 09:00:22 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</van-field>
|
2025-03-04 11:06:01 +00:00
|
|
|
<van-field
|
|
|
|
:label="$t('profile.name')"
|
|
|
|
v-model="formData.userName"
|
|
|
|
class="mb-10px"
|
|
|
|
:placeholder="$t('realAuth.namePlaceholder')"
|
|
|
|
/>
|
|
|
|
<template v-if="number === 1">
|
|
|
|
<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')"
|
|
|
|
/>
|
|
|
|
<x-van-select
|
|
|
|
v-model="formData.cardType"
|
|
|
|
:label="$t('realAuth.idTye')"
|
|
|
|
:columns="columns1"
|
|
|
|
/>
|
|
|
|
<van-field
|
|
|
|
:label="$t('realAuth.idCard')"
|
|
|
|
v-model="formData.cardId"
|
|
|
|
class="mb-10px"
|
|
|
|
:placeholder="$t('realAuth.idCardPlaceholder')"
|
|
|
|
/>
|
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-03-04 11:06:01 +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">
|
2025-03-04 11:06:01 +00:00
|
|
|
:deep(.van-cell.van-field) {
|
2025-02-06 02:20:11 +00:00
|
|
|
padding-left: 0;
|
|
|
|
}
|
2025-03-04 11:06:01 +00:00
|
|
|
</style>
|