Selaa lähdekoodia

人脸识别

rongxin_prod
QI_YUJIE 1 vuosi sitten
vanhempi
commit
a055524f2e
2 muutettua tiedostoa jossa 19 lisäystä ja 4 poistoa
  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 Näytä tiedosto

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


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

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


+ 11
- 4
src/views/sunVillage_info/login_code.vue Näytä tiedosto

@@ -36,10 +36,11 @@
<!-- <img :src="codeUrl" @click="getCode" />--> <!-- <img :src="codeUrl" @click="getCode" />-->
<!-- </div>--> <!-- </div>-->
<!-- </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.identityCheck">核身校验</van-checkbox>
<van-checkbox v-model="formData.rememberMe">记住我的信息</van-checkbox> <van-checkbox v-model="formData.rememberMe">记住我的信息</van-checkbox>
</div>
</div> -->
<van-checkbox v-model="formData.rememberMe">记住我的信息</van-checkbox>
</div> </div>
<div class="login_btn"> <div class="login_btn">
<!-- <div class="btn" :loading="loading">登录</div>--> <!-- <div class="btn" :loading="loading">登录</div>-->
@@ -60,7 +61,7 @@


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



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


Ladataan…
Peruuta
Tallenna