|
|
@ -39,18 +39,13 @@ |
|
|
alt="" |
|
|
alt="" |
|
|
style="width: 80rpx;height: 14rpx;position: absolute;bottom: 4rpx;left: 32rpx;" /> |
|
|
style="width: 80rpx;height: 14rpx;position: absolute;bottom: 4rpx;left: 32rpx;" /> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <view class="tabs1" @tap="checkTab1('zhuandan')" |
|
|
|
|
|
:style="{'color':tab1Checked == 'zhuandan'?'#000':'#777','font-size':tab1Checked== 'zhuandan'?'36rpx':'30rpx'}"> |
|
|
|
|
|
转单<text>()</text> |
|
|
|
|
|
<img v-if="tab1Checked == 'zhuandan'" |
|
|
|
|
|
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4bb5fc7725cb4a7a84d1d3a15f05b39c.png" |
|
|
|
|
|
alt="" |
|
|
|
|
|
style="width: 80rpx;height: 14rpx;position: absolute;bottom: 4rpx;left: 32rpx;" /> |
|
|
|
|
|
</view> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="title-refresh" :class="{'title-refresh--loading': refreshLoading}" @tap.stop="refreshCurrentTab"> |
|
|
<view class="title-refresh" :class="{'title-refresh--loading': refreshLoading}" @tap.stop="refreshCurrentTab"> |
|
|
<uni-icons type="refresh" size="20" color="#0b6b5a" style="margin-top: 6rpx;"></uni-icons> |
|
|
<uni-icons type="refresh" size="20" color="#0b6b5a" style="margin-top: 6rpx;"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view @tap="goMyCenter" class="title-refresh" style="margin-left: 40px;"> |
|
|
|
|
|
<uni-icons type="person" size="26"></uni-icons> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -940,7 +935,10 @@ |
|
|
|
|
|
|
|
|
let worker = uni.getStorageSync('worker') |
|
|
let worker = uni.getStorageSync('worker') |
|
|
if (worker == '' || worker == undefined || worker == null) { |
|
|
if (worker == '' || worker == undefined || worker == null) { |
|
|
this.tui.toast('您还没有注册兼职') |
|
|
uni.showToast({ |
|
|
|
|
|
title: '您还没有注册兼职', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.isOnLine = uni.getStorageSync('worker').isOnLine |
|
|
this.isOnLine = uni.getStorageSync('worker').isOnLine |
|
|
@ -994,6 +992,11 @@ |
|
|
} |
|
|
} |
|
|
}).exec(); |
|
|
}).exec(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
goMyCenter(){ |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: '/pages/worker/partTimeJobCenter' |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
getHomeAdImageCache() { |
|
|
getHomeAdImageCache() { |
|
|
const cache = uni.getStorageSync(HOME_AD_IMAGE_CACHE_KEY) |
|
|
const cache = uni.getStorageSync(HOME_AD_IMAGE_CACHE_KEY) |
|
|
return cache && typeof cache === 'object' ? cache : {} |
|
|
return cache && typeof cache === 'object' ? cache : {} |
|
|
@ -1079,7 +1082,10 @@ |
|
|
that.$forceUpdate() |
|
|
that.$forceUpdate() |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
that.tui.toast(res.message) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
@ -1229,7 +1235,7 @@ |
|
|
const redirectUrl = '/pages/index/index' + (!isNaN(index) && index > 0 ? '?tabIndex=' + index : '') |
|
|
const redirectUrl = '/pages/index/index' + (!isNaN(index) && index > 0 ? '?tabIndex=' + index : '') |
|
|
uni.setStorageSync(redirectKey, redirectUrl) |
|
|
uni.setStorageSync(redirectKey, redirectUrl) |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/package2/login/login?redirect=' + redirectKey |
|
|
url: '/pages/login/login?redirect=' + redirectKey |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
}, |
|
|
}, |
|
|
@ -1257,7 +1263,10 @@ |
|
|
const diff = now - this.lastRefreshTime; |
|
|
const diff = now - this.lastRefreshTime; |
|
|
if (diff < refreshInterval) { |
|
|
if (diff < refreshInterval) { |
|
|
const waitSeconds = Math.ceil((refreshInterval - diff) / 1000); |
|
|
const waitSeconds = Math.ceil((refreshInterval - diff) / 1000); |
|
|
this.tui.toast(waitSeconds + '秒后再刷新'); |
|
|
uni.showToast({ |
|
|
|
|
|
title: waitSeconds + '秒后再刷新', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
this.lastRefreshTime = now; |
|
|
this.lastRefreshTime = now; |
|
|
@ -1312,6 +1321,13 @@ |
|
|
this.getDelivery() |
|
|
this.getDelivery() |
|
|
this.$forceUpdate() |
|
|
this.$forceUpdate() |
|
|
}, |
|
|
}, |
|
|
|
|
|
resetDeliveryQuery() { |
|
|
|
|
|
this.deliveryQueryVersion++ |
|
|
|
|
|
this.searchForm.pageNum = 1 |
|
|
|
|
|
this.totalPages = 1 |
|
|
|
|
|
this.deliveryItem = [] |
|
|
|
|
|
this.resetSwipeOrder() |
|
|
|
|
|
}, |
|
|
getOrder(item, index) { |
|
|
getOrder(item, index) { |
|
|
if (!this.requireLogin(0)) { |
|
|
if (!this.requireLogin(0)) { |
|
|
this.resetSwipeOrder() |
|
|
this.resetSwipeOrder() |
|
|
@ -1338,10 +1354,16 @@ |
|
|
that.$refs.tabBar.indexWorkerCount ++ |
|
|
that.$refs.tabBar.indexWorkerCount ++ |
|
|
}else{ |
|
|
}else{ |
|
|
if(res.message == '接单成功'){ |
|
|
if(res.message == '接单成功'){ |
|
|
that.tui.toast(res.message); |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
that.$refs.tabBar.indexWorkerCount ++ |
|
|
that.$refs.tabBar.indexWorkerCount ++ |
|
|
}else{ |
|
|
}else{ |
|
|
that.tui.toast(res.message,2000); |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
that.deliveryItem.splice(index, 1) |
|
|
that.deliveryItem.splice(index, 1) |
|
|
@ -1364,7 +1386,10 @@ |
|
|
that.$forceUpdate(); |
|
|
that.$forceUpdate(); |
|
|
} else { |
|
|
} else { |
|
|
that.resetSwipeOrder(); |
|
|
that.resetSwipeOrder(); |
|
|
that.tui.toast(res.message); |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -1450,7 +1475,7 @@ |
|
|
const redirectKey = 'login_redirect_' + Date.now() |
|
|
const redirectKey = 'login_redirect_' + Date.now() |
|
|
uni.setStorageSync(redirectKey, target) |
|
|
uni.setStorageSync(redirectKey, target) |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/package2/login/login?redirect=' + redirectKey, |
|
|
url: '/pages/login/login?redirect=' + redirectKey, |
|
|
complete: () => { |
|
|
complete: () => { |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.loginRedirecting = false |
|
|
this.loginRedirecting = false |
|
|
@ -1464,13 +1489,13 @@ |
|
|
}, |
|
|
}, |
|
|
goDeliveryRanking() { |
|
|
goDeliveryRanking() { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/package2/shop/ranking' |
|
|
url: '/pages/worker/ranking' |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
goPartTimeRegister() { |
|
|
goPartTimeRegister() { |
|
|
if (uni.getStorageSync('worker')) { |
|
|
if (uni.getStorageSync('worker')) { |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/package2/myCenter/partTimeJobRegister' |
|
|
url: '/pages/worker/partTimeJobRegister' |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -1482,7 +1507,7 @@ |
|
|
if (worker) { |
|
|
if (worker) { |
|
|
this.$refs.jianzhiPopup.close() |
|
|
this.$refs.jianzhiPopup.close() |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/package2/myCenter/partTimeJobRegister' |
|
|
url: '/pages/worker/partTimeJobRegister' |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -1498,10 +1523,13 @@ |
|
|
} |
|
|
} |
|
|
this.$refs.jianzhiPopup.close() |
|
|
this.$refs.jianzhiPopup.close() |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/package2/myCenter/partTimeJobRegister' |
|
|
url: '/pages/worker/partTimeJobRegister' |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.tui.toast(res.message) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
}) |
|
|
}) |
|
|
@ -1525,7 +1553,10 @@ |
|
|
that.$refs.carPopup.open() |
|
|
that.$refs.carPopup.open() |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.tui.toast(res.message) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
}) |
|
|
}) |
|
|
@ -1636,7 +1667,10 @@ |
|
|
that.totalPages = res.result.pages; // pages = 总页数 |
|
|
that.totalPages = res.result.pages; // pages = 总页数 |
|
|
that.$forceUpdate(); |
|
|
that.$forceUpdate(); |
|
|
} else { |
|
|
} else { |
|
|
this.tui.toast(res.message) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
if (that.refreshLoading) { |
|
|
if (that.refreshLoading) { |
|
|
that.finishRefreshLoading() |
|
|
that.finishRefreshLoading() |
|
|
@ -1810,7 +1844,15 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
checkArea() { |
|
|
checkArea() { |
|
|
this.isArea = !this.isArea |
|
|
this.NB.sendRequest("/app/shopArea/getByParentId/0", {}, true, 'POST', 'application/x-www-form-urlencoded').then(res => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
this.areaList = res.result |
|
|
|
|
|
this.areaKeyword = '' |
|
|
|
|
|
this.$refs.areaPopup.open(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.tui.toast(res.message) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
openPickupCodePopup(index, item, regionId) { |
|
|
openPickupCodePopup(index, item, regionId) { |
|
|
if (this.pickupCodePopupVisible || this.pickupCodePopupOpening) return |
|
|
if (this.pickupCodePopupVisible || this.pickupCodePopupOpening) return |
|
|
@ -1851,7 +1893,10 @@ |
|
|
}, true, 'POST', 'application/x-www-form-urlencoded').then(res => { |
|
|
}, true, 'POST', 'application/x-www-form-urlencoded').then(res => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
that.deliveryItem.splice(index, 1) |
|
|
that.deliveryItem.splice(index, 1) |
|
|
that.tui.toast(res.message); |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
if (item.workerId != null && item.workerId != undefined && item.workerId != '') { |
|
|
if (item.workerId != null && item.workerId != undefined && item.workerId != '') { |
|
|
that.zhipaiCount -= 1 |
|
|
that.zhipaiCount -= 1 |
|
|
} else { |
|
|
} else { |
|
|
@ -1865,7 +1910,10 @@ |
|
|
} |
|
|
} |
|
|
that.$forceUpdate(); |
|
|
that.$forceUpdate(); |
|
|
} else { |
|
|
} else { |
|
|
that.tui.toast(res.message); |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
@ -1921,7 +1969,10 @@ |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
this.pageData.splice(context.index, 1) |
|
|
this.pageData.splice(context.index, 1) |
|
|
this.decreaseDeliveryStatusCount(2) |
|
|
this.decreaseDeliveryStatusCount(2) |
|
|
this.tui.toast(res.message, 200) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
this.$refs.pickupCodePopup.close() |
|
|
this.$refs.pickupCodePopup.close() |
|
|
this.pickupCode = '' |
|
|
this.pickupCode = '' |
|
|
this.pickupCodeContext = null |
|
|
this.pickupCodeContext = null |
|
|
@ -1946,7 +1997,10 @@ |
|
|
if (!this.ensureLogin()) return |
|
|
if (!this.ensureLogin()) return |
|
|
if (status == 3) { |
|
|
if (status == 3) { |
|
|
if (this.completingDeliveryIds[item.id]) { |
|
|
if (this.completingDeliveryIds[item.id]) { |
|
|
this.tui.toast('送达处理中,请勿重复提交 ') |
|
|
uni.showToast({ |
|
|
|
|
|
title: '送达处理中,请勿重复提交', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.$set(this.completingDeliveryIds, item.id, true) |
|
|
this.$set(this.completingDeliveryIds, item.id, true) |
|
|
@ -1983,12 +2037,16 @@ |
|
|
} else { |
|
|
} else { |
|
|
that.pageData[index].arriveTime = "qq" |
|
|
that.pageData[index].arriveTime = "qq" |
|
|
} |
|
|
} |
|
|
that.tui.toast(res.message, 200); |
|
|
uni.showToast({ |
|
|
/* that.searchForm.pageNum = 1 |
|
|
title: res.message, |
|
|
that.getDelivery() */ |
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
that.$forceUpdate(); |
|
|
that.$forceUpdate(); |
|
|
} else { |
|
|
} else { |
|
|
that.tui.toast(res.message, 200); |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
@ -2008,7 +2066,10 @@ |
|
|
that.putshopArea = res.result |
|
|
that.putshopArea = res.result |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
that.tui.toast(res.message) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
}).catch((res) => {}); |
|
|
}).catch((res) => {}); |
|
|
@ -2089,7 +2150,10 @@ |
|
|
if (!this.ensureLogin()) return |
|
|
if (!this.ensureLogin()) return |
|
|
const worker = uni.getStorageSync('worker') |
|
|
const worker = uni.getStorageSync('worker') |
|
|
if (!worker || !worker.workerId) { |
|
|
if (!worker || !worker.workerId) { |
|
|
this.tui.toast('您还没有注册兼职') |
|
|
uni.showToast({ |
|
|
|
|
|
title: '您还没有注册兼职', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
let url = '' |
|
|
let url = '' |
|
|
@ -2116,9 +2180,15 @@ |
|
|
worker.isOnLine = value; |
|
|
worker.isOnLine = value; |
|
|
this.isOnLine = value |
|
|
this.isOnLine = value |
|
|
uni.setStorageSync('worker', worker); |
|
|
uni.setStorageSync('worker', worker); |
|
|
this.tui.toast(value == 0 ? '下线后不再接收新订单通知' : res.message) |
|
|
uni.showToast({ |
|
|
|
|
|
title: value == 0 ? '下线后不再接收新订单通知' : res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
this.tui.toast(res.message) |
|
|
uni.showToast({ |
|
|
|
|
|
title: res.message, |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
}) |
|
|
}) |
|
|
@ -2161,7 +2231,7 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.delivery-title-tabs { |
|
|
.delivery-title-tabs { |
|
|
width: 600rpx; |
|
|
width: 100%; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
} |
|
|
} |
|
|
|