|
|
@@ -2,7 +2,7 @@
|
|
|
<app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
|
|
|
<app-view class="g-form account-certification">
|
|
|
<template #header>
|
|
|
- <app-navbar title="实名认证" />
|
|
|
+ <app-navbar title="实名认证" @back="closed" />
|
|
|
</template>
|
|
|
<CellGroup inset>
|
|
|
<Cell title="姓名" :value="formData.name" />
|
|
|
@@ -11,20 +11,20 @@
|
|
|
<Cell title="证件号码" :value="formData.idCard" />
|
|
|
<Field name="idCardPhoto" label="证件正面照片">
|
|
|
<template #input>
|
|
|
- <image :src="idCardPhoto"></image>
|
|
|
+ <Image :src="idCardPhoto" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
<Field name="idCardPhotoBackURL" label="证件反面照片">
|
|
|
<template #input>
|
|
|
- <image :src="idCardPhotoBackURL"></image>
|
|
|
+ <Image :src="idCardPhotoBackURL" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
</CellGroup>
|
|
|
<CellGroup inset>
|
|
|
<Cell v-for="(item, index) in dataList" :key="index" @click="signer(item)">
|
|
|
<template #title>
|
|
|
- <Icon color="#00CCFF" :name="iconName(item.recordstatus)"></Icon>
|
|
|
- <Button :disable="item.recordstatus === 2" :text="true">{{ item.templatename }}</Button>
|
|
|
+ <Icon color="#CC0000" :name="iconName(item.recordstatus)"></Icon>
|
|
|
+ <Button :disable="item.recordstatus === 2">{{ item.templatename }}</Button>
|
|
|
</template>
|
|
|
</Cell>
|
|
|
</CellGroup>
|
|
|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef, computed, PropType} from 'vue'
|
|
|
-import { CellGroup, Button, Cell, Field, Icon, showFailToast } from 'vant'
|
|
|
+import { CellGroup, Button, Cell, Field, Icon, showFailToast, Image } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant';
|
|
|
import { getAQCertificateTypeListName } from "@/constants/account";
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
@@ -62,27 +62,25 @@ const canAdd = shallowRef(false)
|
|
|
|
|
|
const iconName = (type: number) => {
|
|
|
switch (type) {
|
|
|
- case 1:
|
|
|
- return 'circle'
|
|
|
- case 2:
|
|
|
- return 'circle'
|
|
|
+ case 4:
|
|
|
+ return 'close'
|
|
|
case 3:
|
|
|
return 'passed'
|
|
|
default:
|
|
|
- return 'close'
|
|
|
+ return 'circle'
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 正面照
|
|
|
const idCardPhoto = computed(() => {
|
|
|
const idCardPhoto = props.formData.idCardPhoto ?? ''
|
|
|
- return idCardPhoto.split(',').map((path) => getFileUrl(path))
|
|
|
+ return idCardPhoto.split(',').map((path) => getFileUrl(path))[0]
|
|
|
})
|
|
|
|
|
|
// 背面照
|
|
|
const idCardPhotoBackURL = computed(() => {
|
|
|
const idCardPhotoBackURL = props.formData.idCardPhotoBackURL ?? ''
|
|
|
- return idCardPhotoBackURL.split(',').map((path) => getFileUrl(path))
|
|
|
+ return idCardPhotoBackURL.split(',').map((path) => getFileUrl(path))[0]
|
|
|
})
|
|
|
|
|
|
const openURL = (url: string) => {
|
|
|
@@ -101,7 +99,7 @@ const completed = () => {
|
|
|
signCompleted().then(() => {
|
|
|
hideLoading()
|
|
|
dialog('实名认证提交请求成功').then(() => {
|
|
|
- // router.back()
|
|
|
+ closed(true)
|
|
|
})
|
|
|
}).catch((err) => {
|
|
|
showFailToast(err)
|
|
|
@@ -123,7 +121,7 @@ const signer = (item: Model.UserESignRecordRsq) => {
|
|
|
/// 创建合同
|
|
|
createSigner().then((res) => {
|
|
|
hideLoading()
|
|
|
- openURL(res.data.data)
|
|
|
+ openURL(res.data.signUrl)
|
|
|
}).catch((err) => {
|
|
|
showFailToast(err)
|
|
|
})
|
|
|
@@ -148,4 +146,15 @@ onMounted(() => {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
+// 关闭弹窗
|
|
|
+const closed = (isRefresh = false) => {
|
|
|
+ refresh.value = isRefresh
|
|
|
+ showModal.value = false
|
|
|
+}
|
|
|
+
|
|
|
+// 暴露组件属性给父组件调用
|
|
|
+defineExpose({
|
|
|
+ closed,
|
|
|
+})
|
|
|
</script>
|