Sfoglia il codice sorgente

人脸识别

rongxin_prod
QI_YUJIE 1 anno fa
parent
commit
a055524f2e
2 ha cambiato i file con 19 aggiunte e 4 eliminazioni
  1. +8
    -0
      src/api/sunVillage_info/fixedAssets.js
  2. +11
    -4
      src/views/sunVillage_info/login_code.vue

+ 8
- 0
src/api/sunVillage_info/fixedAssets.js Vedi File

@@ -482,6 +482,14 @@ export function checkFarmer(data) {
})
}

// 是否允许人脸验证
export function allowFaceVerify() {
return request({
url: '/register/face/verified/allow',
method: 'get'
})
}

// 查询投票主题详细
export function getPoll(id) {
return request({


+ 11
- 4
src/views/sunVillage_info/login_code.vue Vedi File

@@ -36,10 +36,11 @@
<!-- <img :src="codeUrl" @click="getCode" />-->
<!-- </div>-->
<!-- </div>-->
<div style="display: flex;align-items: center;justify-content: space-between;">
<!-- <div style="display: flex;align-items: center;justify-content: space-between;">
<van-checkbox v-model="formData.identityCheck">核身校验</van-checkbox>
<van-checkbox v-model="formData.rememberMe">记住我的信息</van-checkbox>
</div>
</div> -->
<van-checkbox v-model="formData.rememberMe">记住我的信息</van-checkbox>
</div>
<div class="login_btn">
<!-- <div class="btn" :loading="loading">登录</div>-->
@@ -60,7 +61,7 @@

<script>
import { getCodeImg, getSmsCode } from "@/api/login";
import { checkFarmer } from "@/api/sunVillage_info/fixedAssets";
import { checkFarmer, allowFaceVerify } from "@/api/sunVillage_info/fixedAssets";
import { getFamilyMemberList } from "@/api/sunVillage_info/homestead/familyMember";
import Cookies from "js-cookie";
import { encrypt, decrypt } from "../../utils/jsencrypt";
@@ -94,6 +95,7 @@
this.height = document.body.clientHeight
this.getCookie();
this.formData.deptId = Cookies.get('deptId');
this.allowIdentityVerified();
},
methods: {
getCookie() {
@@ -130,7 +132,6 @@
return false;
}


checkFarmer(this.formData).then(response => {
// console.log(response.data)
if (response.code == 200){
@@ -153,6 +154,12 @@
}
});
},
allowIdentityVerified() {
allowFaceVerify().then(response => {
console.log("****");
this.formData.identityCheck = JSON.parse(response.data);
});
}
},
};
</script>


Caricamento…
Annulla
Salva