Browse Source

fix(提现状态): 修复提现状态显示逻辑并添加商户转账功能

修正提现状态显示条件,避免错误显示可用状态
新增requestMerchantTransfer方法处理商户转账请求
hfll
主管理员 1 month ago
parent
commit
dd999ae6e0
1 changed files with 37 additions and 1 deletions
  1. +37
    -1
      subPages/user/promote.vue

+ 37
- 1
subPages/user/promote.vue View File

@ -86,7 +86,16 @@
</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>
<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 +168,33 @@ export default {
this.userInfo = res.result
}
},
requestMerchantTransfer(item) {
if (!wx.canIUse('requestMerchantTransfer')) {
wx.showModal({
content: '你的微信版本过低,请更新至最新版本。',
showCancel: false,
});
return
}
wx.requestMerchantTransfer({
mchId: '1673516176',//
appId: wx.getAccountInfoSync().miniProgram.appId,
package: item.packageInfo,
success: (res) => {
// res.err_msgok
console.log('success:', res);
this.getData()
this.$api('requestMerchantTransfer', {
id : item.id,
})
},
fail: (res) => {
console.log('fail:', res);
this.getData()
},
});
},
//
goQrcode() {
uni.navigateTo({


Loading…
Cancel
Save