feat: 对接部分接口
This commit is contained in:
@@ -38,6 +38,36 @@
|
||||
v-model="form.cardnum"
|
||||
/>
|
||||
</view>
|
||||
<view class="py-15 text-14">
|
||||
<view class="flex items-center">
|
||||
<image src="@/static/images/page-sub/realname/realname-card.png" class="w-20 h-20" />
|
||||
<view class="ml-8">证件照片</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex items-center justify-center mt-15 rounded-10 bg-#F1F9FC h-168 w-full"
|
||||
@click="onUploadZCardImage"
|
||||
>
|
||||
<view v-if="!zcardimage" class="text-center">
|
||||
<image src="@/static/images/page-sub/realname/upload-icon.png" class="w-40 h-40" />
|
||||
<view class="text-14 text-#999 mt-10">点击上传身份证正面</view>
|
||||
</view>
|
||||
<view v-else class="flex items-center">
|
||||
<image :src="zcardimage" class="w-315 h-168" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex items-center justify-center mt-15 rounded-10 bg-#F1F9FC h-168 w-full"
|
||||
@click="onUploadFCardImage"
|
||||
>
|
||||
<view v-if="!fcardimage" class="text-center">
|
||||
<image src="@/static/images/page-sub/realname/upload-icon.png" class="w-40 h-40" />
|
||||
<view class="text-14 text-#999 mt-10">点击上传身份证反面</view>
|
||||
</view>
|
||||
<view v-else class="flex items-center">
|
||||
<image :src="fcardimage" class="w-315 h-168" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed bottom-0 left-0 right-0 pb-safe">
|
||||
<button class="btn-gradient text-white rounded-full m-15 text-16" @click="onSubmit">
|
||||
@@ -112,7 +142,15 @@ const onSubmit = async () => {
|
||||
await showModal('请填写完整信息')
|
||||
return
|
||||
}
|
||||
await realNameAuthAPI(form.value)
|
||||
if (!zcardimage.value || !fcardimage.value) {
|
||||
await showModal('请上传身份证照片')
|
||||
return
|
||||
}
|
||||
await realNameAuthAPI({
|
||||
...form.value,
|
||||
zcardimage: zcardimage.value,
|
||||
fcardimage: fcardimage.value,
|
||||
})
|
||||
await showModal('提交成功,请耐心等待审核!')
|
||||
realnameInfo.value = await getRealNameAuthAPI().then((res) => {
|
||||
return res.data
|
||||
@@ -125,6 +163,9 @@ const onGoHome = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const { data: zcardimage, run: onUploadZCardImage } = useUpload()
|
||||
const { data: fcardimage, run: onUploadFCardImage } = useUpload()
|
||||
|
||||
const realnameInfo = ref(null)
|
||||
onLoad(async () => {
|
||||
realnameInfo.value = await getRealNameAuthAPI().then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user