faceauthview
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "faceauthview", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "微信小程序自定义人脸识别组件", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,8 +11,16 @@ Component({ | ||
value: '', | ||
}, | ||
mode: { | ||
type: String, | ||
value: '', | ||
} | ||
}, | ||
lifetimes: { | ||
attached: function () { | ||
this.initCamera() | ||
this.getCode() | ||
console.log(this.data) | ||
}, | ||
@@ -30,3 +38,4 @@ detached: function () { | ||
recordStatus: 'waiting', | ||
recordTime: 5 | ||
recordTime: 5, | ||
devCount: 0 | ||
}, | ||
@@ -54,3 +63,3 @@ methods: { | ||
*/ | ||
async getCode () { | ||
async getCode() { | ||
const that = this | ||
@@ -114,3 +123,3 @@ wx.request({ | ||
*/ | ||
stopRecord () { | ||
stopRecord() { | ||
wx.showLoading({ | ||
@@ -142,3 +151,3 @@ title: '视频处理中', | ||
*/ | ||
getVideoBase64 (tempVideoPath) { | ||
getVideoBase64(tempVideoPath) { | ||
wx.showLoading({ | ||
@@ -172,3 +181,3 @@ title: '认证中', | ||
auth (data) { | ||
auth(data) { | ||
console.log(`[faceAuthView] : 调用API认证结果`) | ||
@@ -194,3 +203,4 @@ const that = this | ||
this.setData({ | ||
recordStatus: 'waiting' | ||
recordStatus: 'waiting', | ||
recordTime: 5 | ||
}) | ||
@@ -207,4 +217,20 @@ wx.showToast({ | ||
}) | ||
}, | ||
devCount() { | ||
if (this.data.mode === 'dev') { | ||
this.setData({ | ||
devCount: this.data.devCount + 1 | ||
}) | ||
const { | ||
devCount: count | ||
} = this.data | ||
if (count === 10) { | ||
this.triggerEvent('authSuccess') | ||
this.setData({ | ||
devCount : 0 | ||
}) | ||
} | ||
} | ||
} | ||
} | ||
}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144930
216