|
|
@ -79,7 +79,9 @@ |
|
|
<view v-if="item.deliveryType == 3" style="height: 40rpx;line-height: 40rpx;background: rgba(130, 255, 130, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;"> |
|
|
<view v-if="item.deliveryType == 3" style="height: 40rpx;line-height: 40rpx;background: rgba(130, 255, 130, 1);padding: 0 16rpx;border-radius: 40rpx;margin: 14rpx 20rpx 0 0;"> |
|
|
代跑腿 |
|
|
代跑腿 |
|
|
</view> |
|
|
</view> |
|
|
({{item.mustFinishTime != null ? item.mustFinishTime : '' | formatHourMinute }}前送达) |
|
|
<view class="" :style="{'color':shouldNotify(item.mustFinishTime)?'red':''}"> |
|
|
|
|
|
{{item.mustFinishTime != null ? item.mustFinishTime : '' | formatHourMinute }}前送达 |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" v-if="item.remark != '' && item.remark != null" |
|
|
<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: #f5f5f5;height: 80rpx;line-height: 80rpx;font-weight: 500;padding: 0 20rpx;border-radius: 20rpx;"> |
|
|
@ -370,7 +372,7 @@ |
|
|
const minute = String(date.getMinutes()).padStart(2, '0'); |
|
|
const minute = String(date.getMinutes()).padStart(2, '0'); |
|
|
|
|
|
|
|
|
// 拼接格式:日-日-时:分 |
|
|
// 拼接格式:日-日-时:分 |
|
|
return `${day}-${hour}:${minute}`; |
|
|
return `${day}日${hour}:${minute}`; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
@ -408,6 +410,20 @@ |
|
|
this.getDelivery() |
|
|
this.getDelivery() |
|
|
this.$forceUpdate(); |
|
|
this.$forceUpdate(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
shouldNotify(mustFinishTimeStr) { |
|
|
|
|
|
// 直接解析 ISO 8601 格式的时间字符串(自动处理时区偏移) |
|
|
|
|
|
const targetTime = new Date(mustFinishTimeStr); |
|
|
|
|
|
// 校验解析是否成功 |
|
|
|
|
|
if (isNaN(targetTime.getTime())) { |
|
|
|
|
|
throw new Error('Invalid date format: ' + mustFinishTimeStr); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const currentTime = new Date(); |
|
|
|
|
|
const diffMs = targetTime - currentTime; // 毫秒差,正数表示未来,负数表示已过 |
|
|
|
|
|
|
|
|
|
|
|
// 超过目标时间(diffMs <= 0)或 剩余时间不到10分钟(0 < diffMs < 600000) |
|
|
|
|
|
return diffMs <= 0 || diffMs < 10 * 60 * 1000; |
|
|
|
|
|
}, |
|
|
getDelivery(){ |
|
|
getDelivery(){ |
|
|
let that = this |
|
|
let that = this |
|
|
this.tui.request("/mall/delivery/pagebyworker", "POST", this.searchForm, false, false).then((res) => { |
|
|
this.tui.request("/mall/delivery/pagebyworker", "POST", this.searchForm, false, false).then((res) => { |
|
|
@ -756,7 +772,7 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.maotou { |
|
|
.maotou { |
|
|
width: 90rpx; |
|
|
width: 280rpx; |
|
|
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/a1584a13e9db4b6fbcc66890219d0018.png') no-repeat; |
|
|
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/a1584a13e9db4b6fbcc66890219d0018.png') no-repeat; |
|
|
height: 90rpx; |
|
|
height: 90rpx; |
|
|
background-size: 100%; |
|
|
background-size: 100%; |
|
|
|