ljc 1 неделя назад
Родитель
Сommit
ddb752100d
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      pages/mine/improveImmediately.vue

+ 5 - 3
pages/mine/improveImmediately.vue

@@ -866,9 +866,9 @@ async function goStep(step: number) {
     }
     // 当前接口没有审核通过的请求接口,
     const {status,applyRealStatus} = userStore.userInfo.customInfo
-    // if (!(status == 2 || applyRealStatus == 1 || applyRealStatus == 2)){
+    if (!(status == 2 || applyRealStatus == 1 || applyRealStatus == 2)){
      await getOcrInfo()
-    // }
+    }
   }
   loadingStates.value.next = false
   currentStep.value = step
@@ -879,12 +879,14 @@ const getOcrInfo =async () => {
     let res = await personalApi.ocrResult()
     console.log(res)
     if (res.data){
-      const { idCard='',gender='男' ,birthDate='',address=''} = res.data
+      const { idCard='',gender='男' ,birthDate='',address='',names=['','']} = res.data
       formData.value = {
         identity:idCard,
         gender:gender=='男'?1:2,
         birth:Date.parse(new Date(birthDate).toString())/1000,
         addressLines1:address,
+        lastName:names[0],
+        firstName:names[1],
         ...formData.value,
       }
       console.log(formData.value)