|
|
|
@ -43,7 +43,7 @@ |
|
|
|
<text class="stat-label">推广人数</text> |
|
|
|
</view> |
|
|
|
<view class="stat-item"> |
|
|
|
<text class="stat-number">{{ userInfo.price }}</text> |
|
|
|
<text class="stat-number">{{ userInfo.commission }}</text> |
|
|
|
<text class="stat-label">总佣金</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -68,7 +68,7 @@ |
|
|
|
<!-- 余额显示 --> |
|
|
|
<view class="balance-section"> |
|
|
|
<text class="balance-label">余额</text> |
|
|
|
<text class="balance-amount">¥88.32</text> |
|
|
|
<text class="balance-amount">¥{{ userInfo.price || 0 }}</text> |
|
|
|
<uv-icon name="arrow-right" size="16" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
|
|
|
|
@ -86,7 +86,32 @@ |
|
|
|
</view> |
|
|
|
<view class="record-amount"> |
|
|
|
<text class="amount">+{{ item.money }}</text> |
|
|
|
<text class="status" :class="item.withdrawal.status === '1' && withdrawStatus === '0' ? 'status-available' : 'status-received'" v-if="item.withdrawal">{{ getText(item.withdrawal) }}</text> |
|
|
|
|
|
|
|
<!-- 领取按钮 - 当status=1且为微信提现时显示 --> |
|
|
|
<uv-button |
|
|
|
v-if="item.withdrawal && item.withdrawal.status === '1' && item.withdrawal.withdrawStatus === '0' && item.withdrawal.method === '0'" |
|
|
|
:custom-style="{ |
|
|
|
height: '60rpx', |
|
|
|
borderRadius: '30rpx', |
|
|
|
background: '#06DADC', |
|
|
|
border: '1rpx solid #06DADC', |
|
|
|
lineHeight: '60rpx', |
|
|
|
fontSize: '24rpx', |
|
|
|
padding: '0 20rpx' |
|
|
|
}" |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
@click="requestMerchantTransfer(item.withdrawal)"> |
|
|
|
领取 |
|
|
|
</uv-button> |
|
|
|
|
|
|
|
<text class="status" |
|
|
|
:class="item.withdrawal.status === '1' |
|
|
|
&& item.withdrawal.withdrawStatus === '0' ? 'status-available' : 'status-received'" |
|
|
|
v-if="item.withdrawal && item.withdrawal.status != '1'">{{ getText(item.withdrawal) }}</text> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -159,6 +184,33 @@ export default { |
|
|
|
this.userInfo = res.result |
|
|
|
} |
|
|
|
}, |
|
|
|
requestMerchantTransfer(item) { |
|
|
|
if (!wx.canIUse('requestMerchantTransfer')) { |
|
|
|
wx.showModal({ |
|
|
|
content: '你的微信版本过低,请更新至最新版本。', |
|
|
|
showCancel: false, |
|
|
|
}); |
|
|
|
return |
|
|
|
} |
|
|
|
wx.requestMerchantTransfer({ |
|
|
|
mchId: '1724993508',//万能墙商户号 |
|
|
|
appId: wx.getAccountInfoSync().miniProgram.appId, |
|
|
|
package: item.packageInfo, |
|
|
|
success: (res) => { |
|
|
|
// res.err_msg将在页面展示成功后返回应用时返回ok,并不代表提款成功 |
|
|
|
console.log('success:', res); |
|
|
|
this.getData() |
|
|
|
|
|
|
|
this.$api('requestMerchantTransfer', { |
|
|
|
id : item.id, |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: (res) => { |
|
|
|
console.log('fail:', res); |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 去二维码 |
|
|
|
goQrcode() { |
|
|
|
uni.navigateTo({ |
|
|
|
@ -396,13 +448,16 @@ background: linear-gradient(180deg, #DEFFFF 0%, #FBFEFF 22.65%, #F0FBFF 100%); |
|
|
|
.record-amount { |
|
|
|
flex: 2; |
|
|
|
text-align: center; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
gap: 8rpx; |
|
|
|
|
|
|
|
.amount { |
|
|
|
display: block; |
|
|
|
font-size: 28rpx; |
|
|
|
font-weight: bold; |
|
|
|
color: #333; |
|
|
|
margin-bottom: 8rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.status { |
|
|
|
|