tianyi 1 month ago
parent
commit
160ec6d1b9
  1. 35
      components/tab-bar/delivery.vue

35
components/tab-bar/delivery.vue

@ -390,6 +390,39 @@
this.getDelivery() this.getDelivery()
this.$forceUpdate() this.$forceUpdate()
}, },
//
getUserLocation() {
let that = this;
uni.getLocation({
type: 'gcj02', //
success: (res) => {
console.log('位置', res)
this.latitude = res.latitude;
this.longitude = res.longitude;
that.tui.request("/worker/admin/edit", "POST", {
workerId:uni.getStorageSync('worker').workerId,
region:JSON.parse(uni.getStorageSync('area')).id,
geolocation:this.latitude + ',' + this.longitude
}, false, false).then((res) => {
}).catch((res) => {})
// //
// this.markers.push({
// id: 0,
// latitude: res.latitude,
// longitude: res.longitude,
// title: '',
// iconPath: '/static/images/tabbar/fabu1.png', //
// width: 30,
// height: 30
// });
},
fail: (err) => {
console.log('获取位置失败', err);
}
});
},
onReachPage(){ onReachPage(){
console.log("11111") console.log("11111")
if (this.searchForm.pageNum >= this.totalPages) return; if (this.searchForm.pageNum >= this.totalPages) return;
@ -635,7 +668,7 @@
let that = this let that = this
that.tui.request(url, "POST", {deliveryId:item.id,workerId:item.workerId}, false, true).then((res) => { that.tui.request(url, "POST", {deliveryId:item.id,workerId:item.workerId}, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.getUserLocation()
if(status == 2 || status == 3){ if(status == 2 || status == 3){
that.pageData.splice(index, 1) that.pageData.splice(index, 1)
}else{ }else{

Loading…
Cancel
Save