@@ -24,7 +24,7 @@ | |||||
<!-- <img class="img_block" src="../../assets/images/sunVillage_info/check_icon_02.png" alt="">--> | <!-- <img class="img_block" src="../../assets/images/sunVillage_info/check_icon_02.png" alt="">--> | ||||
<p class="text_block">您已认证,<span>3</span>秒后进入页面...</p> | |||||
<p class="text_block">您已认证,<span>{{ remainingSeconds }}</span>秒后进入页面...</p> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -40,10 +40,22 @@ | |||||
openPic:[], | openPic:[], | ||||
openPic2:[], | openPic2:[], | ||||
responseData: null, | responseData: null, | ||||
remainingSeconds: 3, // 剩余秒数,初始值为3秒 | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.responseData = this.$route.query.responseData; | this.responseData = this.$route.query.responseData; | ||||
// 判断是否已认证 | |||||
if (this.responseData.isFacial === 'Y') { | |||||
const countdownInterval = setInterval(() => { | |||||
if (this.remainingSeconds === 0) { | |||||
clearInterval(countdownInterval); // 清除计时器 | |||||
this.$router.push({ path: '/sunVillage_info/index_code_rights' }); | |||||
} else { | |||||
this.remainingSeconds--; | |||||
} | |||||
}, 1000); // 1000 毫秒等于1秒 | |||||
} | |||||
}, | }, | ||||
methods: { | methods: { | ||||
deleteFile1(detail){ | deleteFile1(detail){ | ||||
@@ -138,12 +138,9 @@ | |||||
let expires = new Date(new Date() * 1 + seconds * 1000); | let expires = new Date(new Date() * 1 + seconds * 1000); | ||||
getFamilyMemberList({idcard:this.formData.idcard,familyStatus:"02"}).then(res => { | getFamilyMemberList({idcard:this.formData.idcard,familyStatus:"02"}).then(res => { | ||||
const farmerCode = res.rows[0].farmerCode; | const farmerCode = res.rows[0].farmerCode; | ||||
Cookies.set("farmerCode",farmerCode, { expires: 30 }); | Cookies.set("farmerCode",farmerCode, { expires: 30 }); | ||||
Cookies.set("user", response.data, { expires: expires }); | Cookies.set("user", response.data, { expires: expires }); | ||||
if (this.formData.identityCheck){ | if (this.formData.identityCheck){ | ||||
this.$router.push({ | this.$router.push({ | ||||
path: '/sunVillage_info/identity_check', | path: '/sunVillage_info/identity_check', | ||||