|
@@ -3,7 +3,7 @@
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<app-navbar :title="$t('user.authentication.title')" />
|
|
<app-navbar :title="$t('user.authentication.title')" />
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-if="userInfo">
|
|
|
|
|
|
|
+ <template v-if="userInfo && !loading">
|
|
|
<CellGroup title="认证信息" inset>
|
|
<CellGroup title="认证信息" inset>
|
|
|
<Cell :title="$t('user.authentication.customername')" :value="userInfo.customername" />
|
|
<Cell :title="$t('user.authentication.customername')" :value="userInfo.customername" />
|
|
|
<Cell :title="$t('user.authentication.cardtype')"
|
|
<Cell :title="$t('user.authentication.cardtype')"
|
|
@@ -29,57 +29,50 @@
|
|
|
:value="getAuthStatusName(userStore.userAccount.hasauth)" />
|
|
:value="getAuthStatusName(userStore.userAccount.hasauth)" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<div class="g-layout-block g-layout-block--inset"
|
|
<div class="g-layout-block g-layout-block--inset"
|
|
|
- v-if="userStore.userAccount.hasauth === AuthStatus.Rejected">
|
|
|
|
|
|
|
+ v-if="userStore.userAccount.hasauth === AuthStatus.Rejected && userStore.userAccount.modifystatus === 1">
|
|
|
<Button type="primary" round block @click="routerTo('account-certification')">重新认证</Button>
|
|
<Button type="primary" round block @click="routerTo('account-certification')">重新认证</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- <Empty :description="$t('common.nodatas')" v-else-if="!loading" />
|
|
|
|
|
</app-view>
|
|
</app-view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, onActivated } from 'vue'
|
|
|
|
|
-import { Button, CellGroup, Cell, Image, Empty, showLoadingToast } from 'vant'
|
|
|
|
|
|
|
+import { shallowRef, onActivated, computed } from 'vue'
|
|
|
|
|
+import { Button, CellGroup, Cell, Image, showLoadingToast } from 'vant'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { AuthStatus, getAuthStatusName } from '@/constants/account'
|
|
import { AuthStatus, getAuthStatusName } from '@/constants/account'
|
|
|
import { queryWrDraftUserInfo } from '@/services/api/account'
|
|
import { queryWrDraftUserInfo } from '@/services/api/account'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { getCertificateTypeCodeName } from '@/constants/account'
|
|
import { getCertificateTypeCodeName } from '@/constants/account'
|
|
|
import { getFileUrl } from '@/filters'
|
|
import { getFileUrl } from '@/filters'
|
|
|
-import { decryptAES } from '@/services/websocket/package/crypto'
|
|
|
|
|
import { getWskhOpenAccountConfigs } from '@/services/api/account'
|
|
import { getWskhOpenAccountConfigs } from '@/services/api/account'
|
|
|
-import { i18n, useUserStore } from "@/stores"
|
|
|
|
|
|
|
+import { i18n, useUserStore } from '@/stores'
|
|
|
|
|
|
|
|
const { routerTo } = useNavigation()
|
|
const { routerTo } = useNavigation()
|
|
|
|
|
|
|
|
const { t } = i18n.global
|
|
const { t } = i18n.global
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
-const userInfo = shallowRef<Model.UserInfo>()
|
|
|
|
|
const showHalfBodyPhoto = shallowRef(false)
|
|
const showHalfBodyPhoto = shallowRef(false)
|
|
|
const showCardBackPhoto = shallowRef(false)
|
|
const showCardBackPhoto = shallowRef(false)
|
|
|
const halfBodyPhotoTitle = shallowRef('')
|
|
const halfBodyPhotoTitle = shallowRef('')
|
|
|
|
|
|
|
|
-const toast = showLoadingToast({
|
|
|
|
|
- duration: 0,
|
|
|
|
|
- message: '加载中...'
|
|
|
|
|
-})
|
|
|
|
|
|
|
+const toast = showLoadingToast({ duration: 0 })
|
|
|
|
|
|
|
|
-/// 查询托管银行信息
|
|
|
|
|
-const { loading, run } = useRequest(queryWrDraftUserInfo, {
|
|
|
|
|
|
|
+// 查询实名认证信息
|
|
|
|
|
+const { data, loading, run } = useRequest(queryWrDraftUserInfo, {
|
|
|
manual: true,
|
|
manual: true,
|
|
|
onSuccess: (res) => {
|
|
onSuccess: (res) => {
|
|
|
- /// 签约状态
|
|
|
|
|
- userInfo.value = res.data[0] ?? {
|
|
|
|
|
- ...userStore.userInfo,
|
|
|
|
|
- cardnum: decryptAES(userStore.userInfo.cardnum),
|
|
|
|
|
- bankaccount: decryptAES(userStore.userInfo.bankaccount),
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ data.value = res.data[0]
|
|
|
},
|
|
},
|
|
|
onFinally: () => {
|
|
onFinally: () => {
|
|
|
- toast.close()
|
|
|
|
|
|
|
+ userStore.getUserData().finally(() => {
|
|
|
|
|
+ toast.close()
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const userInfo = computed(() => data.value ?? userStore.userInfo)
|
|
|
|
|
+
|
|
|
// 获取网上开户配置
|
|
// 获取网上开户配置
|
|
|
useRequest(getWskhOpenAccountConfigs, {
|
|
useRequest(getWskhOpenAccountConfigs, {
|
|
|
defaultParams: {
|
|
defaultParams: {
|
|
@@ -96,7 +89,7 @@ useRequest(getWskhOpenAccountConfigs, {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
onActivated(() => {
|
|
onActivated(() => {
|
|
|
- toast.open({})
|
|
|
|
|
|
|
+ toast.open({ message: '加载中...' })
|
|
|
run()
|
|
run()
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|