|
@ -2,8 +2,8 @@ |
|
|
<view class="pageBgImg pad"> |
|
|
<view class="pageBgImg pad"> |
|
|
<view class="status_bar"></view> |
|
|
<view class="status_bar"></view> |
|
|
<view class="" style="height: 100rpx;"></view> |
|
|
<view class="" style="height: 100rpx;"></view> |
|
|
<!-- <u-button @click="requestSingleFreshLocationFn">单次定位</u-button> --> |
|
|
|
|
|
<u-button @click="getInitFaceVerifyFn">人脸核身</u-button> |
|
|
|
|
|
|
|
|
<u-button @click="requestSingleFreshLocationFn">单次定位1</u-button> |
|
|
|
|
|
<!-- <u-button @click="getInitFaceVerifyFn">人脸核身</u-button> --> |
|
|
<topInfo :carType="curObject.name" @changeSubject="changeSubject"></topInfo> |
|
|
<topInfo :carType="curObject.name" @changeSubject="changeSubject"></topInfo> |
|
|
<subject1 v-if="curObject.id==1"></subject1> |
|
|
<subject1 v-if="curObject.id==1"></subject1> |
|
|
<subject2 v-if="curObject.id==2"></subject2> |
|
|
<subject2 v-if="curObject.id==2"></subject2> |
|
@ -18,8 +18,8 @@ |
|
|
import subject2 from './comp/subject2.vue' |
|
|
import subject2 from './comp/subject2.vue' |
|
|
import subject3 from './comp/subject3.vue' |
|
|
import subject3 from './comp/subject3.vue' |
|
|
import subject4 from './comp/subject4.vue' |
|
|
import subject4 from './comp/subject4.vue' |
|
|
// import { requestSingleFreshLocation } from '@/common/js/qqLatLng.js' |
|
|
|
|
|
import { getInitFaceVerify } from '@/config/api.js' |
|
|
|
|
|
|
|
|
import { requestSingleFreshLocation } from '@/common/js/qqLatLng.js' |
|
|
|
|
|
import { getInitFaceVerify, GetDescribeFaceVerify } from '@/config/api.js' |
|
|
export default { |
|
|
export default { |
|
|
components: { topInfo, subject1, subject2,subject3,subject4 }, |
|
|
components: { topInfo, subject1, subject2,subject3,subject4 }, |
|
|
data() { |
|
|
data() { |
|
@ -38,7 +38,7 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.getInitFaceVerifyFn() |
|
|
|
|
|
|
|
|
// this.getInitFaceVerifyFn() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 切换科目 |
|
|
// 切换科目 |
|
@ -46,21 +46,22 @@ |
|
|
console.log(val) |
|
|
console.log(val) |
|
|
this.curObject = val |
|
|
this.curObject = val |
|
|
}, |
|
|
}, |
|
|
async getInitFaceVerifyFn() { |
|
|
|
|
|
const verifyPlugin = uni.requireNativePlugin('AP-FaceDetectModule'); |
|
|
|
|
|
var metaInfo = verifyPlugin.getMetaInfo() |
|
|
|
|
|
console.log(metaInfo) |
|
|
|
|
|
const res = await getInitFaceVerify({metaInfo: metaInfo}) |
|
|
|
|
|
console.log('人脸token') |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async requestSingleFreshLocationFn() { |
|
|
async requestSingleFreshLocationFn() { |
|
|
let lanLng = await requestSingleFreshLocation() |
|
|
let lanLng = await requestSingleFreshLocation() |
|
|
if(lanLng.sourceProvider=='fake') { |
|
|
|
|
|
|
|
|
if(lanLng.location.sourceProvider=='fake') { |
|
|
this.$u.toast('不能执行该操作,禁止使用虚拟定位') |
|
|
this.$u.toast('不能执行该操作,禁止使用虚拟定位') |
|
|
} |
|
|
} |
|
|
console.log(lanLng) |
|
|
console.log(lanLng) |
|
|
console.log('lanlng') |
|
|
console.log('lanlng') |
|
|
|
|
|
|
|
|
|
|
|
uni.getLocation({ |
|
|
|
|
|
type: 'wgs84', |
|
|
|
|
|
success: function (res) { |
|
|
|
|
|
console.log('当前位置的经度:' + res.longitude); |
|
|
|
|
|
console.log('当前位置的纬度:' + res.latitude); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|