wangfukang 12 hours ago
parent
commit
84fa32ff7f
  1. 1
      package1/group/groupBuyList.vue
  2. 46
      package1/index/deliveryPersonList.vue

1
package1/group/groupBuyList.vue

@ -281,6 +281,7 @@
}, },
onShow() { onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).id
// uni.showLoading({ // uni.showLoading({
// title: '...', // title: '...',
// mask: true // mask: true

46
package1/index/deliveryPersonList.vue

@ -79,6 +79,7 @@
备注:<text style="color: #000;">{{worker.remark || '无'}}</text> 备注:<text style="color: #000;">{{worker.remark || '无'}}</text>
</view> </view>
</view> </view>
<uni-load-more :status="loadStatus" @change="onChange" />
</view> </view>
</template> </template>
@ -86,6 +87,7 @@
export default { export default {
data() { data() {
return { return {
loadStatus: 'more',
isArea: false, isArea: false,
latitude: 39.909, // latitude: 39.909, //
longitude: 116.39742, // longitude: 116.39742, //
@ -103,14 +105,28 @@
},{ },{
id: 2, id: 2,
title: '配送费低' title: '配送费低'
},{
id: 3,
title: '清空'
}], }],
shopAreaId: '', shopAreaId: '',
regionId:JSON.parse(uni.getStorageSync('area')).id,
sortField:"score",
putAreaId: '', putAreaId: '',
workerList: [], workerList: [],
orderType:null, orderType:null,
pageNum: 1, //
pageSize: 10,
totalPages: 1,
keyword: '' keyword: ''
} }
}, },
onReachBottom() {
if (this.pageNum >= this.totalPages) return;
// this.status = 'loading';
this.pageNum++;
this.getShopList();
},
onLoad(option) { onLoad(option) {
this.shopAreaId = option.shopAreaId || ''; this.shopAreaId = option.shopAreaId || '';
this.putAreaId = option.putAreaId || ''; this.putAreaId = option.putAreaId || '';
@ -119,9 +135,11 @@
}, },
onShow() { onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
this.regionId = JSON.parse(uni.getStorageSync('area')).id
}, },
methods: { methods: {
getShopList() { getShopList() {
this.loadStatus = 'loading';
// Fake request to our new endpoint // Fake request to our new endpoint
let payload = { let payload = {
shopAreaId: this.shopAreaId, shopAreaId: this.shopAreaId,
@ -129,11 +147,25 @@
putAreaId: this.putAreaId, putAreaId: this.putAreaId,
baozhang: this.baozhang, baozhang: this.baozhang,
xiangtong: this.xiangtong, xiangtong: this.xiangtong,
keyword: this.keyword sortField:this.sortField,
regionId:this.regionId,
keyword: this.keyword,
pageNum: this.pageNum,
pageSize: this.pageSize
}; };
let that = this
this.tui.request("/worker/getMatchingWorkerList", "POST", payload, false, false).then(res => { this.tui.request("/worker/getMatchingWorkerList", "POST", payload, false, false).then(res => {
that.loadStatus = 'nomore';
if(res.code == 200) { if(res.code == 200) {
this.workerList = res.result || []; if(res.result != null){
if (that.pageNum == 1) {
that.workerList = res.result.records || [];
} else {
that.workerList = [...that.workerList, ...res.result.records];
}
that.totalPages = res.result.pages; // pages =
that.$forceUpdate();
}
} }
}); });
}, },
@ -144,7 +176,15 @@
}, },
searchShop(type, value) { searchShop(type, value) {
if (type == 'area') { if (type == 'area') {
// this.searchForm.shopArea = value if(value == 0){
this.sortField = 'avgTime'
}else if(value == 1){
this.sortField = 'score'
}else if(value == 2){
this.sortField = 'orderBkge'
}else{
this.sortField = 'score'
}
} else if (type == 'baozhang') { } else if (type == 'baozhang') {
this.baozhang = !this.baozhang this.baozhang = !this.baozhang
} else if (type == 'xiangtong') { } else if (type == 'xiangtong') {

Loading…
Cancel
Save