|
|
@ -2,8 +2,8 @@ |
|
|
|
<view class="pageBgImg pad"> |
|
|
|
<view class="status_bar"></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> |
|
|
|
<subject1 v-if="curObject.id==1"></subject1> |
|
|
|
<subject2 v-if="curObject.id==2"></subject2> |
|
|
@ -18,8 +18,8 @@ |
|
|
|
import subject2 from './comp/subject2.vue' |
|
|
|
import subject3 from './comp/subject3.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 { |
|
|
|
components: { topInfo, subject1, subject2,subject3,subject4 }, |
|
|
|
data() { |
|
|
@ -38,7 +38,7 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getInitFaceVerifyFn() |
|
|
|
// this.getInitFaceVerifyFn() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 切换科目 |
|
|
@ -46,21 +46,22 @@ |
|
|
|
console.log(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() { |
|
|
|
let lanLng = await requestSingleFreshLocation() |
|
|
|
if(lanLng.sourceProvider=='fake') { |
|
|
|
if(lanLng.location.sourceProvider=='fake') { |
|
|
|
this.$u.toast('不能执行该操作,禁止使用虚拟定位') |
|
|
|
} |
|
|
|
console.log(lanLng) |
|
|
|
console.log('lanlng') |
|
|
|
|
|
|
|
uni.getLocation({ |
|
|
|
type: 'wgs84', |
|
|
|
success: function (res) { |
|
|
|
console.log('当前位置的经度:' + res.longitude); |
|
|
|
console.log('当前位置的纬度:' + res.latitude); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|