|
@@ -122,7 +122,7 @@
|
|
<script>
|
|
<script>
|
|
let that;
|
|
let that;
|
|
//插件对象
|
|
//插件对象
|
|
- // var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
|
|
|
|
|
|
+ var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
|
|
import uploadImage from '@/components/ossutil/uploadFile.js';
|
|
import uploadImage from '@/components/ossutil/uploadFile.js';
|
|
import * as config from '@/config/index.js'
|
|
import * as config from '@/config/index.js'
|
|
import {
|
|
import {
|
|
@@ -209,13 +209,16 @@
|
|
sdkwx.checkLocationPermission(function(res) {
|
|
sdkwx.checkLocationPermission(function(res) {
|
|
console.log(res);
|
|
console.log(res);
|
|
});
|
|
});
|
|
- // this.auth()
|
|
|
|
|
|
+
|
|
|
|
+ this.auth()
|
|
|
|
+
|
|
},
|
|
},
|
|
onHide() {
|
|
onHide() {
|
|
uni.removeStorageSync(
|
|
uni.removeStorageSync(
|
|
"contractdata")
|
|
"contractdata")
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
|
|
+
|
|
this.firstAuthentication = uni.getStorageSync("firstAuthentication")
|
|
this.firstAuthentication = uni.getStorageSync("firstAuthentication")
|
|
if (uni.getStorageSync('contractdata')) {
|
|
if (uni.getStorageSync('contractdata')) {
|
|
this.id = uni.getStorageSync('contractdata').id
|
|
this.id = uni.getStorageSync('contractdata').id
|
|
@@ -236,10 +239,6 @@
|
|
if (res.type == "onSuccess") {
|
|
if (res.type == "onSuccess") {
|
|
//成功
|
|
//成功
|
|
console.log("授权成功")
|
|
console.log("授权成功")
|
|
- that.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: "授权成功"
|
|
|
|
- })
|
|
|
|
console.log(res)
|
|
console.log(res)
|
|
} else if (res.type == "onFailure") {
|
|
} else if (res.type == "onFailure") {
|
|
//失败
|
|
//失败
|
|
@@ -294,10 +293,6 @@
|
|
if (res.type == "onSuccess") {
|
|
if (res.type == "onSuccess") {
|
|
//成功
|
|
//成功
|
|
console.log("开启定位成功!!!")
|
|
console.log("开启定位成功!!!")
|
|
- that.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: "开启定位成功"
|
|
|
|
- })
|
|
|
|
console.log(res)
|
|
console.log(res)
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
if (shippingNoteInfos) {
|
|
if (shippingNoteInfos) {
|
|
@@ -305,7 +300,7 @@
|
|
console.log("开始定时", dateTtime)
|
|
console.log("开始定时", dateTtime)
|
|
that.send()
|
|
that.send()
|
|
}
|
|
}
|
|
- that.affirm(val) //管局上报成功后提交
|
|
|
|
|
|
+ // that.affirm(val) //管局上报成功后提交
|
|
} else if (res.type == "onFailure") {
|
|
} else if (res.type == "onFailure") {
|
|
//失败
|
|
//失败
|
|
console.log("开启定位失败!!!")
|
|
console.log("开启定位失败!!!")
|
|
@@ -336,10 +331,6 @@
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
let dateTtime = Number(shippingNoteInfos.interval + 1000)
|
|
let dateTtime = Number(shippingNoteInfos.interval + 1000)
|
|
console.log("开始定时", dateTtime)
|
|
console.log("开始定时", dateTtime)
|
|
- that.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: "发送定位成功"
|
|
|
|
- })
|
|
|
|
that.timer = setTimeout(() => {
|
|
that.timer = setTimeout(() => {
|
|
that.send()
|
|
that.send()
|
|
}, dateTtime);
|
|
}, dateTtime);
|
|
@@ -350,10 +341,10 @@
|
|
console.log("定时")
|
|
console.log("定时")
|
|
that.send()
|
|
that.send()
|
|
}, 915204); //15分钟
|
|
}, 915204); //15分钟
|
|
- that.$refs.uToast.show({
|
|
|
|
- type: 'error',
|
|
|
|
- message: "管局上报-" + errorMsg
|
|
|
|
- })
|
|
|
|
|
|
+ // that.$refs.uToast.show({
|
|
|
|
+ // type: 'error',
|
|
|
|
+ // message: "管局上报-" + errorMsg
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -766,7 +757,7 @@
|
|
_title = '暂存成功!'
|
|
_title = '暂存成功!'
|
|
return
|
|
return
|
|
} else {
|
|
} else {
|
|
- // that.start() //开始授权并开始定位
|
|
|
|
|
|
+ that.start() //开始授权并开始定位
|
|
_title = '提交成功!'
|
|
_title = '提交成功!'
|
|
}
|
|
}
|
|
that.$helper.fUN_AmapLocation.start({
|
|
that.$helper.fUN_AmapLocation.start({
|