|
|
@@ -861,11 +861,13 @@ onLoad((options) => {
|
|
|
currentStep.value = parseInt(options?.currentStep || '1', 10)
|
|
|
})
|
|
|
|
|
|
-function goStep(step: number) {
|
|
|
+async function goStep(step: number) {
|
|
|
console.log(step, 'step')
|
|
|
+ loadingStates.value.next = true
|
|
|
if (step == 3){
|
|
|
if (!formData.value?.identity){
|
|
|
toast(t('vaildate.IDCard.empty'))
|
|
|
+ loadingStates.value.next = false
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
@@ -873,17 +875,46 @@ function goStep(step: number) {
|
|
|
if (currentUploadCard.value == 1) {
|
|
|
if (!formData.value.cardType) {
|
|
|
toast( t('vaildate.CardType.empty'))
|
|
|
+ loadingStates.value.next = false
|
|
|
return
|
|
|
}
|
|
|
if (!fileListID1.value.path || !fileListID2.value.path) {
|
|
|
toast( t('vaildate.IDPhoto.empty'))
|
|
|
+ loadingStates.value.next = false
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+ // 当前接口没有审核通过的请求接口,
|
|
|
+ const {status,applyRealStatus} = userStore.userInfo.customInfo
|
|
|
+ // if (!(status == 2 || applyRealStatus == 1 || applyRealStatus == 2)){
|
|
|
+ await getOcrInfo()
|
|
|
+ // }
|
|
|
}
|
|
|
+ loadingStates.value.next = false
|
|
|
currentStep.value = step
|
|
|
}
|
|
|
|
|
|
+const getOcrInfo =async () => {
|
|
|
+ try {
|
|
|
+ let res = await personalApi.ocrResult()
|
|
|
+ console.log(res)
|
|
|
+ if (res.data){
|
|
|
+ const { idCard='',gender='男' ,birthDate='',address=''} = res.data
|
|
|
+ formData.value = {
|
|
|
+ identity:idCard,
|
|
|
+ gender:gender=='男'?1:2,
|
|
|
+ birth:Date.parse(new Date(birthDate).toString())/1000,
|
|
|
+ addressLines1:address,
|
|
|
+ ...formData.value,
|
|
|
+ }
|
|
|
+ console.log(formData.value)
|
|
|
+ }
|
|
|
+ }catch (error) {
|
|
|
+ loadingStates.value.next = false
|
|
|
+ toast(error.msg)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 选项数据
|
|
|
const customerTypeOptions = computed(()=>[
|
|
|
{ value: 1, text: t('ImproveImmediately.Label.CustomerType1') },
|