|
@@ -26,7 +26,7 @@
|
|
<view>请把脸移入框内并保持不动</view>
|
|
<view>请把脸移入框内并保持不动</view>
|
|
<image :src="phoimg"></image>
|
|
<image :src="phoimg"></image>
|
|
</view>
|
|
</view>
|
|
- <view class="rzbtn" @click="getSumit">提交</view>
|
|
|
|
|
|
+ <view class="rzbtn" @click="onScanFace">提交</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -35,7 +35,7 @@
|
|
const baseUrl = config.baseUrl
|
|
const baseUrl = config.baseUrl
|
|
import {uploadmore} from '@/utils/common.js'
|
|
import {uploadmore} from '@/utils/common.js'
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
- import permijs from '@/utils/permission.js'
|
|
|
|
|
|
+ import {requestAndroidPermission} from '@/utils/permission.js'
|
|
|
|
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
const lyBDFaceAuth = uni.requireNativePlugin('longyoung-BDFaceAuth'); //android
|
|
const lyBDFaceAuth = uni.requireNativePlugin('longyoung-BDFaceAuth'); //android
|
|
@@ -52,7 +52,7 @@
|
|
user:{
|
|
user:{
|
|
|
|
|
|
},
|
|
},
|
|
- licenseIDStr: 'longyoung-face-android',
|
|
|
|
|
|
+ licenseIDStr: 'rongzidanbao-face-android',
|
|
items: [{
|
|
items: [{
|
|
value: 'Eye',
|
|
value: 'Eye',
|
|
name: '眨眨眼',
|
|
name: '眨眨眼',
|
|
@@ -65,11 +65,13 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: 'HeadLeft',
|
|
value: 'HeadLeft',
|
|
- name: '向左转头'
|
|
|
|
|
|
+ name: '向左转头',
|
|
|
|
+ checked: 'true'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: 'HeadRight',
|
|
value: 'HeadRight',
|
|
- name: '向右转头'
|
|
|
|
|
|
+ name: '向右转头',
|
|
|
|
+ checked: 'true'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
value: 'HeadLeftOrRight',
|
|
value: 'HeadLeftOrRight',
|
|
@@ -104,7 +106,8 @@
|
|
this.requestAndroidPermission('android.permission.CAMERA'); //相机
|
|
this.requestAndroidPermission('android.permission.CAMERA'); //相机
|
|
// this.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE');//外部存储(含相册)读取权限
|
|
// this.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE');//外部存储(含相册)读取权限
|
|
// this.requestAndroidPermission('android.permission.WRITE_EXTERNAL_STORAGE');//外部存储(含相册)写入权限
|
|
// this.requestAndroidPermission('android.permission.WRITE_EXTERNAL_STORAGE');//外部存储(含相册)写入权限
|
|
- this.licenseIDStr = "longyoung-face-android";
|
|
|
|
|
|
+ // this.licenseIDStr = "longyoung-face-android";
|
|
|
|
+ this.licenseIDStr = "rongzidanbao-face-android";
|
|
}
|
|
}
|
|
// #endif
|
|
// #endif
|
|
},
|
|
},
|
|
@@ -128,9 +131,10 @@
|
|
}
|
|
}
|
|
|
|
|
|
if (uni.getSystemInfoSync().platform == "android") {//安卓
|
|
if (uni.getSystemInfoSync().platform == "android") {//安卓
|
|
|
|
+ console.log(lyBDFaceAuth,1)
|
|
lyBDFaceAuth.scanFace({
|
|
lyBDFaceAuth.scanFace({
|
|
licenseID: this.licenseIDStr,
|
|
licenseID: this.licenseIDStr,
|
|
- actionAry: ary, //不传无动作
|
|
|
|
|
|
+ actionAry: ["Eye", "Mouth",], //不传无动作
|
|
isLivenessRandom: this.isLivenessRandom, //不传默认有序,0有序,1随机
|
|
isLivenessRandom: this.isLivenessRandom, //不传默认有序,0有序,1随机
|
|
isSound: this.isSound, //不传默认有声音,0无声,1有声
|
|
isSound: this.isSound, //不传默认有声音,0无声,1有声
|
|
txtColor:this.txtColor,//文字颜色
|
|
txtColor:this.txtColor,//文字颜色
|
|
@@ -184,8 +188,9 @@
|
|
},
|
|
},
|
|
//权限
|
|
//权限
|
|
async requestAndroidPermission(permisionID) {
|
|
async requestAndroidPermission(permisionID) {
|
|
- var result = await permijs.requestAndroidPermission(permisionID);
|
|
|
|
|
|
+ var result = await requestAndroidPermission(permisionID);
|
|
var strStatus;
|
|
var strStatus;
|
|
|
|
+ console.log(result)
|
|
if (result == 1) {
|
|
if (result == 1) {
|
|
strStatus = "已获得授权";
|
|
strStatus = "已获得授权";
|
|
} else if (result == 0) {
|
|
} else if (result == 0) {
|