|
@@ -194,6 +194,7 @@
|
|
// this.detailData = JSON.parse(options.obj) ;
|
|
// this.detailData = JSON.parse(options.obj) ;
|
|
// console.log(this.detailData)
|
|
// console.log(this.detailData)
|
|
// CYHT20220317000001
|
|
// CYHT20220317000001
|
|
|
|
+ //隐私合规接口,HBuildx3.3.3及其以后的版本需要调用合规检查
|
|
},
|
|
},
|
|
onHide() {
|
|
onHide() {
|
|
uni.removeStorageSync(
|
|
uni.removeStorageSync(
|
|
@@ -211,25 +212,7 @@
|
|
...mapState(['hasLogin', 'userInfo', "firstAuthentication"])
|
|
...mapState(['hasLogin', 'userInfo', "firstAuthentication"])
|
|
},
|
|
},
|
|
methods: {
|
|
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() { //授权
|
|
auth() { //授权
|
|
// var appId = "uni.UNI9C76CB6";//网络货运企业APP的唯一标识
|
|
// var appId = "uni.UNI9C76CB6";//网络货运企业APP的唯一标识
|
|
// var appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8";//网络货运企业在省平台申请的接入安全码
|
|
// var appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8";//网络货运企业在省平台申请的接入安全码
|
|
@@ -259,30 +242,18 @@
|
|
//车牌号 //司机姓名 //备注 //运单信息列表
|
|
//车牌号 //司机姓名 //备注 //运单信息列表
|
|
console.log(this.detailData, "行政区划分")
|
|
console.log(this.detailData, "行政区划分")
|
|
this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
|
|
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)
|
|
|
|
-
|
|
|
|
- //}],//运单信息列表,一辆车运单数最大支持数为 10
|
|
|
|
|
|
+ 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.publishTaskInfo.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
|
+ this.shippingNoteInfos[0].endLocationText = this.detailData.publishTaskInfo.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)
|
|
var remark = "测试"; //备注
|
|
var remark = "测试"; //备注
|
|
let that = this
|
|
let that = this
|
|
console.log("start this.shippingNoteInfos")
|
|
console.log("start this.shippingNoteInfos")
|
|
@@ -290,11 +261,11 @@
|
|
var shippingNoteInfos = this.shippingNoteInfos
|
|
var shippingNoteInfos = this.shippingNoteInfos
|
|
sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, shippingNoteInfos,
|
|
sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, shippingNoteInfos,
|
|
function(res) {
|
|
function(res) {
|
|
|
|
+ var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
if (res.type == "onSuccess") {
|
|
if (res.type == "onSuccess") {
|
|
//成功
|
|
//成功
|
|
console.log("开启定位成功!!!")
|
|
console.log("开启定位成功!!!")
|
|
console.log(res)
|
|
console.log(res)
|
|
- var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
|
|
console.log(shippingNoteInfos, "sdassss")
|
|
console.log(shippingNoteInfos, "sdassss")
|
|
if (shippingNoteInfos) {
|
|
if (shippingNoteInfos) {
|
|
let dateTtime = Number(shippingNoteInfos.interval + 1000)
|
|
let dateTtime = Number(shippingNoteInfos.interval + 1000)
|