|
|
@@ -551,7 +551,7 @@
|
|
|
<button class="btn btn-danger" type="primary" block @click="cancle">
|
|
|
{{ t('Btn.Cancel') }}
|
|
|
</button>
|
|
|
- <button block class="btn btn-danger" type="primary" @click="goStep(3)">
|
|
|
+ <button block class="btn btn-danger" type="primary" @click="goStep(3,true)">
|
|
|
{{ t('Btn.Last') }}
|
|
|
</button>
|
|
|
<button type="primary" class="btn btn-danger" block :loading="loadingStates.submit" @click="Submit">
|
|
|
@@ -566,7 +566,7 @@
|
|
|
<button class="btn btn-danger" type="primary" block @click="cancle">
|
|
|
{{ t('Btn.Cancel') }}
|
|
|
</button>
|
|
|
- <button block class="btn prev-btn btn-danger" type="primary" @click="goStep(2)">
|
|
|
+ <button block class="btn prev-btn btn-danger" type="primary" @click="goStep(2,true)">
|
|
|
{{ t('Btn.Last') }}
|
|
|
</button>
|
|
|
<button class="btn btn-danger" type="primary" block :loading="loadingStates.next" @click="goStep(4)">
|
|
|
@@ -581,7 +581,7 @@
|
|
|
<button class="btn btn-danger" type="primary" block @click="cancle">
|
|
|
{{ t('Btn.Cancel') }}
|
|
|
</button>
|
|
|
- <button block class="btn prev-btn btn-danger" type="primary" @click="goStep(1)">
|
|
|
+ <button block class="btn prev-btn btn-danger" type="primary" @click="goStep(1,true)">
|
|
|
{{ t('Btn.Last') }}
|
|
|
</button>
|
|
|
<button class="btn btn-danger" type="primary" block :loading="loadingStates.next" @click="goStep(3)">
|
|
|
@@ -849,33 +849,36 @@
|
|
|
currentStep.value = parseInt(options?.currentStep || '1', 10)
|
|
|
})
|
|
|
|
|
|
- async function goStep(step: number) {
|
|
|
+ async function goStep(step: number,isBack = false) {
|
|
|
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
|
|
|
- }
|
|
|
- }
|
|
|
- if (step == 2) {
|
|
|
- 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'))
|
|
|
+ // 返回不需要校验
|
|
|
+ if (!isBack){
|
|
|
+ if (step == 3) {
|
|
|
+ if (!formData.value?.identity) {
|
|
|
+ toast(t('vaildate.IDCard.empty'))
|
|
|
loadingStates.value.next = false
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- // 当前接口没有审核通过的请求接口,
|
|
|
- const { status, applyRealStatus } = userStore.userInfo.customInfo
|
|
|
- if (!(status == 2 || applyRealStatus == 1 || applyRealStatus == 2)) {
|
|
|
- await getOcrInfo()
|
|
|
+ if (step == 2) {
|
|
|
+ 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
|