-
-
+
+
-
@@ -473,7 +493,9 @@
autoplay: true,
deliveryItem:[],
interval: 4000,
+ onlineWorkerInterval:4000,
duration: 1000,
+ onlineWorkerDuration:1000,
latitude: 39.909, // 默认纬度,可以设为用户当前位置或配送员位置
longitude: 116.39742, // 默认经度
markers: [], // 标记点,可以包括配送员位置和用户位置
@@ -492,6 +514,7 @@
}],
dataList: [],
areaList:[],
+ orderLists:[],
waimaiCount:0,
kuaidiCount:0,
paotuiCount:0,
@@ -600,6 +623,7 @@
}
// 获取用户当前位置
this.getUserLocation();
+ this.getUserOrders();
// 建立WebSocket连接或定时请求获取配送员位置
this.getDeliveryLocation();
if(!uni.getStorageSync('area')){
@@ -785,6 +809,11 @@
url: url
})
},
+ goOrderDetail(item){
+ uni.redirectTo({
+ url: '/package1/order/orderDetail?id=' + item.id
+ });
+ },
onClickArea(item){
uni.setStorageSync('area',JSON.stringify(item))
this.searchForm.regionId = item.id
@@ -828,6 +857,20 @@
}
}).catch((res) => {})
},
+ getUserOrders(){
+ let that = this
+ that.tui.request("/mall/order/getOrdersByUserId/"+ uni.getStorageSync('id'), "GET", {}, false, true).then((res) => {
+ if (res.code == 200) {
+ if(res.result != null){
+ that.orderLists = res.result
+ that.$forceUpdate()
+ }
+ } else {
+ that.tui.toast(res.message)
+ return
+ }
+ }).catch((res) => {})
+ },
searchOrder(type, value) {
if (type == 'getarea') {
if(this.searchForm.getAreaId == value.id){