人脸识别

This commit is contained in:
Your Name
2023-10-07 16:19:18 +08:00
parent 61bf1f5b61
commit 1702d6dd85
16 changed files with 456 additions and 388 deletions
+39 -7
View File
@@ -12,7 +12,12 @@
</uni-swiper-dot>
<!-- 宫格组件 -->
<uni-section class="uni-section" title="系统管理" type="line" @click="certification">
<uni-section v-if="certificationStatus == '已认证'" class="uni-section" title="系统管理" type="line">
<template v-slot:right>
{{certificationStatus}}
</template>
</uni-section>
<uni-section v-else class="uni-section" title="系统管理" type="line" @click="certification">
<template v-slot:right>
{{certificationStatus}}
</template>
@@ -89,6 +94,9 @@
import {
startEid
} from '../../mp_ecard_sdk/main.js'
import {
getEidtoken
} from "../../api/login.js"
export default {
data() {
return {
@@ -104,7 +112,8 @@
image: 'https://img.tukuppt.com/bg_grid/00/81/07/DGEl4suqeV.jpg!/fh/350'
}
],
certificationStatus: "未认证"
certificationStatus: "未认证",
eidToken: ""
}
},
methods: {
@@ -116,6 +125,14 @@
},
changeGrid(e) {
// this.$modal.showToast('模块建设中~')
if (this.certificationStatus == "未认证") {
uni.showToast({
title: '请先完成实名认证',
icon: 'none',
duration: 1000
})
return
}
switch (e) {
case 0:
uni.navigateTo({
@@ -131,14 +148,22 @@
break;
}
},
// 获取eidtoken
getEidtokenFn() {
getEidtoken({}).then(res => {
console.log(res.data.eidToken, "kkkkkkkkk");
this.eidToken = res.data.eidToken
})
},
// 点击实名认证
certification() {
uni.navigateTo({
url: ('/mp_ecard_sdk/index/index')
})
let that = this
// uni.navigateTo({
// url: ('/mp_ecard_sdk/index/index')
// })
startEid({
data: {
token,
token: this.eidToken,
},
verifyDoneCallback(res) {
const {
@@ -148,10 +173,17 @@
console.log('收到核身完成的res:', res);
console.log('核身的token是:', token);
console.log('是否完成核身:', verifyDone);
// flagShow = '已认证'
// console.log(flagShow, "JKJJKJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKk");
// console.log(this, "PPPPPPPPPPPPPPP");
that.certificationStatus = '已认证'
},
});
}
}
},
onLoad() {
this.getEidtokenFn()
},
}
</script>