tianyi 4 weeks ago
parent
commit
b3b246673c
  1. 37
      package1/index/deliveryPersonList.vue

37
package1/index/deliveryPersonList.vue

@ -65,7 +65,7 @@
</view> </view>
<view class="man-num"> <view class="man-num">
平均配送时长 <text 平均配送时长 <text
style="font-size: 30rpx;font-weight: 700;color: #000;">{{worker.avgTime || 30}}</text>分钟 style="font-size: 30rpx;font-weight: 700;color: #000;">{{worker.avgTime | zhengshu}}</text>分钟
</view> </view>
</view> </view>
</view> </view>
@ -83,8 +83,13 @@
</view> </view>
</view> </view>
<view class="man-mank"> <view class="man-mank">
<view style="flex: 1;">
备注:<text style="color: #000;">{{worker.remark || '无'}}</text> 备注:<text style="color: #000;">{{worker.remark || '无'}}</text>
</view> </view>
<view class="" @tap.stop="getLoca(worker)">
查看位置
</view>
</view>
</view> </view>
<uni-load-more :status="loadStatus" @change="onChange" /> <uni-load-more :status="loadStatus" @change="onChange" />
</view> </view>
@ -128,6 +133,12 @@
keyword: '' keyword: ''
} }
}, },
filters:{
zhengshu(t){
let intNum = Math.round(t);
return intNum
}
},
onReachBottom() { onReachBottom() {
if (this.pageNum >= this.totalPages) return; if (this.pageNum >= this.totalPages) return;
// this.status = 'loading'; // this.status = 'loading';
@ -153,6 +164,29 @@
this.regionId = JSON.parse(uni.getStorageSync('area')).id this.regionId = JSON.parse(uni.getStorageSync('area')).id
}, },
methods: { methods: {
getLoca(item){
console.log('aaaaa',item)
this.markers = [{
id: 0,
latitude: item.geolocation[0],
longitude: item.geolocation[1],
title: item.workerName,
iconPath: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/801c569079da4540990c1cc634186fdd.png', //
width: 30,
height: 30,
callout: {
content: item.workerName,
color: '#333333',
fontSize: 14,
borderRadius: 10,
bgColor: '#ffffff',
padding: 6,
display: 'ALWAYS' // 'BYCLICK'() 'ALWAYS'()
}
}]
this.latitude = this.markers[0].latitude
this.longitude = this.markers[0].longitude
},
getShopList() { getShopList() {
this.loadStatus = 'loading'; this.loadStatus = 'loading';
// Fake request to our new endpoint // Fake request to our new endpoint
@ -419,6 +453,7 @@
line-height: 40rpx; line-height: 40rpx;
color: #777; color: #777;
font-weight: 700; font-weight: 700;
display: flex;
} }
.shop-menu-purchase { .shop-menu-purchase {

Loading…
Cancel
Save