Index.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <app-view class="g-form">
  3. <template #header>
  4. <app-navbar title="实名认证" />
  5. </template>
  6. <div class="g-form__container" v-if="userInfo">
  7. <CellGroup inset>
  8. <Cell title="姓名" :value="userInfo.customername" />
  9. <Cell title="证件类型" :value="getCertificateTypeCodeName(userInfo.cardtypeid)" />
  10. <Cell title="证件号码" :value="userInfo.cardnum" />
  11. <Cell title="证件正面照片">
  12. <Image fit="contain" :src="getFileUrl(userInfo.cardfrontphotourl)" width="100" height="100" />
  13. </Cell>
  14. <Cell title="证件反面照片" v-if="showCardBackPhoto === '1'">
  15. <Image fit="contain" :src="getFileUrl(userInfo.cardbackphotourl)" width="100" height="100" />
  16. </Cell>
  17. <Cell title="手持证件照" v-if="showHalfBodyPhoto === '1'">
  18. <Image fit="contain" :src="getFileUrl(userInfo.halfbodyphotourl)" width="100" height="100" />
  19. </Cell>
  20. <Cell title="实名状态" :value="getAuthStatusName(2)" />
  21. </CellGroup>
  22. </div>
  23. <Empty description="暂无数据" v-else />
  24. </app-view>
  25. </template>
  26. <script lang="ts" setup>
  27. import { shallowRef } from 'vue'
  28. import { CellGroup, Cell, Image, Empty } from 'vant'
  29. import { getAuthStatusName } from '@/constants/account'
  30. import { queryWrDraftUserInfo } from '@/services/api/account'
  31. import { useRequest } from '@/hooks/request'
  32. import { getCertificateTypeCodeName } from '@/constants/account'
  33. import { getFileUrl } from '@/filters'
  34. import { getWskhOpenAccountConfigs } from '@/services/api/account'
  35. const userInfo = shallowRef<Model.UserInfo>()
  36. const showHalfBodyPhoto = shallowRef('0')
  37. const showCardBackPhoto = shallowRef('0')
  38. /// 查询托管银行信息
  39. useRequest(queryWrDraftUserInfo, {
  40. onSuccess: (res) => {
  41. /// 签约状态
  42. userInfo.value = res.data[0]
  43. }
  44. })
  45. // 获取网上开户配置
  46. useRequest(getWskhOpenAccountConfigs, {
  47. params: {
  48. configs: '53,54'
  49. },
  50. onSuccess: (res) => {
  51. /// 是否显示半身照和 证件背面照
  52. showHalfBodyPhoto.value = res.data.filter(e => { e.configid === 54})[0].configvalue ?? '0'
  53. showCardBackPhoto.value = res.data.filter(e => { e.configid === 53})[0].configvalue ?? '0'
  54. }
  55. })
  56. </script>