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