|
@@ -191,6 +191,17 @@
|
|
|
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
|
|
@@ -211,36 +222,13 @@
|
|
|
...mapState(['hasLogin', 'userInfo', "firstAuthentication"])
|
|
|
},
|
|
|
methods: {
|
|
|
- //确认装车提交成功后,开启实时定位,
|
|
|
- // 调接口5分钟一次发送轨迹,[
|
|
|
- // {latitude: 39.997761, longitude: 116.478935},
|
|
|
- // {latitude: 39.997825, longitude: 116.478939},
|
|
|
- // {latitude: 39.998549, longitude: 116.478912},
|
|
|
- // {latitude: 39.998555, longitude: 116.478998},
|
|
|
- // {latitude: 39.998566, longitude: 116.479282},
|
|
|
- // {latitude: 39.998528, longitude: 116.479658},
|
|
|
- // {latitude: 39.998453, longitude: 116.480151},
|
|
|
- // {latitude: 39.998302, longitude: 116.480784},
|
|
|
- // {latitude: 39.998184, longitude: 116.481149},
|
|
|
- // {latitude: 39.997997, longitude: 116.481573},
|
|
|
- // {latitude: 39.997846, longitude: 116.481863},
|
|
|
- // {latitude: 39.997718, longitude: 116.482072},
|
|
|
- // {latitude: 39.997718, longitude: 116.482362},
|
|
|
- // {latitude: 39.998935, longitude: 116.483633},
|
|
|
- // {latitude: 39.998968, longitude: 116.48367},
|
|
|
- // {latitude: 39.999861, longitude: 116.484648}
|
|
|
- // ]
|
|
|
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") {
|
|
@@ -259,24 +247,32 @@
|
|
|
//车牌号 //司机姓名 //备注 //运单信息列表
|
|
|
console.log(this.detailData, "行政区划分")
|
|
|
this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
|
|
|
- this.shippingNoteInfos[0].serialNumber = "0000", //分单号
|
|
|
- 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.loadingLatitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLatitude = this.detailData.loadingLatitude, //起点位置纬度,调用 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)
|
|
|
+ this.shippingNoteInfos[0].serialNumber = "0000", //分单号
|
|
|
+ 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.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 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) {
|
|
|
if (res.type == "onSuccess") {
|
|
@@ -759,7 +755,7 @@
|
|
|
if (this.detailData.statusFlag == 1) {
|
|
|
_title = '暂存成功!'
|
|
|
} else {
|
|
|
- that.auth() //开始授权并开始定位
|
|
|
+ that.start() //开始授权并开始定位
|
|
|
_title = '提交成功!'
|
|
|
}
|
|
|
that.$helper.fUN_AmapLocation.start({
|
|
@@ -818,6 +814,7 @@
|
|
|
//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'success',
|
|
|
message: _title,
|