|
@@ -191,10 +191,20 @@
|
|
|
this.getInfo()
|
|
|
}
|
|
|
console.log(options)
|
|
|
+ var isContains = true;//隐私权政策是否包含高德开平隐私权政策 true是包含
|
|
|
+ var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示
|
|
|
+ sdkwx.updatePrivacyShow(isContains, isShow);
|
|
|
+
|
|
|
+ var isAgree = true;//隐私权政策是否取得用户同意 true是用户同意
|
|
|
+ sdkwx.updatePrivacyAgree(isAgree);
|
|
|
+ //检查定位权限
|
|
|
+ sdkwx.checkLocationPermission(function(res){
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
+ this.auth()
|
|
|
// this.detailData = JSON.parse(options.obj) ;
|
|
|
// console.log(this.detailData)
|
|
|
// CYHT20220317000001
|
|
|
- //隐私合规接口,HBuildx3.3.3及其以后的版本需要调用合规检查
|
|
|
},
|
|
|
onHide() {
|
|
|
uni.removeStorageSync(
|
|
@@ -212,18 +222,13 @@
|
|
|
...mapState(['hasLogin', 'userInfo', "firstAuthentication"])
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
auth() { //授权
|
|
|
- // var appId = "uni.UNI9C76CB6";//网络货运企业APP的唯一标识
|
|
|
- // var appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8";//网络货运企业在省平台申请的接入安全码
|
|
|
- // var enterpriseSenderCode = "23106960";//网络货运企业在省平台申请的企业发送代码
|
|
|
- // var environment = "debug";//环境:“debug”接入测试环境,“release”接入正式环境。
|
|
|
console.log("appid:" + this.appId + "安全码:" + this.appSecurity + "发送代码:" + this.enterpriseSenderCode)
|
|
|
let that = this
|
|
|
sdkwx.auth(this.appId, this.appSecurity, this.enterpriseSenderCode, this.environment, function(res) {
|
|
|
if (res.type == "onSuccess") {
|
|
|
//成功
|
|
|
- that.start()
|
|
|
+
|
|
|
console.log("授权成功")
|
|
|
console.log(res)
|
|
|
} else if (res.type == "onFailure") {
|
|
@@ -246,26 +251,35 @@
|
|
|
this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.publishTaskInfo.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.publishTaskInfo.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
this.shippingNoteInfos[0].startLongitude = this.detailData.publishTaskInfo.sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLatitude = this.detailData.publishTaskInfo.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLongitude = this.detailData.publishTaskInfo.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLatitude = this.detailData.publishTaskInfo.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLocationText = this.detailData.publishTaskInfo.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLocationText = this.detailData.publishTaskInfo.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLatitude = this.detailData.publishTaskInfo.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLongitude = this.detailData.publishTaskInfo.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLatitude = this.detailData.publishTaskInfo.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
|
|
|
this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
|
|
|
this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
|
|
|
+
|
|
|
+ //}],//运单信息列表,一辆车运单数最大支持数为 10
|
|
|
var remark = "测试"; //备注
|
|
|
let that = this
|
|
|
console.log("start this.shippingNoteInfos")
|
|
|
console.log(this.shippingNoteInfos)
|
|
|
- var shippingNoteInfos = this.shippingNoteInfos
|
|
|
- sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, shippingNoteInfos,
|
|
|
+ var param = {}
|
|
|
+ param.carNo = this.detailData.carNo
|
|
|
+ param.driverName = this.firstAuthentication.driverName
|
|
|
+ param.remark = remark
|
|
|
+ param.shippingNoteInfos = this.shippingNoteInfos
|
|
|
+ // uni.setStorageSync("sdkStartParam",param)
|
|
|
+ // uni.setStorageSync("sdkStartParamOrderNum",this.detailData.orderNo)
|
|
|
+ // this.$helper.sdkStart(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos)
|
|
|
+ sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos,
|
|
|
function(res) {
|
|
|
- var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
|
if (res.type == "onSuccess") {
|
|
|
//成功
|
|
|
console.log("开启定位成功!!!")
|
|
|
console.log(res)
|
|
|
+ var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
|
console.log(shippingNoteInfos, "sdassss")
|
|
|
if (shippingNoteInfos) {
|
|
|
let dateTtime = Number(shippingNoteInfos.interval + 1000)
|
|
@@ -294,21 +308,16 @@
|
|
|
let that = this
|
|
|
console.log("send this.shippingNoteInfos")
|
|
|
console.log(this.shippingNoteInfos)
|
|
|
- var shippingNoteInfos = this.shippingNoteInfos;
|
|
|
- sdkwx.send(this.detailData.carNo, this.firstAuthentication.driverName, remark, shippingNoteInfos,
|
|
|
+ sdkwx.send(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos,
|
|
|
function(res) {
|
|
|
console.log('发送定位', res);
|
|
|
- var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
|
if (res.type == "onSuccess") {
|
|
|
-
|
|
|
- if (shippingNoteInfos) {
|
|
|
- let dateTime = Number(shippingNoteInfos.interval + 1000)
|
|
|
- console.log("定时开始", dateTime)
|
|
|
- that.timer = setTimeout(() => {
|
|
|
- //TODO
|
|
|
- that.send()
|
|
|
- }, dateTime);
|
|
|
- }
|
|
|
+ var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
|
+ let dateTtime = Number(shippingNoteInfos.interval + 1000)
|
|
|
+ console.log("开始定时", dateTtime)
|
|
|
+ that.timer = setTimeout(() => {
|
|
|
+ that.send()
|
|
|
+ }, dateTtime);
|
|
|
} else if (res.type == "onFailure") {
|
|
|
var errorCode = res.data.errorCode; //错误码
|
|
|
var errorMsg = res.data.errorMsg; //错误描述
|
|
@@ -746,7 +755,7 @@
|
|
|
if (this.detailData.statusFlag == 1) {
|
|
|
_title = '暂存成功!'
|
|
|
} else {
|
|
|
- that.auth() //开始授权并开始定位
|
|
|
+ that.start() //开始授权并开始定位
|
|
|
_title = '提交成功!'
|
|
|
}
|
|
|
that.$helper.fUN_AmapLocation.start({
|
|
@@ -805,6 +814,7 @@
|
|
|
//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'success',
|
|
|
message: _title,
|