Browse Source

准备删除多余的文件路径

master
unknown 9 months ago
parent
commit
bdb1fb4b07
  1. 1
      App.vue
  2. 1
      mp_ecard_sdk/constants/log.js
  3. 1
      mp_ecard_sdk/globalConfig.js
  4. 1
      mp_ecard_sdk/index.css
  5. 1
      mp_ecard_sdk/index/index.js
  6. 24
      mp_ecard_sdk/index/index.vue
  7. 1
      mp_ecard_sdk/main.js
  8. 1
      mp_ecard_sdk/utils/http.js
  9. 1
      mp_ecard_sdk/utils/index.js
  10. 1
      mp_ecard_sdk/utils/validate.js
  11. 7
      pages.json
  12. 163
      pages/indexEntry/NonPlatformStudentInfo/NonPlatformStudentInfo.vue
  13. 22
      pages/indexEntry/enroll/enroll.vue
  14. 2
      pages/tabbar/index/index.vue
  15. 303
      pages/tabbar/learnCar/index - 副本 (2).vue
  16. 78
      pages/tabbar/learnCar/index - 副本.vue
  17. 11
      pages/tabbar/learnCar/index.vue
  18. BIN
      static/images/bigImg/banner.jpg
  19. BIN
      static/images/bigImg/banner2.jpg

1
App.vue

@ -1,5 +1,4 @@
<script> <script>
// import { initEid } from './mp_ecard_sdk/main';
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch') console.log('App Launch')

1
mp_ecard_sdk/constants/log.js

@ -1 +0,0 @@
const Log={version:"uni_1.0.3",SourceType:"mp_sdk_uni",getIntoIndexPage:"START_INDEX",initSdk:"INIT_SDK",getConfig:"GET_CONFIG",getConfigRetry:"GET_CONFIG_BY_RETRY",webViewResult:"WEBVIEW_RESULT",webViewError:"WEBVIEW_ERROR",navigateToEid:"NAVIGATE_TO_EID",navigateBackFromEid:"NAVIGATE_BACK_FROM_EID",navigateBackFromEidFail:"NAVIGATE_BACK_FROM_EID_FAIL",startEid:"START_EID",startEidFail:"START_EID_FAIL",eidVerifyDone:"EID_VERIFY_DONE",requestFail:"REQUEST_FAIL",requestCatch:"REQUEST_CATCH",onAppShow:"ON_APP_SHOW"};export default Log;

1
mp_ecard_sdk/globalConfig.js

@ -1 +0,0 @@
export default{normalPath:""};

1
mp_ecard_sdk/index.css

@ -1 +0,0 @@
.auth{margin-top:128rpx;display:flex;flex-direction:column;align-items:center}.auth-logo{width:200rpx;height:200rpx}.auth-logo image{height:100%;width:100%}.title{margin-top:20rpx;font-size:36rpx;line-height:56rpx}.merchant-name{display:inline;font-weight:700}.sub-title{margin-top:8rpx;font-size:34rpx;line-height:52rpx}.button-area{margin-top:48rpx}.button-area button{width:622rpx;height:96rpx;background:#fff;border:2rpx solid #ddd;font-size:32rpx;font-weight:400;line-height:96rpx;padding:0}.redirect{margin-top:272rpx;display:flex;flex-direction:column;align-items:center}.loading{height:160rpx;width:160rpx;margin-bottom:32rpx}.loading image{height:100%;width:100%}.title{font-size:34rpx;line-height:52rpx}

1
mp_ecard_sdk/index/index.js

@ -1 +0,0 @@
import Log from"../constants/log.js";import{navigateToEid}from"../utils/index";export default{data(){return{token:""}},onLoad(e){var{token:e,needJumpPage:t}=e;this.token=e,uni.reportLogToEid({token:e,event:Log.getIntoIndexPage,errMsg:`进入配置首页,token:${e},needJumpPage:`+t})},methods:{handleStart(){navigateToEid(this.token)}}};

24
mp_ecard_sdk/index/index.vue

@ -1,24 +0,0 @@
<template>
<view class="auth">
<view class="auth-logo">
<image src="https://faceid-h5-1254418846.file.myqcloud.com/mp_verify_sdk/images/ecard/logo.png" />
</view>
<view class="title">
即将进入"eID数字身份"小程序
</view>
<view class="button-area">
<button @click='handleStart' >
确认进入
</button>
</view>
</view>
</template>
<script>
import index from "./index";
export default index;
</script>
<style>
@import url('../index.css');
</style>

1
mp_ecard_sdk/main.js

@ -1 +0,0 @@
import validate from"./utils/validate";import Log from"./constants/log";import globalConfig from"./globalConfig";import{navigateToEid}from"./utils/index";const EIDAppID="wx0e2cb0b052a91c92";function initEid(e="https://eid.faceid.qq.com",o="release",n="https://eid-enhance.faceid.qq.com"){uni.eidBaseUrl=e,uni.eidEnvVersion=o,uni.eidBackUpUrl=n;uni.onAppShow(e=>{console.log("!!!!!!监听onshow事件",e,wx.eidTokenToCallback);var{scene:e,referrerInfo:o}=e,{appId:o,extraData:n}=o||{},{token:i,verifyDone:t}=n||{};1038===e&&o===EIDAppID&&uni.eidTokenToCallback&&(o=i||uni.eidTokenToCallback,uni.reportLogToEid({token:o,event:Log.navigateBackFromEid,errMsg:`从EID核身完成返回,核验未完成或者没有处理核验完成的函数,token:${o},verifyDone:${t},scene:`+e}),uni.eidTokenToCallback)&&uni.eidTokenToCallback===i&&t&&uni.handleEidVerifyDone&&uni.handleEidVerifyDone(n),uni.eidTokenToCallback=""});e=uni.getSystemInfoSync();const d=e["version"];uni.reportLogToEid=function(e){var{token:e="",event:o="",errCode:n="",errMsg:i="",data:t={}}=e,r=new Date;const a={Token:e,SourceType:Log.SourceType,SourceVersion:Log.version,EnvVersion:d,Timestamp:r.getTime(),Event:o,ErrorCode:"number"==typeof n?n.toString():n,ErrorMsg:i,Data:JSON.stringify(t)};console.log("开始上报日志:",a),uni.request({url:uni.eidBaseUrl+"/api/common/ReportEvent",method:"POST",data:a,success(e){console.log("上报日志完成:","payload:",a,"res:",e)}})}}function startEid(e){const{data:o,verifyDoneCallback:n}=e;if(!o||!n)return uni.reportLogToEid({token:i,event:Log.startEidFail,errMsg:"传入的参数有误"}),void uni.showModal({title:"提示",content:"传入的参数有误",showCancel:!1});const{token:i,needJumpPage:t=!1}=o;validate.isValidateToken(i)?(uni.handleEidVerifyDone=e=>{const o=e["token"];t?uni.navigateBack({success(){uni.reportLogToEid({token:o,event:Log.EidVerifyDone,errMsg:"验证完成,token:"+o}),n({token:o,verifyDone:!0})}}):(uni.reportLogToEid({token:o,event:Log.EidVerifyDone,errMsg:"验证完成,token:"+o}),n({token:o,verifyDone:!0}))},t?uni.navigateTo({url:`${globalConfig.normalPath}/mp_ecard_sdk/index/index?token=${i}&needJumpPage=`+t}):navigateToEid(i)):(uni.reportLogToEid({token:i,event:Log.startEidFail,errMsg:"传入的token有误,token:"+i}),uni.showModal({title:"提示",content:"传入的token有误",showCancel:!1}))}export{initEid,startEid};

1
mp_ecard_sdk/utils/http.js

@ -1 +0,0 @@
import Log from"../constants/log.js";const request=function(e,t){const{token:o="",url:a,method:r="POST",data:s,reTry:d,header:u={"Content-Type":"application/json"}}=e;try{uni.request({url:uni.eidBaseUrl+a,method:r,data:s,header:u,success(r){console.log("request success:",r),200===r.statusCode&&r.data?0==r.data.ErrorCode||0==r.data.code?t({ErrorCode:0,ErrorMsg:r.data.ErrorMsg,Data:r.data.Data||r.data.data,reTry:d}):t({ErrorCode:r.data.ErrorCode,ErrorMsg:r.data.ErrorMsg,Data:r.data.Data||r.data.data}):t({ErrorCode:-101,ErrorMsg:"请求错误,请稍后重试"})},fail(r){console.log("request error:",r),d&&d.tryCount&&0<d.tryCount?(d.tryCount--,uni.eidBaseUrl=uni.eidBackUpUrl,setTimeout(()=>{request(e,t)},d.retryDelay||0)):t({ErrorCode:-107,ErrorMsg:"request请求异常,请稍后重试"}),uni.reportLogToEid({token:o,event:Log.requestFail,errCode:"-1",errMsg:"requestFail 调用失败",data:{url:""+(uni.eidBaseUrl+a),err:r}})}})}catch(r){console.log("request error:",r),t({ErrorCode:-109,ErrorMsg:"request方法异常,请稍后重试"}),uni.reportLogToEid({token:o,event:Log.requestCatch,errCode:"-1",errMsg:"requestFail 调用失败",data:{url:""+(uni.eidBaseUrl+a),err:r}})}},$http=request;export{$http};

1
mp_ecard_sdk/utils/index.js

@ -1 +0,0 @@
import Log from"../constants/log";const navigateToEid=o=>{console.log("navigateToEid",uni.eidEnvVersion),uni.navigateToMiniProgram({appId:"wx0e2cb0b052a91c92",path:"pages/huiyan/index",envVersion:uni.eidEnvVersion,extraData:{useHuiyan:!0,huiyanToken:o},success(){uni.eidTokenToCallback=o},fail(e){console.log("err",e),uni.eidTokenToCallback=""},complete(e){uni.reportLogToEid({token:o,event:Log.navigateToEid,errMsg:e.errMsg})}})};export{navigateToEid};

1
mp_ecard_sdk/utils/validate.js

@ -1 +0,0 @@
function isValidateToken(e){return/^[a-zA-Z0-9-]{36}$/.test(e)}export default{isValidateToken:isValidateToken};

7
pages.json

@ -26,14 +26,9 @@
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"backgroundTextStyle": "dark" "backgroundTextStyle": "dark"
} }
},
{
"path": "mp_ecard_sdk/index/index",
"style": {
"navigationBarTitleText": "腾讯云E证通授权"
}
} }
], ],
"subPackages": [ "subPackages": [
{ {

163
pages/indexEntry/NonPlatformStudentInfo/NonPlatformStudentInfo.vue

@ -1,163 +0,0 @@
<template>
<view class="pageBgImg">
<topNavbar title="学员信息"></topNavbar>
<view class="pad">
<view class="card">
<view class="row">
<view class="lab">姓名</view>
<view class="value">{{form.name}}</view>
</view>
<view class="row">
<view class="lab">证件号</view>
<view class="value">{{form.idcard}}</view>
</view>
<view class="row">
<view class="lab">证件类型</view>
<view class="value">身份证</view>
</view>
</view>
<view class="card">
<view class="row">
<view class="lab">手机号</view>
<view class="rightCon">
<view class="val">
<input v-model="form.phone" placeholder="请输入手机号" /></input>
</view>
</view>
</view>
<view class="row">
<view class="lab">驾校名称</view>
<view class="rightCon">
<view class="val">
<input v-model="form.schoolName" placeholder="请输入驾校名称" /></input>
</view>
</view>
</view>
<view class="row">
<view class="lab">学驾车型</view>
<view class="rightCon">
<view class="val" @click="showType=true">
<input v-model="form.trainType" placeholder="请选择" disabled="" style="pointer-events: none;"/></input>
</view>
<view class="icon" @click="showType=true">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;"></u-icon>
</view>
</view>
</view>
</view>
<view class="btnBg" @click="goNext">确认</view>
</view>
<u-picker :show="showType" :columns="typeArr" @confirm="confirmType"
@cancel="showType=false"></u-picker>
</view>
</template>
<script>
import {
applyOnline
} from '@/config/api.js'
export default {
data() {
return {
form: {
value: 1,
cardType: '身份证',
phone: '',
trainType: '',
name: '',
idcard: '',
schoolName: '',
applyType: 5,//12345
},
showType: false,
typeArr: [
['C1','C2','C3','A2','B2','A1','A3','B1','D','E','F','C4','C5','C6']
],
}
// 0123456
},
onLoad(options) {
this.form.userId = this.userId
this.form.phone = this.vuex_userInfo.phone
this.form.accountId = this.vuex_userInfo.accountId
this.form.address = this.vuex_userInfo.address
this.form.name = this.vuex_userInfo.name
this.form.idcard = this.vuex_userInfo.idcard
this.form.nationality = this.vuex_userInfo.nationality || '中国'
this.form.cardType = this.vuex_userInfo.cardType || '1'
},
methods: {
confirmType(val) {
let item = val.value[0]
console.log(item)
this.form.trainType = item.value
// this.form.typeName = item.label
this.showType = false
},
async goNext() {
if(!this.form.phone) return this.$u.toast('请输入手机号')
if(!this.form.schoolName) return this.$u.toast('请输入驾校名称')
if(!this.form.trainType) return this.$u.toast('请选择学驾车型')
const {data: res} = await applyOnline(this.form)
await this.$store.dispatch('getUserInfo')
// this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
// this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
}
}
}
</script>
<style>
.input1::placeholder {
color: red !important;
}
</style>
<style lang="scss" scoped>
.card {
padding: 10rpx 46rpx 10rpx 32rpx;
margin-bottom: 20rpx;
.row {
height: 100rpx;
display: flex;
align-items: center;
.lab {
width: 152rpx;
}
.rightCon {
flex: 1;
width: 0;
display: flex;
.val {
flex: 1;
width: 0;
input {
font-size: 28rpx;
}
}
.icon {
width: 30rpx;
height: 30rpx;
u-icon {}
}
}
}
}
.btnBg {
width: 396rpx;
margin: 100rpx auto 0 auto;
}
</style>

22
pages/indexEntry/enroll/enroll.vue

@ -84,7 +84,6 @@
<script> <script>
import { getpersonface, GetDetectInfoEnhanced, getCardType } from '@/config/api.js' import { getpersonface, GetDetectInfoEnhanced, getCardType } from '@/config/api.js'
import { website } from '@/config/site.config.js' import { website } from '@/config/site.config.js'
import { startEid } from '@/mp_ecard_sdk/main';
export default { export default {
data() { data() {
return { return {
@ -234,31 +233,12 @@
if(!this.vuex_userInfo.applyStep||this.vuex_userInfo.applyStep<2) { if(!this.vuex_userInfo.applyStep||this.vuex_userInfo.applyStep<2) {
const EidToken = await this.getpersonfaceFn() const EidToken = await this.getpersonfaceFn()
console.log(EidToken) console.log(EidToken)
this.goSDK(EidToken)
} }
// this.$goPage('/pages/indexEntry/enroll/signContract/signContract') // this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
// this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar') // this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
}, },
//
goSDK(token) {
let _this = this
startEid({
data: {
token,
},
verifyDoneCallback(res) {
const { token, verifyDone } = res;
console.log('收到核身完成的res:', res);
console.log('核身的token是:', token);
uni.showLoading({
title: '正在加载,请稍后……'
})
_this.GetDetectInfoEnhancedFn(token)
console.log('是否完成核身:', verifyDone);
},
});
},
} }
} }

2
pages/tabbar/index/index.vue

@ -413,7 +413,7 @@
.main { .main {
width: 100%; width: 100%;
background: url('../../../static/images/bigImg/homeBg.png') #F6F7FA no-repeat;
background: url('https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/complain/2024-02-27/1709013363812-0') #F6F7FA no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
.TopCon { .TopCon {
width: 100%; width: 100%;

303
pages/tabbar/learnCar/index - 副本 (2).vue

@ -1,303 +0,0 @@
<template>
<view class="content">
<button type="primary" @click="setUserAgreePrivacy">设置是否同意隐私政策</button>
<button type="primary" @click="getLocationAuthorizationStatus">获取定位权限状态(ios)</button>
<button type="primary" @click="requestLocationAuthorization">请求定位权限(ios)</button>
<button type="primary" @click="init">初始化</button>
<button type="primary" @click="setLocationManagerInfo">设置定位管理信息</button>
<button type="primary" @click="getLocationManagerInfo">获取定位管理信息</button>
<view class="json">{{getLocationManagerInfo_json}}</view>
<button type="primary" @click="startDrEngine">启动DR引擎</button>
<button type="primary" @click="terminateDrEngine">停止DR引擎</button>
<button type="primary" @click="getDrPosition">传出DR计算出的实时位置</button>
<view class="json">{{getDrPosition_json}}</view>
<button type="primary" @click="requestSingleFreshLocation">单次定位66</button>
<button type="primary" @click="getLocationfn">uniapp定位</button>
<view class="json">{{requestSingleFreshLocation_json}}</view>
<button type="primary" @click="removeSingleFreshLocation">取消单次定位</button>
<button type="primary" @click="requestLocationUpdates">持续定位</button>
<view class="json">{{requestLocationUpdates_json}}</view>
<button type="primary" @click="removeUpdates">停止持续定位</button>
<button type="primary" @click="getLastKnownLocation">获取最近一次的位置(android)</button>
<view class="json">{{getLastKnownLocation_json}}</view>
<button type="primary" @click="requestLocationWithScene">场景定位(android)</button>
<view class="json">{{requestLocationWithScene_json}}</view>
<button type="primary" @click="stopLocationWithScene">停止场景定位(android)</button>
<button type="primary" @click="enableForegroundLocation">开启后台定位(android)</button>
<button type="primary" @click="disableForegroundLocation">关闭后台定位(android)</button>
<button type="primary" @click="isSupportGps">是否支持GPS定位(android)</button>
</view>
</template>
<script>
var KJTencentLocation = uni.requireNativePlugin("KJ-TencentLocation");
/**
* location json字段说明
* location - 定位到的相关信息
* ios:
* fakeCode - 当前位置的作弊码 OK(正常) Coordinate(坐标是否被hook校验) Speed(速度合法性校验) Crc(循环冗余校验) Motion(运动状态和定位点校验)
* MotionData(传感器数据校验) MotionType(系统的运动状态和传感器识别的运动状态校验) FirstCallbackSpeed(系统首次定位回调速度校验)
* Simulation(模拟位置校验) LocationAge(系统当前时间与Location的时间校验) LocationSame(系统一直回调同一个点校验)
* drProvider - 定位结果来源 -2(错误可能未开启dr) -1(定位结果来源未知) 0(定位结果来源融合的结果) 1(定位结果来源GPS) 2(定位结果来源网络)
* indoorLocationType - 室内定位类型0表示普通定位结果1表示蓝牙室内定位结果
* areaStat - 当前位置的行政区划, 0-表示中国大陆, 1-表示其他
* horizontalAccuracy - 水平的准确度负数无效
* verticalAccuracy - 垂直的准确度负数无效
* course - 航向 路径 取值为0.0 ~ 359.9 真北方向表示0.0
* speed - 移动速度, 单位为m/s (/), 仅当位置来自GPS时可能有效.
*
* andorid 过多信息https://mapapi.qq.com/sdk/locationSDK/Android/doc/index.html
* sourceProvider - 当前位置的细分来源. fake - 作弊 wifi cell-Cell基站 network gps
* fakeReason - 获取作弊码可以官网工单进行咨询sourceProvider返回fake该方法返回判断其作弊的原因
* fakeProbability - 获取作弊可能性范围01
* provider - 来源
* isMockGps - 使用GPS定位时判断该GPS位置点是否为Mock数据, 1为是0为否-1为无法判断当且仅当Provider来源是GPS时有效
* areaStat - 0-表示国内(中国大陆), 1-表示国外
* bearing - 当前位置方向, 单位为度, 仅当位置来自GPS时可能有效. 0, 如果无法得到方向
* GPSRssi - GPS信号强度仅当provider为gps时可用
* poiList - 当前位置周围的 POI
* altitude - 海拔高度 单位为m(), 仅当位置来自GPS时可能有效.
* speed - 移动速度, 单位为m/s (/), 仅当位置来自GPS时可能有效.
* accuracy - 当前位置的精度. 通常精度为, GPS<20米WiFi30-180米基站150-800米.
* */
export default {
data() {
return {
getLocationManagerInfo_json: null,
getDrPosition_json: null,
getLastKnownLocation_json: null,
requestSingleFreshLocation_json: null,
requestLocationUpdates_json: null,
requestLocationWithScene_json: null
}
},
onLoad() {
// #ifdef APP-PLUS
if (plus.os.name == 'Android') {
plus.android.requestPermissions(
['android.permission.ACCESS_COARSE_LOCATION',
"android.permission.ACCESS_FINE_LOCATION",
"android.permission.ACCESS_BACKGROUND_LOCATION",
"android.permission.READ_PHONE_STATE",
"android.permission.WRITE_EXTERNAL_STORAGE",
],
function(resultObj) {
var result = 0;
for (var i = 0; i < resultObj.granted.length; i++) {
var grantedPermission = resultObj.granted[i];
console.log('已获取的权限:' + grantedPermission);
result = 1
}
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
var deniedPresentPermission = resultObj.deniedPresent[i];
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
result = 0
}
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
var deniedAlwaysPermission = resultObj.deniedAlways[i];
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
result = -1
}
},
function(error) {
console.log('申请权限错误:' + error.code + " = " + error.message);
}
);
} else {
this.requestLocationAuthorization()
}
// #endif
},
methods: {
getLocationfn() {
uni.getLocation({
type: 'gcj02',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
}
});
},
setUserAgreePrivacy() {
var dic = {
"isAgree": true
}
KJTencentLocation.setUserAgreePrivacy(dic);
},
getLocationAuthorizationStatus() {
KJTencentLocation.getLocationAuthorizationStatus((res) => {
console.log("getLocationAuthorizationStatus:" + JSON.stringify(res));
/**
* status - 权限状态 0-还没决定 1-受限制 2-拒绝 345-已授权
* */
});
},
requestLocationAuthorization() {
KJTencentLocation.requestLocationAuthorization((res) => {
console.log("requestLocationAuthorization:" + JSON.stringify(res));
/**
* status - 权限状态 0-还没决定 1-受限制 2-拒绝 345-已授权
* */
});
},
init() {
var dic = {
"apiKey": "BPMBZ-VSKE3-MC23F-O3KZO-AZGI7-PXFJI" //iosandoridApp
//"deviceID": "xxx", //andorid使oaidios
}
KJTencentLocation.init(dic);
},
setLocationManagerInfo() {
var dic = {
"coordinateType": "gcj02", // GCJ02() WGS84()
"requestLevel": 4, // 0() 1(, , ) 3() 4(POI)
/**以下andorid有效**/
"mockEnable": false, //mockGps truemockGps,GPS
"systemCacheEnable": false, //
//"deviceID":"xxx", //id
"userAgreePrivacy": true, //
"allowCache": true, //使
"allowDirection": true, //使
"allowGPS": true, //使GPS
"gnssSource": 20, // ,20(GPS) 21()
"gpsFirst": false, //false true30s
"gpsFirstTimeOut": 10000, //: ms, 60s.
"indoorLocationMode": true, //
"interval": 5000, //(), ms ().
"locMode": 10, // 10(使) 11(gps使) 12(GPS)
// "phoneNumber": "111",
// "qq": "xxx",
// "smallAppKey": "xxx", //key.
/**以下ios有效**/
"distanceFilter": 0, //
"desiredAccuracy": "best", // bestForNavigation best nearestTenMeters hundredMeters kilometer threeKilometers
"pausesLocationUpdatesAutomatically": false, //
"allowsBackgroundLocationUpdates": true, // true manifest.json->App-> location
"activityType": 1, // 1() 2() 3() 4()
//"headingFilter": 10, //
"headingOrientation": 0, // 0() 1() 2() 3() 4() 5() 6()
"poiUpdateInterval": 10, //POI
"enableAntiMockLocation": true //
}
console.log(dic)
KJTencentLocation.setLocationManagerInfo(dic)
},
getLocationManagerInfo() {
KJTencentLocation.getLocationManagerInfo((res) => {
console.log(res)
console.log("getLocationManagerInfo:" + JSON.stringify(res));
this.getLocationManagerInfo_json = JSON.stringify(res);
/**
* 返回json字段说明
* andorid{"oaid":"df08a06a100674e3","userAgreePrivacy":true,"version":"7.5.2.official_1",
* "isDrSupport":true,"coordinateType":"GCJ02","build":"230511"}
*
* ios{"coordinateType":"GCJ02","isDrSupport":false,"userAgreePrivacy":false,"accuracyAuthorization":0,"version":"4.1.1"}
*
* */
});
},
startDrEngine() {
var dic = {
"type": "Bike" //Bike() Walk()
}
KJTencentLocation.startDrEngine(dic, (res) => {
console.log("startDrEngine:" + JSON.stringify(res));
/**
* code - 0(成功) -1(传感器有缺失或没有GPS芯片) -2(已经启动) -3(传感器启动失败) -4(GPS启动失败) -5(没有位置权限) -6(未设置用或未同意隐私) -7(lib加载失败)
* */
});
},
getDrPosition() {
KJTencentLocation.getDrPosition((res) => {
console.log("getDrPosition:" + JSON.stringify(res));
this.getDrPosition_json = JSON.stringify(res);
});
},
terminateDrEngine() {
KJTencentLocation.terminateDrEngine();
},
getLastKnownLocation() {
console.log('获取最近一次定位')
console.log(KJTencentLocation.getLastKnownLocation)
KJTencentLocation.getLastKnownLocation((res) => {
console.log("getLastKnownLocation:" + JSON.stringify(res));
this.getLastKnownLocation_json = JSON.stringify(res);
});
},
requestSingleFreshLocation() {
console.log('单次定位11')
console.log(KJTencentLocation.requestSingleFreshLocation)
KJTencentLocation.requestSingleFreshLocation((res) => {
console.log(res)
console.log('单次定位')
// this.requestSingleFreshLocation_json = JSON.stringify(res);
// console.log("requestSingleFreshLocation:" + JSON.stringify(res));
});
},
removeSingleFreshLocation() {
KJTencentLocation.removeSingleFreshLocation();
},
requestLocationUpdates() {
KJTencentLocation.requestLocationUpdates((res) => {
console.log("requestLocationUpdates:" + JSON.stringify(res));
this.requestLocationUpdates_json = JSON.stringify(res);
});
},
removeUpdates() {
KJTencentLocation.removeUpdates();
},
requestLocationWithScene() {
/**
* Scenario - 目标场景 10(签到场景单次定位第一次会优先返回精度较高的结果定位速度可能会延迟13S)
* 11(运动场景高精度连续定位适用于步行或骑行定位第一次会优先返回精度较高的结果定位可能会延迟35s)
* 12(出行场景高精度连续定位适用于室外出行场景优先使用卫星定位结果卫星定位成功之后网络定位不再返回卫星信号断开之后一段时间才会返回网络结果超时时间为8s)
* */
var dic = {
"Scenario": 11
}
KJTencentLocation.requestLocationWithScene(dic, (res) => {
console.log("requestLocationWithScene:" + JSON.stringify(res));
this.requestLocationWithScene_json = JSON.stringify(res);
});
},
stopLocationWithScene() {
var dic = {
"Scenario": 11
}
KJTencentLocation.stopLocationWithScene(dic);
},
enableForegroundLocation() {
var dic = {
"notificationID": 1,
"contentTitle": "KJ-TencentLocation",
"contentText": "正在后台运行"
}
KJTencentLocation.enableForegroundLocation(dic);
},
disableForegroundLocation() {
var dic = {
"isRemoveNotification": true
}
KJTencentLocation.disableForegroundLocation(dic);
},
isSupportGps() {
KJTencentLocation.isSupportGps( (res) => {
console.log("isSupportGps:" + JSON.stringify(res));
});
}
}
}
</script>
<style>
.json {
word-wrap: break-word;
}
</style>

78
pages/tabbar/learnCar/index - 副本.vue

@ -1,78 +0,0 @@
<template>
<view class="pageBgImg pad">
<view class="status_bar"></view>
<view class="" style="height: 100rpx;"></view>
<topInfo :carType="curObject.name" @changeSubject="changeSubject"></topInfo>
<subject1 v-if="curObject.id==1"></subject1>
<subject2 v-if="curObject.id==2"></subject2>
<subject3 v-if="curObject.id==3"></subject3>
<subject4 v-if="curObject.id==4"></subject4>
</view>
</template>
<script>
import topInfo from './comp/topInfo.vue'
import subject1 from './comp/subject1.vue'
import subject2 from './comp/subject2.vue'
import subject3 from './comp/subject3.vue'
import subject4 from './comp/subject4.vue'
var KJGNSS = uni.requireNativePlugin("KJ-GNSS");
export default {
components: { topInfo, subject1, subject2,subject3,subject4 },
data() {
return {
curObject: {
name: '科目一',
id: 1
}
}
},
onLoad() {
if (plus.os.name == 'Android') {
plus.android.requestPermissions(
['android.permission.ACCESS_FINE_LOCATION',
'android.permission.ACCESS_COARSE_LOCATION'
],
function(resultObj) {
var result = 0;
for (var i = 0; i < resultObj.granted.length; i++) {
var grantedPermission = resultObj.granted[i];
console.log('已获取的权限:' + grantedPermission);
result = 1
}
for (var i = 0; i < resultObj.deniedPresent.length; i++) {
var deniedPresentPermission = resultObj.deniedPresent[i];
console.log('拒绝本次申请的权限:' + deniedPresentPermission);
result = 0
}
for (var i = 0; i < resultObj.deniedAlways.length; i++) {
var deniedAlwaysPermission = resultObj.deniedAlways[i];
console.log('永久拒绝申请的权限:' + deniedAlwaysPermission);
result = -1
}
},
function(error) {
console.log('申请权限错误:' + error.code + " = " + error.message);
}
);
}
},
onShow() {
},
methods: {
//
changeSubject(val) {
console.log(val)
this.curObject = val
},
getProviderFn() {
}
}
}
</script>
<style scoped lang="scss">
</style>

11
pages/tabbar/learnCar/index.vue

@ -18,7 +18,7 @@
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 { requestSingleFreshLocation } from '@/common/js/qqLatLng.js'
import { getInitFaceVerify } from '@/config/api.js' import { getInitFaceVerify } from '@/config/api.js'
export default { export default {
components: { topInfo, subject1, subject2,subject3,subject4 }, components: { topInfo, subject1, subject2,subject3,subject4 },
@ -31,10 +31,13 @@
} }
}, },
onLoad() { onLoad() {
const verifyPlugin = uni.requireNativePlugin('AP-FaceDetectModule');
// #ifdef MP-WEIXIN
// initEid();
// #endif
// const verifyPlugin = uni.requireNativePlugin('AP-FaceDetectModule');
// var metaInfo = verifyPlugin.getMetaInfo(); // var metaInfo = verifyPlugin.getMetaInfo();
console.log('插件在?')
console.log(verifyPlugin)
// console.log('')
// console.log(verifyPlugin)
}, },
onShow() { onShow() {

BIN
static/images/bigImg/banner.jpg

Before

Width: 900  |  Height: 439  |  Size: 134 KiB

BIN
static/images/bigImg/banner2.jpg

Before

Width: 912  |  Height: 480  |  Size: 81 KiB

Loading…
Cancel
Save