|
|
|
@ -1,6 +1,7 @@ |
|
|
|
// pages/setting/withdrawal/index.js
|
|
|
|
import Dialog from '../../../components/dialog/dialog' |
|
|
|
import { getBalanceInfo, getWithdrawalList, getBankCardList, paymentOrder } from '../../../api/payment' |
|
|
|
import { getBalanceInfo, getWithdrawalList, paymentOrder } from '../../../api/payment' |
|
|
|
import { getBankCardList } from "../../../api/saas" |
|
|
|
const util = require('../../../utils/util') |
|
|
|
const math = require('../../../utils/math') |
|
|
|
const event = require('../../../utils/event') |
|
|
|
@ -15,7 +16,6 @@ Page({ |
|
|
|
accountMoney: 0, //用户余额
|
|
|
|
sumMoney: 0, //用户余额
|
|
|
|
expendMoney: '', |
|
|
|
xsaccountMoney: 0, //显示余额
|
|
|
|
banckCardList: [], //用户银行卡列表
|
|
|
|
banckList: [], |
|
|
|
orderList: [], |
|
|
|
@ -59,7 +59,7 @@ Page({ |
|
|
|
if(!result.data){ |
|
|
|
return |
|
|
|
} |
|
|
|
this.setData({ accountMoney: result.data.accountMoney, xsaccountMoney: math.minus(result.data.accountMoney, result.data.frozenMoney) }) |
|
|
|
this.setData({ accountMoney: result.data.accountMoney }) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
@ -88,7 +88,7 @@ Page({ |
|
|
|
sum = math.plus(sum, element.money) |
|
|
|
} |
|
|
|
} |
|
|
|
this.setData({ orderList: this.data.orderList, expendMoney: sum || '' }) |
|
|
|
this.setData({ orderList: this.data.orderList, expendMoney: sum}) |
|
|
|
}, |
|
|
|
chooseCard: function () { |
|
|
|
if (this.data.columns.length > 0) { |
|
|
|
@ -110,7 +110,7 @@ Page({ |
|
|
|
onHide: function(){ |
|
|
|
this.setData({ visible: false }) |
|
|
|
}, |
|
|
|
checkoutAmount: function () { |
|
|
|
checkAmount: function () { |
|
|
|
if (Number(this.data.expendMoney) <= 0) { |
|
|
|
util.showToast('提现金额必须大于0') |
|
|
|
return |
|
|
|
@ -120,7 +120,7 @@ Page({ |
|
|
|
return |
|
|
|
} |
|
|
|
wx.showLoading({ title: '加载中', mask: true }) |
|
|
|
paymentOrder({ bankId: this.data.chooseBankCard.cardId, ids: this.data.checkIds }).then(res => { |
|
|
|
paymentOrder({ factoryPermittedBankId: this.data.chooseBankCard.cardId, ids: this.data.checkIds }).then(res => { |
|
|
|
wx.hideLoading() |
|
|
|
if(res.data.markedWords){ |
|
|
|
Dialog.alert({ title: '温馨提示', message: res.data.markedWords }).then(() => { |
|
|
|
|