tianyi 4 weeks ago
parent
commit
51788eaaaf
  1. 80
      components/tab-bar/delivery.vue

80
components/tab-bar/delivery.vue

@ -36,15 +36,15 @@
</view>
<view style="height: 50rpx;width: 95%;margin: -200rpx auto 0;display: flex;line-height: 50rpx;">
<view class="guize-box1" :style="{'background':tab1Checked1 == 'fantuan'?'rgba(130, 255, 130, 1)':'#F5F5F5'}" @tap="chooseType('fantuan')">
<view class="guize-box1" :style="{'background':tab1Checked1 == 'fantuan'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}" @tap="chooseType('fantuan')">
<uni-icons type="info" size="10"></uni-icons>
饭团
</view>
<view class="guize-box1" :style="{'background':tab1Checked1 == 'kuaidi'?'rgba(130, 255, 130, 1)':'#F5F5F5'}" @tap="chooseType('kuaidi')">
<view class="guize-box1" :style="{'background':tab1Checked1 == 'kuaidi'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}" @tap="chooseType('kuaidi')">
<uni-icons type="info" size="10"></uni-icons>
快递
</view>
<view class="guize-box1" :style="{'background':tab1Checked1 == 'paotui'?'rgba(130, 255, 130, 1)':'#F5F5F5'}" @tap="chooseType('paotui')">
<view class="guize-box1" :style="{'background':tab1Checked1 == 'paotui'?'rgba(130, 255, 130, 1)':'rgba(247, 248, 248, 0.6)'}" @tap="chooseType('paotui')">
<uni-icons type="info" size="10"></uni-icons>
跑腿
</view>
@ -84,11 +84,11 @@
</view>
</view>
<view class="" v-if="item.remark != '' && item.remark != null"
style="background: #f5f5f5;height: 80rpx;line-height: 80rpx;font-weight: 500;padding: 0 20rpx;border-radius: 20rpx;">
style="background: rgba(247, 248, 248, 0.6);height: 80rpx;line-height: 80rpx;font-weight: 500;padding: 0 20rpx;border-radius: 20rpx;">
备注{{item.remark}}
</view>
<view class="" v-if="item.deliveryType == 3 || item.deliveryType == 2"
style="background: #f5f5f5;line-height: 80rpx;font-weight: 700;padding: 0 20rpx;border-radius: 20rpx;margin-top: 20rpx;color: #777;">
style="background: rgba(247, 248, 248, 0.6);line-height: 80rpx;font-weight: 700;padding: 0 20rpx;border-radius: 20rpx;margin-top: 20rpx;color: #777;">
<view style="display: flex;">
<view style="flex:1">
{{item.allCount != null ? item.allCount : 0}}
@ -395,28 +395,7 @@
//
getUserLocation() {
let that = this;
uni.getLocation({
type: 'gcj02', //
success: (res) => {
console.log('位置', res)
this.latitude = res.latitude;
this.longitude = res.longitude;
// //
// 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(){
console.log("11111")
@ -662,24 +641,35 @@
url = "/mall/delivery/arriveShop"
}
let that = this
that.getUserLocation()
that.tui.request(url, "POST", {regionId:regionId,deliveryId:item.id,workerId:item.workerId,geolocation:that.latitude + ',' + that.longitude}, false, true).then((res) => {
if (res.code == 200) {
if(status == 2 || status == 3){
that.pageData.splice(index, 1)
}else{
that.pageData[index].arriveTime = "qq"
}
that.tui.toast(res.message,200);
/* that.searchForm.pageNum = 1
that.getDelivery() */
that.$forceUpdate();
} else {
that.tui.toast(res.message,200);
return;
uni.getLocation({
type: 'gcj02', //
success: (res) => {
console.log('位置', res)
that.latitude = res.latitude;
that.longitude = res.longitude;
that.tui.request(url, "POST", {regionId:regionId,deliveryId:item.id,workerId:item.workerId,geolocation:that.latitude + ',' + that.longitude}, false, true).then((res) => {
if (res.code == 200) {
if(status == 2 || status == 3){
that.pageData.splice(index, 1)
}else{
that.pageData[index].arriveTime = "qq"
}
that.tui.toast(res.message,200);
/* that.searchForm.pageNum = 1
that.getDelivery() */
that.$forceUpdate();
} else {
that.tui.toast(res.message,200);
return;
}
uni.hideLoading();
}).catch((res) => {});
},
fail: (err) => {
console.log('获取位置失败', err);
}
uni.hideLoading();
}).catch((res) => {});
});
},
checkTab1(type) {
this.tab1Checked = type
@ -840,7 +830,7 @@
top: -20rpx;
right: 20rpx;
text-align: center;
line-height: 90rpx;
line-height: 140rpx;
font-weight: 900;
font-size: 24rpx;
}

Loading…
Cancel
Save