Browse Source

'忘记第几次提交了'

hfll
hflllll 1 day ago
parent
commit
c1ff1647ca
2 changed files with 27 additions and 27 deletions
  1. +8
    -1
      api/model/my.js
  2. +19
    -26
      pages_order/mine/wallet.vue

+ 8
- 1
api/model/my.js View File

@ -100,7 +100,14 @@ const api = {
limit: 500
},
// 钱包 - 提现
cashout: {
url: '/teambuy/amount/cashout',
method: 'POST',
limit: 500
},
}
export default api

+ 19
- 26
pages_order/mine/wallet.vue View File

@ -113,7 +113,7 @@ export default {
return false
}
if (amount > this.walletData.balance) {
if (amount > this.userInfo.balance) {
this.amountError = '提现金额不能大于余额'
return false
}
@ -181,22 +181,24 @@ export default {
title: '提交中...'
})
//
// setTimeout(() => {
// uni.hideLoading()
// uni.showToast({
// title: '',
// icon: 'success'
// })
// //
// this.walletData.balance -= parseFloat(this.withdrawAmount)
// //
// this.withdrawAmount = ''
// this.realName = ''
// this.isFormValid = true
// }, 1500)
//
this.$api('cashout', { transferAmount: this.withdrawAmount, userName: this.realName }, res => {
uni.hideLoading()
if (res.code === 200) {
uni.showToast({
title: '提现成功',
icon: 'success'
})
this.$store.commit('getUserInfo')
this.withdrawAmount = ''
this.realName = ''
}else {
uni.showToast({
title: res.message,
icon: 'error'
})
}
})
},
recharge() {
@ -228,15 +230,6 @@ export default {
})
}
})
//
// setTimeout(() => {
// //
// this.walletData.balance += parseFloat(this.rechargeAmount)
// //
// this.rechargeAmount = ''
// this.isRecharge = false
// }, 1500)
}
},
fail: (err) => {


Loading…
Cancel
Save