wangfukang 3 weeks ago
parent
commit
87f24619b2
  1. 53
      components/tab-bar/delivery.vue
  2. 130
      components/tab-bar/myCenter.vue
  3. 4
      components/tab-bar/tab-bar.vue

53
components/tab-bar/delivery.vue

@ -63,6 +63,9 @@
<uni-icons type="info" size="10"></uni-icons>
跑腿
</view>
<view class="delivery-ranking-btn" @tap="goDeliveryRanking">
配送排行
</view>
</view>
<view class="delivery-status-card">
<view class="delivery-status-main">
@ -83,7 +86,7 @@
<view class="delivery-status-action delivery-status-action--primary" @tap="openPopup">
我的接单范围
</view>
<view class="delivery-status-action" @tap="changeOnline(isOnLine == 1 ? 0 : 1)">
<view class="delivery-status-action" :class="{'delivery-status-action--online': isOnLine != 1}" @tap="changeOnline(isOnLine == 1 ? 0 : 1)">
{{isOnLine == 1 ? '下线休息' : '上线接单'}}
</view>
</view>
@ -244,7 +247,7 @@
</view>
<text>已取货</text>
</view>
<view v-if="item.status == 2 && item.arriveTime != null"
<view v-if="item.status == 2"
class="order-action-btn order-action-btn--complete"
:class="{'order-action-btn--disabled': completingDeliveryIds[item.id]}"
@tap="changeStatus(index,item,3)">
@ -720,6 +723,11 @@
goRuleSetting() {
this.goPartTimeRegister()
},
goDeliveryRanking() {
uni.navigateTo({
url: '/package2/shop/ranking'
})
},
goPartTimeRegister() {
if (uni.getStorageSync('worker')) {
uni.navigateTo({
@ -1437,6 +1445,25 @@
line-height: 64rpx;
}
.delivery-ranking-btn {
margin-left: auto;
height: 58rpx;
line-height: 58rpx;
padding: 0 22rpx;
border-radius: 999rpx;
background: linear-gradient(135deg, #fff3c7 0%, #ffd7a6 100%);
box-shadow: 0 10rpx 22rpx rgba(255, 155, 75, 0.16);
color: #8a4b0e;
font-size: 22rpx;
font-weight: 900;
text-align: center;
flex-shrink: 0;
}
.delivery-ranking-btn:active {
transform: scale(0.96);
}
.delivery-status-card {
width: 95%;
margin: 18rpx auto 0;
@ -1513,18 +1540,18 @@
}
.delivery-status-actions {
width: 180rpx;
margin-left: 18rpx;
width: 172rpx;
margin-left: 16rpx;
flex-shrink: 0;
}
.delivery-status-action {
height: 62rpx;
line-height: 62rpx;
margin-top: 12rpx;
height: 58rpx;
line-height: 58rpx;
margin-top: 10rpx;
border-radius: 62rpx;
background: #fff;
color: #00231C;
background: rgba(255, 255, 255, 0.82);
color: #52635f;
font-size: 22rpx;
font-weight: 800;
text-align: center;
@ -1537,7 +1564,15 @@
}
.delivery-status-action--primary {
background: rgba(255, 255, 255, 0.72);
color: #047464;
border-color: rgba(88, 220, 190, 0.52);
box-shadow: 0 8rpx 18rpx rgba(0, 112, 91, 0.08);
}
.delivery-status-action--online {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
color: #00231C;
border-color: rgba(166, 255, 234, 0.8);
box-shadow: 0 10rpx 22rpx rgba(0, 112, 91, 0.14);
}

130
components/tab-bar/myCenter.vue

@ -6,11 +6,11 @@
<view class="top-zone fade-up" style="animation-delay: 0ms;">
<view class="profile-row">
<view class="avatar-card">
<image class="avatar-img" src="/package3/static/user.png" mode="aspectFill"></image>
<image :key="'avatar-' + package3StaticVersion" class="avatar-img" src="/package3/static/user.png" mode="aspectFill"></image>
</view>
<view class="profile-main">
<view class="name-row">
<text class="user-name">{{userName}}</text>
<text class="user-name">{{(userName == null || userName == undefined) ? '半径同学' : userName}}</text>
<text class="verify-dot"></text>
</view>
<view class="school-row" hover-class="tap-soft" hover-stay-time="80"
@ -29,20 +29,22 @@
<view class="saving-hero fade-up" hover-class="tap-soft" hover-stay-time="80"
style="animation-delay: 50ms;" @tap="navigatorTo('qianbao')">
<image class="saving-bg" src="/package3/static/saving-hero.png" mode="aspectFit"></image>
<image :key="'saving-' + package3StaticVersion" class="saving-bg" src="/package3/static/saving-hero.png" mode="aspectFit"></image>
<view class="saved-badge">已经帮你省下</view>
<view class="saved-main">
<view class="saved-money money-roll">¥{{savedMoney}}</view>
<view class="saved-desc"> {{milkTeaCount}} 杯蜜雪冰城</view>
<view class="saved-week">本周又省了 ¥38</view>
<view class="saved-desc">{{savedDescText}}</view>
<!-- <view class="saved-week" v-if="savedAmountValue > 0">订单完成后自动累计</view> -->
</view>
</view>
<view class="quick-card fade-up" style="animation-delay: 200ms;">
<view class="quick-item" hover-class="tap-soft" hover-stay-time="80"
v-for="(item,index) in quickItems" :key="index" @tap="navigatorTo(item.action)">
<image class="quick-icon" :class="'quick-icon--' + item.type" :src="item.icon"
mode="aspectFit"></image>
<view class="quick-icon-wrap">
<image :key="item.icon + '-' + package3StaticVersion" class="quick-icon" :class="'quick-icon--' + item.type" :src="item.icon"
mode="aspectFit"></image>
</view>
<view class="quick-title" :class="'quick-title--' + item.type">{{item.title}}</view>
<view class="quick-tip" :class="'quick-tip--' + item.type">{{item.tip}}</view>
</view>
@ -51,7 +53,7 @@
<view class="section-card earn-section fade-up" style="animation-delay: 100ms;">
<view class="section-head">
<view class="head-main">
<image class="title-icon" src="/package3/static/earn-title.png" mode="aspectFit"></image>
<image :key="'earn-' + package3StaticVersion" class="title-icon" src="/package3/static/earn-title.png" mode="aspectFit"></image>
<view>
<view class="section-title">今天还能省钱又赚钱</view>
<!-- <view class="section-desc">每日都有新机会省钱又赚钱</view> -->
@ -70,7 +72,7 @@
<text>{{item.subPost}}</text>
</view>
<view class="task-visual">
<image class="task-asset" :class="'task-asset--' + item.type" :src="item.icon"
<image :key="item.icon + '-' + package3StaticVersion" class="task-asset" :class="'task-asset--' + item.type" :src="item.icon"
mode="aspectFit"></image>
</view>
<view class="task-btn">{{item.cta}}</view>
@ -82,7 +84,7 @@
<view class="section-head section-head--inline">
<view class="head-inline">
<text class="section-title">我的身份</text>
<text class="head-sub">多重身份都能</text>
<text class="head-sub">多重身份都能</text>
</view>
<!-- <view class="text-link" @tap="showComingSoon('切换身份')">切换身份</view> -->
</view>
@ -96,7 +98,7 @@
<view class="identity-title">{{item.title}}</view>
<view class="identity-desc">{{item.desc}}</view>
<view class="identity-foot">
<image class="identity-icon" :class="'identity-icon--' + item.type" :src="item.icon"
<image :key="item.icon + '-' + package3StaticVersion" class="identity-icon" :class="'identity-icon--' + item.type" :src="item.icon"
mode="aspectFit"></image>
<!-- <view class="identity-go"></view> -->
</view>
@ -104,7 +106,7 @@
</view>
</view>
<view class="section-card life-section fade-up" style="animation-delay: 250ms;">
<!-- <view class="section-card life-section fade-up" style="animation-delay: 250ms;">
<view class="section-head section-head--inline">
<view class="head-inline">
<text class="section-title">校园生活</text>
@ -119,13 +121,12 @@
<view class="life-title">{{item.title}}</view>
<view class="life-desc">{{item.desc}}</view>
<view class="life-visual">
<image class="life-asset" :class="'life-asset--' + item.type" :src="item.icon"
<image :key="item.icon + '-' + package3StaticVersion" class="life-asset" :class="'life-asset--' + item.type" :src="item.icon"
mode="aspectFit"></image>
<!-- <view class="life-go"></view> -->
</view>
</view>
</view>
</view>
</view>
</view>-->
<view class="logout-btn fade-up" hover-class="logout-active" hover-stay-time="80"
style="animation-delay: 300ms;" @tap="navigatorTo('tuichu')">
@ -212,13 +213,14 @@
evaluate: Number(uni.getStorageSync('orderEvaluateCount')) || 3,
refund: Number(uni.getStorageSync('orderRefundCount')) || 1
},
savedMoney: uni.getStorageSync('savedMoney') || '286',
savedMoney: uni.getStorageSync('savedMoney') || '0.00',
rewardMoney: uni.getStorageSync('rewardMoney') || '58.6',
deliveryIncome: uni.getStorageSync('deliveryIncome') || '86',
deliveryDoneCount: Number(uni.getStorageSync('deliveryDoneCount')) || 123,
collegeRank: Number(uni.getStorageSync('collegeRank')) || 18,
menuButtonInfo: {},
statusBarHeight: 0
statusBarHeight: 0,
package3StaticVersion: 0
}
},
computed: {
@ -262,6 +264,12 @@
milkTeaCount() {
return Math.max(1, Math.round((Number(this.savedMoney) || 0) / 5))
},
savedAmountValue() {
return Number(this.savedMoney) || 0
},
savedDescText() {
return '大家都在半径里拼团省钱哦'
},
userOrderTotal() {
return this.orderCounts.pay + this.orderCounts.delivery + this.orderCounts.evaluate + this.orderCounts.refund
},
@ -309,15 +317,8 @@
type: 'merchant',
title: '商家入驻',
desc: '开店赚钱',
icon: '/package3/static/merchant-center.png',
icon: '/package3/static/favorite.png',
action: 'merchant'
}, {
type: 'delivery',
title: '兼职主页',
desc: '待处理订单',
icon: '/package3/static/campus-courier.png',
count: this.workerCounts,
action: this.hasWorker ? 'jianzhizhuye' : 'jianzhizhuce'
}, {
type: 'shop',
title: '商家中心',
@ -325,6 +326,13 @@
icon: '/package3/static/merchant-center.png',
count: this.shopCounts,
action: this.hasShop ? 'merchantCenter' : 'merchant'
}, {
type: 'delivery',
title: '兼职主页',
desc: '待处理订单',
icon: '/package3/static/campus-courier.png',
count: this.workerCounts,
action: this.hasWorker ? 'jianzhizhuye' : 'jianzhizhuce'
}, {
type: 'rule',
title: '接单规则',
@ -354,35 +362,14 @@
action: 'address'
}, {
type: 'collect',
title: '我的收藏',
title: '投诉吐槽',
tip: '',
icon: '/package3/static/favorite.png',
action: 'collect'
}]
},
lifeCards() {
return [{
type: 'ie',
title: 'IE',
desc: '找搭子一起吃饭学习',
icon: '/package3/static/IE.png',
action: 'ie'
}, {
type: 'fish',
title: '鱼塘',
desc: '二手交易更省钱',
icon: '/package3/static/fish-market.png',
action: 'fishRelease'
}, {
type: 'secret',
title: '校园秘闻',
desc: '看看学校新鲜事',
icon: '/package3/static/campus-secret.png',
action: 'planet'
action: 'collect'
}, {
type: 'agent',
title: '成为代理',
desc: '邀请好友赚佣金',
tip: '',
icon: '/package3/static/agent.png',
action: 'agent'
}]
@ -393,12 +380,16 @@
},
mounted() {
this.setMenuButtonInfo()
this.refreshPackage3Static()
uni.$on('myCenterCountsChange', this.setPendingCounts)
},
beforeDestroy() {
uni.$off('myCenterCountsChange', this.setPendingCounts)
},
methods: {
refreshPackage3Static() {
this.package3StaticVersion += 1
},
setMenuButtonInfo() {
try {
if (uni.getMenuButtonBoundingClientRect) {
@ -449,6 +440,7 @@
})
},
init() {
this.refreshPackage3Static()
this.schoolShop = this.normalizeShopList(uni.getStorageSync('schoolShop'))
this.worker = uni.getStorageSync('worker')
let shopId = uni.getStorageSync('shopId')
@ -471,6 +463,9 @@
let balance = 0
if (res.result.user) {
balance += Number(res.result.user.depoBal) || 0
const savedAmount = Number(res.result.user.savedAmount) || 0
this.savedMoney = savedAmount.toFixed(2)
uni.setStorageSync('savedMoney', this.savedMoney)
}
if (res.result.worker) {
balance += Number(res.result.worker.depoBal) || 0
@ -586,9 +581,9 @@
this.checkArea()
return
} else if (e == 'address') {
url = '/package2/myCenter/addressList'
url = '/package1/address/addressPage'
} else if (e == 'collect') {
url = '/package2/myCenter/myCollect'
url = '/package2/myCenter/problemFeedback'
} else if (e == 'evaluate') {
this.showComingSoon('我的评价')
return
@ -695,7 +690,7 @@
.my-content {
/* 顶部留白由 contentStyle 动态设置(与胶囊平齐) */
padding: 88rpx 32rpx 300rpx;
padding: 108rpx 32rpx 300rpx;
box-sizing: border-box;
}
@ -1311,23 +1306,36 @@
transition: transform .16s ease;
}
.quick-icon-wrap {
display: flex;
align-items: center;
justify-content: center;
height: 86rpx;
margin-bottom: 14rpx;
overflow: visible;
}
.quick-icon {
width: 80rpx;
height: 80rpx;
margin: 0 auto 14rpx;
margin: 0 auto;
}
.quick-icon--address {
width: 76rpx;
height: 76rpx;
margin: 4rpx auto 14rpx;
}
.quick-icon--collect {
width: 120rpx;
height: 120rpx;
/* 收藏原图视觉内容偏小,放大后用负上边距抵消额外占位,避免文字被顶低 */
margin: -20rpx auto 0;
width: 166rpx;
padding-left: 16rpx;
height: 166rpx;
transform: scale(1.33);
}
.quick-icon--agent {
width: 122rpx;
height: 122rpx;
}
.quick-title {
@ -1338,10 +1346,6 @@
white-space: nowrap;
}
.quick-title--collect {
margin-top: -8rpx;
}
.quick-tip {
margin-top: 6rpx;
color: #70757A;

4
components/tab-bar/tab-bar.vue

@ -126,9 +126,7 @@
if (index == i) {
this.$emit('tab-index', i);
if(index == 2) return
if(index != 0){
this.getWorkerCounts()
}
this.getWorkerCounts()
this.tabList[i].isCheck = true
if (this.tabList[i].shaking) return

Loading…
Cancel
Save