|
@@ -35,16 +35,14 @@
|
|
|
<img src="../../../assets/images/certification.png" />
|
|
<img src="../../../assets/images/certification.png" />
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
- <Button type="danger" :loading="buttonLoading" @click="onSubmit" round block>提交实名认证</Button>
|
|
|
|
|
|
|
+ <Button type="danger" :loading="buttonLoading" @click="onCheckCardNum" round block>提交实名认证</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- <component ref="componentRef" v-bind="{ memberUserId: getMemberUserId() }" :is="componentMap.get(componentId)" @closed="closeComponent"
|
|
|
|
|
- v-if="componentId" />
|
|
|
|
|
</app-view>
|
|
</app-view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, defineAsyncComponent, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { shallowRef, onMounted } from 'vue'
|
|
|
import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image } from 'vant'
|
|
import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image } from 'vant'
|
|
|
import { fullloading, dialog } from '@/utils/vant';
|
|
import { fullloading, dialog } from '@/utils/vant';
|
|
|
import { getFileUrl } from '@/filters';
|
|
import { getFileUrl } from '@/filters';
|
|
@@ -53,26 +51,17 @@ import { useRequest } from '@/hooks/request'
|
|
|
import { queryTencentUsereSignRecords, requestCheckCardNum } from '@/services/api/account';
|
|
import { queryTencentUsereSignRecords, requestCheckCardNum } from '@/services/api/account';
|
|
|
import { addAuthReq } from '@/business/user/account';
|
|
import { addAuthReq } from '@/business/user/account';
|
|
|
import { validateRules } from '@/constants/regex';
|
|
import { validateRules } from '@/constants/regex';
|
|
|
-import { useComponent } from '@/hooks/component'
|
|
|
|
|
import { useUserStore } from '@/stores'
|
|
import { useUserStore } from '@/stores'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
import AppUploader from '@mobile/components/base/uploader/index.vue'
|
|
import AppUploader from '@mobile/components/base/uploader/index.vue'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { getUserId, getMemberUserId } from '@/services/methods/user'
|
|
import { getUserId, getMemberUserId } from '@/services/methods/user'
|
|
|
|
|
|
|
|
-const componentMap = new Map<string, unknown>([
|
|
|
|
|
- ['certification-next', defineAsyncComponent(() => import('./components/certification-next/Index.vue'))], // 实名认证第二步
|
|
|
|
|
-])
|
|
|
|
|
-
|
|
|
|
|
const { router } = useNavigation()
|
|
const { router } = useNavigation()
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
const { formData, formSubmit, loading } = addAuthReq()
|
|
const { formData, formSubmit, loading } = addAuthReq()
|
|
|
|
|
|
|
|
-const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
|
|
- router.back()
|
|
|
|
|
-})
|
|
|
|
|
-
|
|
|
|
|
const isReadonly = false//computed(() => userESignRecords.value.some((e) => e.recordstatus === 3))
|
|
const isReadonly = false//computed(() => userESignRecords.value.some((e) => e.recordstatus === 3))
|
|
|
|
|
|
|
|
/// 查询记录
|
|
/// 查询记录
|
|
@@ -141,7 +130,7 @@ const onCheckCardNum = () => {
|
|
|
hideLoading()
|
|
hideLoading()
|
|
|
dialog('提交请求成功').then(() => {
|
|
dialog('提交请求成功').then(() => {
|
|
|
/// 进行下一步
|
|
/// 进行下一步
|
|
|
- openComponent('certification-next')
|
|
|
|
|
|
|
+ router.push({name: 'account-protocol', query: { memberUserId: getMemberUserId().toString() }})
|
|
|
})
|
|
})
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
hideLoading(err, 'fail')
|
|
hideLoading(err, 'fail')
|
|
@@ -152,14 +141,14 @@ const onCheckCardNum = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const onSubmit = () => {
|
|
|
|
|
- const isInclude = userESignRecords.value.some((e) => e.recordstatus === 1)
|
|
|
|
|
- if (!userESignRecords.value.length || isInclude) {
|
|
|
|
|
- formRef.value?.submit()
|
|
|
|
|
- } else {
|
|
|
|
|
- openComponent('certification-next')
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+// const onSubmit = () => {
|
|
|
|
|
+// const isInclude = userESignRecords.value.some((e) => e.recordstatus === 1)
|
|
|
|
|
+// if (!userESignRecords.value.length || isInclude) {
|
|
|
|
|
+// formRef.value?.submit()
|
|
|
|
|
+// } else {
|
|
|
|
|
+// openComponent('certification-next')
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
formData.mobile = userStore.userInfo?.mobile2 ?? ''
|
|
formData.mobile = userStore.userInfo?.mobile2 ?? ''
|