fix: team page logic and withdraw status style
This commit is contained in:
parent
a3abe821cc
commit
7473405242
|
|
@ -81,11 +81,15 @@ Page({
|
|||
directReferrals: Number(d.directReferrals || d.direct_referrals || 0),
|
||||
totalContribution: Number(d.totalContribution || d.total_contribution || 0).toFixed(2)
|
||||
},
|
||||
cardTitle: currentRoleText
|
||||
cardTitle: currentRoleText,
|
||||
isSoulmate: currentRoleText === '心伴会员' // 判断是否为心伴会员
|
||||
});
|
||||
} else {
|
||||
// API不成功,使用本地推断的角色
|
||||
this.setData({ cardTitle: currentRoleText });
|
||||
this.setData({
|
||||
cardTitle: currentRoleText,
|
||||
isSoulmate: currentRoleText === '心伴会员'
|
||||
});
|
||||
}
|
||||
|
||||
const res = await request({ url: '/api/commission?action=referrals&page=1&pageSize=50', method: 'GET' });
|
||||
|
|
@ -205,11 +209,11 @@ Page({
|
|||
getCardTitle(type) {
|
||||
const map = {
|
||||
'guardian_card': '守护会员',
|
||||
'companion_card': '心伴会员',
|
||||
'companion_card': '陪伴会员',
|
||||
'soulmate_card': '心伴会员',
|
||||
'listener_card': '倾听会员',
|
||||
'guardian': '守护会员',
|
||||
'companion': '心伴会员',
|
||||
'companion': '陪伴会员',
|
||||
'soulmate': '心伴会员',
|
||||
'listener': '倾听会员',
|
||||
'identity_card': '身份会员',
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<text class="stat-label">直推人数</text>
|
||||
<text class="stat-num">{{stats.directReferrals || list.length}}</text>
|
||||
</view>
|
||||
<view class="stat-col">
|
||||
<view class="stat-col" wx:if="{{isSoulmate}}">
|
||||
<text class="stat-label">团队总计</text>
|
||||
<text class="stat-num">{{stats.totalReferrals}}</text>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -452,6 +452,8 @@
|
|||
.status-processing {
|
||||
background: #DBEAFE;
|
||||
color: #2563EB;
|
||||
font-size: 28rpx;
|
||||
padding: 8rpx 24rpx;
|
||||
}
|
||||
|
||||
.status-completed {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user