|
@@ -137,18 +137,18 @@
|
|
this.$api.logout()
|
|
this.$api.logout()
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
-
|
|
|
|
|
|
+
|
|
// #ifdef APP-PLUS
|
|
// #ifdef APP-PLUS
|
|
- var isContains = true;//隐私权政策是否包含高德开平隐私权政策 true是包含
|
|
|
|
- var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示
|
|
|
|
|
|
+ var isContains = true; //隐私权政策是否包含高德开平隐私权政策 true是包含
|
|
|
|
+ var isShow = true; //隐私权政策是否弹窗展示告知用户 true是展示
|
|
sdkwx.updatePrivacyShow(isContains, isShow);
|
|
sdkwx.updatePrivacyShow(isContains, isShow);
|
|
-
|
|
|
|
- var isAgree = true;//隐私权政策是否取得用户同意 true是用户同意
|
|
|
|
|
|
+
|
|
|
|
+ var isAgree = true; //隐私权政策是否取得用户同意 true是用户同意
|
|
sdkwx.updatePrivacyAgree(isAgree);
|
|
sdkwx.updatePrivacyAgree(isAgree);
|
|
//检查定位权限
|
|
//检查定位权限
|
|
- sdkwx.checkLocationPermission(function(res){
|
|
|
|
- console.log(res);
|
|
|
|
- });
|
|
|
|
|
|
+ // sdkwx.checkLocationPermission(function(res){
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // });
|
|
// #endif
|
|
// #endif
|
|
|
|
|
|
if (wx.getUserProfile) {
|
|
if (wx.getUserProfile) {
|
|
@@ -178,7 +178,7 @@
|
|
function(res) {
|
|
function(res) {
|
|
if (res.type == "onSuccess") {
|
|
if (res.type == "onSuccess") {
|
|
//成功
|
|
//成功
|
|
- console.log("开启定位成功!!!",res)
|
|
|
|
|
|
+ console.log("开启定位成功!!!", res)
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
if (shippingNoteInfos) {
|
|
if (shippingNoteInfos) {
|
|
let dateTtime = Number(shippingNoteInfos.interval + 60000)
|
|
let dateTtime = Number(shippingNoteInfos.interval + 60000)
|
|
@@ -190,7 +190,7 @@
|
|
}
|
|
}
|
|
} else if (res.type == "onFailure") {
|
|
} else if (res.type == "onFailure") {
|
|
//失败
|
|
//失败
|
|
- console.log("开启定位失败!!!",res)
|
|
|
|
|
|
+ console.log("开启定位失败!!!", res)
|
|
var errorCode = res.data.errorCode; //错误码
|
|
var errorCode = res.data.errorCode; //错误码
|
|
var errorMsg = res.data.errorMsg; //错误描述
|
|
var errorMsg = res.data.errorMsg; //错误描述
|
|
that.timer = setTimeout(() => { //失败也需要定时发送定位
|
|
that.timer = setTimeout(() => { //失败也需要定时发送定位
|
|
@@ -208,7 +208,7 @@
|
|
.shippingNoteInfos,
|
|
.shippingNoteInfos,
|
|
function(res) {
|
|
function(res) {
|
|
if (res.type == "onSuccess") {
|
|
if (res.type == "onSuccess") {
|
|
- console.log("App.vue发送定位成功",res)
|
|
|
|
|
|
+ console.log("App.vue发送定位成功", res)
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
if (shippingNoteInfos) {
|
|
if (shippingNoteInfos) {
|
|
let dateTime = Number(shippingNoteInfos.interval + 60000)
|
|
let dateTime = Number(shippingNoteInfos.interval + 60000)
|
|
@@ -249,12 +249,12 @@
|
|
if (res.data.length > 0) {
|
|
if (res.data.length > 0) {
|
|
that.restart()
|
|
that.restart()
|
|
}
|
|
}
|
|
- console.log("授权成功",res)
|
|
|
|
|
|
+ console.log("授权成功", res)
|
|
} else if (res.type == "onFailure") {
|
|
} else if (res.type == "onFailure") {
|
|
//失败
|
|
//失败
|
|
var errorCode = res.data.errorCode; //错误码
|
|
var errorCode = res.data.errorCode; //错误码
|
|
var errorMsg = res.data.errorMsg; //错误描述
|
|
var errorMsg = res.data.errorMsg; //错误描述
|
|
- console.log("授权失败","没有可定位的订单")
|
|
|
|
|
|
+ console.log("授权失败", "没有可定位的订单")
|
|
console.log(res)
|
|
console.log(res)
|
|
}
|
|
}
|
|
// uni.showModal({
|
|
// uni.showModal({
|
|
@@ -348,11 +348,14 @@
|
|
commonId: uni.getStorageSync('userInfo').id,
|
|
commonId: uni.getStorageSync('userInfo').id,
|
|
}).then(res1 => {
|
|
}).then(res1 => {
|
|
if (res1.data.length > 0) {
|
|
if (res1.data.length > 0) {
|
|
- that.shippingNoteInfos[0].shippingNoteNumber = res1.data[0].orderNo //运单号
|
|
|
|
|
|
+ that.shippingNoteInfos[0].shippingNoteNumber = res1.data[0]
|
|
|
|
+ .orderNo //运单号
|
|
that.shippingNoteInfos[0].serialNumber = "0000" //分单号
|
|
that.shippingNoteInfos[0].serialNumber = "0000" //分单号
|
|
- that.shippingNoteInfos[0].startCountrySubdivisionCode = res1.data[0]
|
|
|
|
|
|
+ that.shippingNoteInfos[0].startCountrySubdivisionCode =
|
|
|
|
+ res1.data[0]
|
|
.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
- that.shippingNoteInfos[0].endCountrySubdivisionCode = res1.data[0]
|
|
|
|
|
|
+ that.shippingNoteInfos[0].endCountrySubdivisionCode = res1
|
|
|
|
+ .data[0]
|
|
.unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
.unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
that.shippingNoteInfos[0].startLongitude = res1.data[0]
|
|
that.shippingNoteInfos[0].startLongitude = res1.data[0]
|
|
.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|