diff --git a/src/views/sunVillage_info/identity_check.vue b/src/views/sunVillage_info/identity_check.vue index abae2a09..50fd6c69 100644 --- a/src/views/sunVillage_info/identity_check.vue +++ b/src/views/sunVillage_info/identity_check.vue @@ -24,7 +24,7 @@ -
您已认证,3秒后进入页面...
+您已认证,{{ remainingSeconds }}秒后进入页面...
@@ -40,10 +40,22 @@ openPic:[], openPic2:[], responseData: null, + remainingSeconds: 3, // 剩余秒数,初始值为3秒 }; }, created() { 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: { deleteFile1(detail){ diff --git a/src/views/sunVillage_info/login_code.vue b/src/views/sunVillage_info/login_code.vue index 2fbf0cd9..a3703d6b 100644 --- a/src/views/sunVillage_info/login_code.vue +++ b/src/views/sunVillage_info/login_code.vue @@ -138,12 +138,9 @@ let expires = new Date(new Date() * 1 + seconds * 1000); getFamilyMemberList({idcard:this.formData.idcard,familyStatus:"02"}).then(res => { - const farmerCode = res.rows[0].farmerCode; - Cookies.set("farmerCode",farmerCode, { expires: 30 }); Cookies.set("user", response.data, { expires: expires }); - if (this.formData.identityCheck){ this.$router.push({ path: '/sunVillage_info/identity_check',