|
|
@ -461,7 +461,7 @@ |
|
|
this.mylocation = uni.getStorageSync('mylocation') |
|
|
this.mylocation = uni.getStorageSync('mylocation') |
|
|
this.latitude = this.mylocation.latitude |
|
|
this.latitude = this.mylocation.latitude |
|
|
this.longitude = this.mylocation.longitude |
|
|
this.longitude = this.mylocation.longitude |
|
|
console.log(this.latitude, this.longitude) |
|
|
|
|
|
this.safeAreaBottom = getApp().globalData.safeAreaBottom + 66 |
|
|
this.safeAreaBottom = getApp().globalData.safeAreaBottom + 66 |
|
|
this.top = getApp().globalData.top |
|
|
this.top = getApp().globalData.top |
|
|
this.minheight = 40 |
|
|
this.minheight = 40 |
|
|
@ -471,7 +471,7 @@ |
|
|
this.draptop = this.top |
|
|
this.draptop = this.top |
|
|
}, |
|
|
}, |
|
|
onReady() { |
|
|
onReady() { |
|
|
console.log('onReady') |
|
|
|
|
|
this.getdata() |
|
|
this.getdata() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
@ -521,7 +521,7 @@ |
|
|
oid: this.info.id, |
|
|
oid: this.info.id, |
|
|
code: code |
|
|
code: code |
|
|
}, true).then(function(data) { |
|
|
}, true).then(function(data) { |
|
|
console.log(data) |
|
|
|
|
|
that.getdata() |
|
|
that.getdata() |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
uni.navigateBack({ |
|
|
uni.navigateBack({ |
|
|
@ -565,13 +565,12 @@ |
|
|
key: 'finishthumb', |
|
|
key: 'finishthumb', |
|
|
success(res) { |
|
|
success(res) { |
|
|
if (res.data.length > 0) { |
|
|
if (res.data.length > 0) { |
|
|
console.log('pppppppppppppppppppppppppp') |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
that.sendRequest('Rider.Orders.Start', { |
|
|
that.sendRequest('Rider.Orders.Start', { |
|
|
oid: that.info.id, |
|
|
oid: that.info.id, |
|
|
thumbs: JSON.stringify(res.data), |
|
|
thumbs: JSON.stringify(res.data), |
|
|
}, true).then(function(data) { |
|
|
}, true).then(function(data) { |
|
|
console.log(data) |
|
|
|
|
|
uni.setStorage({ |
|
|
uni.setStorage({ |
|
|
key: 'finishthumb', |
|
|
key: 'finishthumb', |
|
|
data: '' |
|
|
data: '' |
|
|
@ -588,14 +587,14 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
connect() { |
|
|
connect() { |
|
|
console.log("111") |
|
|
|
|
|
var that = this |
|
|
var that = this |
|
|
var tonum = that.info.recip_phone; |
|
|
var tonum = that.info.recip_phone; |
|
|
|
|
|
|
|
|
if (that.info.type < 3 && that.info.status == 3) { |
|
|
if (that.info.type < 3 && that.info.status == 3) { |
|
|
tonum = that.info.pick_phone |
|
|
tonum = that.info.pick_phone |
|
|
} |
|
|
} |
|
|
console.log(that.info) |
|
|
|
|
|
uni.makePhoneCall({ |
|
|
uni.makePhoneCall({ |
|
|
phoneNumber: tonum, |
|
|
phoneNumber: tonum, |
|
|
success: (res) => { |
|
|
success: (res) => { |
|
|
@ -603,7 +602,7 @@ |
|
|
}, |
|
|
}, |
|
|
// 失败回调 |
|
|
// 失败回调 |
|
|
fail: (res) => { |
|
|
fail: (res) => { |
|
|
console.log('调用失败!', JSON.stringify(res)) |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
// uni.getStorage({ |
|
|
// uni.getStorage({ |
|
|
@ -631,7 +630,7 @@ |
|
|
makeline() { |
|
|
makeline() { |
|
|
|
|
|
|
|
|
var that = this |
|
|
var that = this |
|
|
console.log(that.info) |
|
|
|
|
|
//订单类型 1帮送 2帮取 3帮买 4 帮排队 5帮办 |
|
|
//订单类型 1帮送 2帮取 3帮买 4 帮排队 5帮办 |
|
|
let endlatitude; |
|
|
let endlatitude; |
|
|
let endlongitude; |
|
|
let endlongitude; |
|
|
@ -676,8 +675,7 @@ |
|
|
origin: that.longitude + ',' + that.latitude, |
|
|
origin: that.longitude + ',' + that.latitude, |
|
|
destination: endlongitude + ',' + endlatitude, |
|
|
destination: endlongitude + ',' + endlatitude, |
|
|
success: function(data) { |
|
|
success: function(data) { |
|
|
console.log('路径规划完成') |
|
|
|
|
|
console.log('距离:' + data.paths[0].distance) |
|
|
|
|
|
that.scale = that.scalesize(data.paths[0].distance) |
|
|
that.scale = that.scalesize(data.paths[0].distance) |
|
|
|
|
|
|
|
|
var mydistance = 0 |
|
|
var mydistance = 0 |
|
|
@ -700,8 +698,6 @@ |
|
|
|
|
|
|
|
|
that.info.allDistance = allDistance |
|
|
that.info.allDistance = allDistance |
|
|
|
|
|
|
|
|
console.log('mydistance:' + that.info.myDistance) |
|
|
|
|
|
console.log('allDistance:' + that.info.allDistance) |
|
|
|
|
|
|
|
|
|
|
|
var points = []; |
|
|
var points = []; |
|
|
if (data.paths && data.paths[0] && data.paths[0] |
|
|
if (data.paths && data.paths[0] && data.paths[0] |
|
|
@ -744,7 +740,7 @@ |
|
|
fail: () => {}, |
|
|
fail: () => {}, |
|
|
complete: () => {} |
|
|
complete: () => {} |
|
|
}); |
|
|
}); |
|
|
console.log(data) |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, 0) |
|
|
}, 0) |
|
|
@ -757,15 +753,15 @@ |
|
|
var farray = this.wgs84togcj02(lng, lat) |
|
|
var farray = this.wgs84togcj02(lng, lat) |
|
|
lng = farray[0] |
|
|
lng = farray[0] |
|
|
lat = farray[1] |
|
|
lat = farray[1] |
|
|
console.log(farray) |
|
|
|
|
|
uni.openLocation({ |
|
|
uni.openLocation({ |
|
|
latitude: parseFloat(lat), |
|
|
latitude: parseFloat(lat), |
|
|
longitude: parseFloat(lng), |
|
|
longitude: parseFloat(lng), |
|
|
success: function() { |
|
|
success: function() { |
|
|
console.log('success'); |
|
|
|
|
|
}, |
|
|
}, |
|
|
fail(err) { |
|
|
fail(err) { |
|
|
console.log(err); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
@ -991,7 +987,7 @@ |
|
|
// #ifdef APP-PLUS |
|
|
// #ifdef APP-PLUS |
|
|
lag = system_info.appLanguage ? system_info.appLanguage : 'th-TH' |
|
|
lag = system_info.appLanguage ? system_info.appLanguage : 'th-TH' |
|
|
// #endif |
|
|
// #endif |
|
|
console.log(lag) |
|
|
|
|
|
const cur_lang = lag.indexOf('zh') != -1 ? toolData.lang = 'zh' : toolData.lang = 'th' |
|
|
const cur_lang = lag.indexOf('zh') != -1 ? toolData.lang = 'zh' : toolData.lang = 'th' |
|
|
|
|
|
|
|
|
uni.request({ |
|
|
uni.request({ |
|
|
@ -1021,7 +1017,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
fail: function(err) { |
|
|
fail: function(err) { |
|
|
console.log(err) |
|
|
|
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|