|
|
@ -69,13 +69,19 @@ |
|
|
<view class="balance-section"> |
|
|
<view class="balance-section"> |
|
|
<text class="balance-label">余额</text> |
|
|
<text class="balance-label">余额</text> |
|
|
<text class="balance-amount">¥{{ userInfo.commission || 0 }}</text> |
|
|
<text class="balance-amount">¥{{ userInfo.commission || 0 }}</text> |
|
|
<uv-icon name="arrow-right" size="16" color="#999"></uv-icon> |
|
|
|
|
|
|
|
|
<!-- <uv-icon name="arrow-right" size="16" color="#999"></uv-icon> --> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 转账记录容器 --> |
|
|
<!-- 转账记录容器 --> |
|
|
<view class="record-container"> |
|
|
<view class="record-container"> |
|
|
<view class="record-list"> |
|
|
<view class="record-list"> |
|
|
<view class="record-item" v-for="(item, index) in list" :key="index"> |
|
|
|
|
|
|
|
|
<view v-if="hasMore && !list.length"> |
|
|
|
|
|
<uv-loading-icon text="加载中" ></uv-loading-icon> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view v-else-if="!list.length"> |
|
|
|
|
|
<uv-empty ></uv-empty> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view v-else class="record-item" v-for="(item, index) in list" :key="index"> |
|
|
<view class="record-avatar"> |
|
|
<view class="record-avatar"> |
|
|
<image class="avatar" :src="item.userInfo.avatar" mode="aspectFill"></image> |
|
|
<image class="avatar" :src="item.userInfo.avatar" mode="aspectFill"></image> |
|
|
<text class="avatar-name">{{ item.user_dictText }}</text> |
|
|
<text class="avatar-name">{{ item.user_dictText }}</text> |
|
|
@ -85,7 +91,7 @@ |
|
|
<text class="record-date">{{ item.createTime }}</text> |
|
|
<text class="record-date">{{ item.createTime }}</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="record-amount"> |
|
|
<view class="record-amount"> |
|
|
<text class="amount">+{{ item.money }}</text> |
|
|
|
|
|
|
|
|
<text class="amount">{{ item.type === '1' ? '+' + item.money : '-' + item.money }}</text> |
|
|
|
|
|
|
|
|
<!-- 领取按钮 - 当status=1且为微信提现时显示 --> |
|
|
<!-- 领取按钮 - 当status=1且为微信提现时显示 --> |
|
|
<uv-button |
|
|
<uv-button |
|
|
@ -109,9 +115,6 @@ |
|
|
:class="item.withdrawal.status === '1' |
|
|
:class="item.withdrawal.status === '1' |
|
|
&& item.withdrawal.withdrawStatus === '0' ? 'status-available' : 'status-received'" |
|
|
&& item.withdrawal.withdrawStatus === '0' ? 'status-available' : 'status-received'" |
|
|
v-if="item.withdrawal && item.withdrawal.status != '1'">{{ getText(item.withdrawal) }}</text> |
|
|
v-if="item.withdrawal && item.withdrawal.status != '1'">{{ getText(item.withdrawal) }}</text> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -136,7 +139,9 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import MixinList from '@/mixins/list' |
|
|
import MixinList from '@/mixins/list' |
|
|
|
|
|
import uvLoadingIcon from '../../uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue' |
|
|
export default { |
|
|
export default { |
|
|
|
|
|
components: { uvLoadingIcon }, |
|
|
mixins: [MixinList], |
|
|
mixins: [MixinList], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -184,6 +189,7 @@ export default { |
|
|
this.userInfo = res.result |
|
|
this.userInfo = res.result |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 提现接口 |
|
|
requestMerchantTransfer(item) { |
|
|
requestMerchantTransfer(item) { |
|
|
if (!wx.canIUse('requestMerchantTransfer')) { |
|
|
if (!wx.canIUse('requestMerchantTransfer')) { |
|
|
wx.showModal({ |
|
|
wx.showModal({ |
|
|
@ -192,22 +198,29 @@ export default { |
|
|
}); |
|
|
}); |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
// 提现 |
|
|
wx.requestMerchantTransfer({ |
|
|
wx.requestMerchantTransfer({ |
|
|
mchId: '1724993508',//万能墙商户号 |
|
|
mchId: '1724993508',//万能墙商户号 |
|
|
appId: wx.getAccountInfoSync().miniProgram.appId, |
|
|
appId: wx.getAccountInfoSync().miniProgram.appId, |
|
|
package: item.packageInfo, |
|
|
package: item.packageInfo, |
|
|
success: (res) => { |
|
|
|
|
|
|
|
|
success: async (res) => { |
|
|
// res.err_msg将在页面展示成功后返回应用时返回ok,并不代表提款成功 |
|
|
// res.err_msg将在页面展示成功后返回应用时返回ok,并不代表提款成功 |
|
|
console.log('success:', res); |
|
|
console.log('success:', res); |
|
|
this.getData() |
|
|
|
|
|
|
|
|
// this.getData() |
|
|
|
|
|
|
|
|
this.$api('requestMerchantTransfer', { |
|
|
|
|
|
id : item.id, |
|
|
|
|
|
|
|
|
const withdrawRes = await this.$api.promotion.withdrawSuccess({ |
|
|
|
|
|
id : item.id |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (withdrawRes.code === 200) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '提现成功', |
|
|
|
|
|
icon: 'success' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
fail: (res) => { |
|
|
fail: (res) => { |
|
|
console.log('fail:', res); |
|
|
console.log('fail:', res); |
|
|
this.getData() |
|
|
|
|
|
|
|
|
// this.getData() |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
@ -395,7 +408,7 @@ background: linear-gradient(180deg, #DEFFFF 0%, #FBFEFF 22.65%, #F0FBFF 100%); |
|
|
// 转账记录容器 |
|
|
// 转账记录容器 |
|
|
.record-container { |
|
|
.record-container { |
|
|
.record-list { |
|
|
.record-list { |
|
|
|
|
|
|
|
|
|
|
|
min-height: 40vh; |
|
|
border: 1px solid #F0F0F0; |
|
|
border: 1px solid #F0F0F0; |
|
|
border-radius: 24rpx; |
|
|
border-radius: 24rpx; |
|
|
|
|
|
|
|
|
|