wangfukang 1 month ago
parent
commit
78a7fb4895
  1. 138
      components/tab-bar/delivery.vue
  2. 10
      components/tab-bar/myCenter.vue
  3. 16
      components/tab-bar/tab-bar.vue

138
components/tab-bar/delivery.vue

@ -69,7 +69,7 @@
<view class="delivery-status-title-row"> <view class="delivery-status-title-row">
<view class="delivery-status-title">今日接单状态</view> <view class="delivery-status-title">今日接单状态</view>
<view class="delivery-status-pill" :class="{'delivery-status-pill--on': isOnLine == 1}"> <view class="delivery-status-pill" :class="{'delivery-status-pill--on': isOnLine == 1}">
{{isOnLine == 1 ? '已上线' : '已离线'}} {{isOnLine == 1 ? '已上线' : '已离线,新订单不再提醒'}}
</view> </view>
</view> </view>
<view class="delivery-status-desc">{{deliveryStatusText}}</view> <view class="delivery-status-desc">{{deliveryStatusText}}</view>
@ -121,27 +121,25 @@
style="background: rgba(247, 248, 248, 0.6);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}} 备注{{item.remark}}
</view> </view>
<view class="" v-if="item.deliveryType == 3 || item.deliveryType == 2" <view class="express-info-card" v-if="item.deliveryType == 3 || item.deliveryType == 2">
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 class="express-info-row">
<view style="display: flex;"> <view class="express-info-item">
<view style="flex:1"> <text class="express-info-label">件数</text>
{{item.allCount != null ? item.allCount : 0}} <text class="express-info-value">{{item.allCount != null ? item.allCount : 0}}</text>
</view> </view>
<view class="" v-if="item.getPictures != null"> <view class="express-info-item express-info-item--code" v-if="item.getCodes != null && item.getCodes != ''">
取件码截图(分割一下) {{item.getPictures}} <text class="express-info-label">取件码</text>
<text class="express-info-value">{{item.getCodes}}</text>
</view> </view>
<view class="" v-if="item.getCodes != null"> <view class="express-info-item" v-if="item.phoneNumber != null && item.phoneNumber != ''">
取件码{{item.getCodes}} <text class="express-info-label">手机尾号</text>
<text class="express-info-value">{{item.phoneNumber}}</text>
</view> </view>
<view style="flex:1;text-align: right;" v-if="item.phoneNumber != null">
手机尾号{{item.phoneNumber}}
</view> </view>
</view> <view class="express-picture-list" v-if="getPickupPictures(item).length > 0">
<view class="express-picture-title">取件码截图</view>
<view style="display: flex;padding: 20rpx 0;"> <image class="express-picture" v-for="(pic,picIndex) in getPickupPictures(item)" :key="picIndex"
<img @tap="largeImg" :src="pic" mode="aspectFill" @tap.stop="largeImg(pic)"></image>
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png"
alt="" style="width: 90rpx;height: 106rpx;background-size: 100%;margin-right:20rpx;" />
</view> </view>
<!-- <view style="display: flex;padding: 10px 0;"> <!-- <view style="display: flex;padding: 10px 0;">
<view class="code-box" style="margin-right:10px;"> <view class="code-box" style="margin-right:10px;">
@ -377,7 +375,7 @@
<!-- 查看大图弹出层 --> <!-- 查看大图弹出层 -->
<uni-popup ref="imgPopup" background-color="#fff"> <uni-popup ref="imgPopup" background-color="#fff">
<view class="img-popup-content"> <view class="img-popup-content">
<img :src="bigImg" alt="" style="width: 100%;height: 100%;"> <image :src="bigImg" mode="aspectFit" style="width: 100%;height: 100%;"></image>
</view> </view>
</uni-popup> </uni-popup>
@ -601,6 +599,25 @@
} }
}, },
methods: { methods: {
getPickupPictures(item) {
const pictures = item && item.getPictures
if (!pictures) return []
if (Array.isArray(pictures)) {
return pictures.filter(pic => pic)
}
if (typeof pictures === 'string') {
let value = pictures.trim()
if (!value) return []
try {
const parsed = JSON.parse(value)
if (Array.isArray(parsed)) {
return parsed.filter(pic => pic)
}
} catch (e) {}
return value.split(/[,,\s]+/).map(pic => pic.trim()).filter(pic => pic)
}
return []
},
loadDeliveryStatusCounts() { loadDeliveryStatusCounts() {
this.setDeliveryStatusCounts(uni.getStorageSync('deliveryStatusCounts') || {}) this.setDeliveryStatusCounts(uni.getStorageSync('deliveryStatusCounts') || {})
}, },
@ -891,7 +908,8 @@
}, },
// //
largeImg(img) { largeImg(img) {
this.bigImg = 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/00b1f011787c4549bbea650d95a4eb39.png' if (!img) return
this.bigImg = img
this.$refs.imgPopup.open() this.$refs.imgPopup.open()
}, },
zhipaiChange(e) { zhipaiChange(e) {
@ -1209,7 +1227,7 @@
worker.isOnLine = value; worker.isOnLine = value;
this.isOnLine = value this.isOnLine = value
uni.setStorageSync('worker', worker); uni.setStorageSync('worker', worker);
this.tui.toast(res.message) this.tui.toast(value == 0 ? '下线后不再接收新订单通知' : res.message)
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }
@ -1620,6 +1638,84 @@
white-space: normal; white-space: normal;
} }
.express-info-card {
margin-top: 16rpx;
padding: 16rpx 18rpx;
border-radius: 18rpx;
background: rgba(247, 248, 248, 0.72);
color: #596560;
box-sizing: border-box;
}
.express-info-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12rpx;
}
.express-info-item {
min-height: 48rpx;
padding: 0 16rpx;
display: flex;
align-items: center;
border-radius: 999rpx;
background: #fff;
box-sizing: border-box;
max-width: 100%;
}
.express-info-item--code {
flex: 1;
min-width: 220rpx;
}
.express-info-label {
flex-shrink: 0;
margin-right: 8rpx;
color: #8a9691;
font-size: 22rpx;
font-weight: 700;
line-height: 32rpx;
}
.express-info-value {
min-width: 0;
color: #313b37;
font-size: 24rpx;
font-weight: 900;
line-height: 34rpx;
word-break: break-all;
}
.express-picture-list {
margin-top: 14rpx;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12rpx;
}
.express-picture-title {
height: 44rpx;
line-height: 44rpx;
padding: 0 14rpx;
border-radius: 999rpx;
background: rgba(166, 255, 234, 0.46);
color: #0b6b5a;
font-size: 22rpx;
font-weight: 800;
}
.express-picture {
width: 112rpx;
height: 112rpx;
border-radius: 14rpx;
background: #eef4f1;
border: 1px solid rgba(0, 35, 28, 0.08);
box-sizing: border-box;
}
.refund-status { .refund-status {
width: 100%; width: 100%;
margin-top: 24rpx; margin-top: 24rpx;

10
components/tab-bar/myCenter.vue

@ -7,6 +7,7 @@
<view style="margin-top: 50px;" @click="navigatorTo('qianbao')">钱包余额 {{balance}}</view> <view style="margin-top: 50px;" @click="navigatorTo('qianbao')">钱包余额 {{balance}}</view>
<view style="margin-top: 50px;" @click="navigatorTo('dingdan')">我的订单</view> <view style="margin-top: 50px;" @click="navigatorTo('dingdan')">我的订单</view>
<view style="margin-top: 50px;" @click="navigatorTo('qiehuan')">切换校区放到设置中</view> <view style="margin-top: 50px;" @click="navigatorTo('qiehuan')">切换校区放到设置中</view>
<view style="margin-top: 50px;" @click="navigatorTo('youhui')">优惠券</view>
<view style="margin-top: 50px;" @click="navigatorTo('tuichu')">退出登录</view> <view style="margin-top: 50px;" @click="navigatorTo('tuichu')">退出登录</view>
<!-- 未注册兼职弹窗 --> <!-- 未注册兼职弹窗 -->
<uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px"> <uni-popup ref="jianzhiPopup" background-color="rgba(2, 171, 255, 1)" borderRadius="40px 40px 40px 40px">
@ -150,6 +151,13 @@
url = '/package2/myCenter/addGoods' url = '/package2/myCenter/addGoods'
} else if (e == 'merchantCenter') { } else if (e == 'merchantCenter') {
if (this.schoolShop) { if (this.schoolShop) {
let shopItem = []
for(let aa = 0;aa<this.schoolShop.length;aa++){
if(this.schoolShop[aa].regionId == JSON.parse(uni.getStorageSync('area')).id){
shopItem.push(this.schoolShop[aa]);
}
}
this.schoolShop = shopItem
if (this.schoolShop.length > 1) { if (this.schoolShop.length > 1) {
this.$refs.shopPopup.open() this.$refs.shopPopup.open()
return return
@ -186,6 +194,8 @@
url = '/package2/myCenter/addType' url = '/package2/myCenter/addType'
} else if (e == 'qianbao') { } else if (e == 'qianbao') {
url = '/package2/myCenter/wallet' url = '/package2/myCenter/wallet'
} else if (e == 'youhui') {
url = '/package2/myCenter/couponList'
} else if (e == 'goodsList') { } else if (e == 'goodsList') {
url = '/package2/myCenter/goodsList' url = '/package2/myCenter/goodsList'
} else if (e == 'merchant') { } else if (e == 'merchant') {

16
components/tab-bar/tab-bar.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="tabbar-box"> <view class="tabbar-box">
<view class="bar-box" @click="clickBar(index)" v-for="(item,index) in tabList" :key="index" :class="item.shaking?'shaking':''"> <view class="bar-box" @click="clickBar(index)" v-for="(item,index) in tabList" :key="index" hover-class="none">
<view class="red-dot" v-if="index == 0 && indexZhipaiCount > 0"> <view class="red-dot" v-if="index == 0 && indexZhipaiCount > 0">
{{formatBadgeCount(indexZhipaiCount)}} {{formatBadgeCount(indexZhipaiCount)}}
</view> </view>
@ -10,10 +10,10 @@
<view class="red-dot" v-if="index == 4 && indexMyCount > 0"> <view class="red-dot" v-if="index == 4 && indexMyCount > 0">
{{formatBadgeCount(indexMyCount)}} {{formatBadgeCount(indexMyCount)}}
</view> </view>
<view class="img-box" v-if="index != 2"> <view class="img-box" v-if="index != 2" :class="item.shaking?'shaking':''">
<img :src="item.isCheck?item.tabIconSelect:item.tabIcon" alt="" /> <img :src="item.isCheck?item.tabIconSelect:item.tabIcon" alt="" />
</view> </view>
<view class="big-img-box" v-if="index == 2"> <view class="big-img-box" v-if="index == 2" :class="item.shaking?'shaking':''">
<img :src="item.isCheck?item.tabIconSelect:item.tabIcon" alt="" /> <img :src="item.isCheck?item.tabIconSelect:item.tabIcon" alt="" />
</view> </view>
<view class="text-box" v-if="index != 2" :style="{color:item.isCheck?'#48D1CC':'#000'}"> <view class="text-box" v-if="index != 2" :style="{color:item.isCheck?'#48D1CC':'#000'}">
@ -284,6 +284,9 @@
height: 100%; height: 100%;
flex: 1; flex: 1;
position: relative; position: relative;
background: transparent;
outline: none;
-webkit-tap-highlight-color: transparent;
} }
.red-dot { .red-dot {
position: absolute; position: absolute;
@ -317,18 +320,25 @@
transition: all 0.3s; transition: all 0.3s;
transform-origin: center center; transform-origin: center center;
user-select: none; user-select: none;
-webkit-tap-highlight-color: transparent;
} }
.img-box img{ .img-box img{
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
background-size: 100%; background-size: 100%;
display: block;
pointer-events: none;
-webkit-tap-highlight-color: transparent;
} }
.big-img-box img{ .big-img-box img{
width: 80%; width: 80%;
height: 90%; height: 90%;
background-size: 100%; background-size: 100%;
margin: -20rpx 0 0 10%; margin: -20rpx 0 0 10%;
display: block;
pointer-events: none;
-webkit-tap-highlight-color: transparent;
} }
@keyframes simple-scale-shake { @keyframes simple-scale-shake {

Loading…
Cancel
Save