|
@@ -33,7 +33,7 @@
|
|
|
cashToCardShow = true
|
|
|
}" class="cash-button" color="#498EF5" round icon="credit-pay" type="primary">提现到银行卡
|
|
|
</van-button>
|
|
|
- <van-button @click="() => {
|
|
|
+ <van-button @click="() => {
|
|
|
cashToWxShow = true
|
|
|
}" class="cash-button" color="#01C18D" round icon="wechat" type="primary">
|
|
|
提现到微信</van-button>
|
|
@@ -48,7 +48,7 @@
|
|
|
|
|
|
</van-field>
|
|
|
<van-field type="digit" v-model="encBankNo" label="银行卡号" placeholder="请输入银行卡号" />
|
|
|
- <van-field is-link url="/cashoutBankList" readonly label="银行卡列表" />
|
|
|
+ <van-field is-link :url="'/cashoutBankList?amount=' + amount" readonly label="银行卡列表" />
|
|
|
</van-cell-group>
|
|
|
</van-dialog>
|
|
|
|
|
@@ -132,10 +132,8 @@ export default defineComponent({
|
|
|
const cashToCard = () => {
|
|
|
if (Number(amount.value) < 0.3) {
|
|
|
Toast.fail('银行卡提现金额需要0.3元以上')
|
|
|
-
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
api.wx.studentWxExtractWxwithbankdrawal({
|
|
|
amount: Number(amount.value) * 100,
|
|
|
bankCode: bankCode.value || 0,
|
|
@@ -160,37 +158,35 @@ export default defineComponent({
|
|
|
|
|
|
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
const cashToWx = () => {
|
|
|
+ console.log('进入提现流程')
|
|
|
if (Number(amount.value) < 1) {
|
|
|
- Toast.fail('微信提现金额需要1元以上')
|
|
|
- api.wx.studentWxExtractWithdraw({
|
|
|
- amount: Number(amount.value) * 100
|
|
|
+ Toast.fail('微信提现金额不能小于1')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (Number(amount.value) > 200) {
|
|
|
+ Toast.fail('微信提现金额不能大于200')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ api.wx.studentWxExtractWithdraw({
|
|
|
+ amount: Number(amount.value) * 100
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code !== 200) {
|
|
|
+ Toast.fail(res.data.msg)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ Toast.success('提现成功,到账有延迟')
|
|
|
+ store.dispatch('getUserInfo');
|
|
|
+ amount.value = ''
|
|
|
+ api.wx.studentWxExtractlist({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1000
|
|
|
}).then(res => {
|
|
|
- if (res.data.code !== 200) {
|
|
|
- Toast.fail(res.data.msg)
|
|
|
- return
|
|
|
- }
|
|
|
- Toast.success('提现成功,到账有延迟')
|
|
|
- store.dispatch('getUserInfo');
|
|
|
- amount.value = ''
|
|
|
- api.wx.studentWxExtractlist({
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 1000
|
|
|
- }).then(res => {
|
|
|
- wxCashoutList.value = res.data.rows
|
|
|
-
|
|
|
- })
|
|
|
+ wxCashoutList.value = res.data.rows
|
|
|
|
|
|
})
|
|
|
-
|
|
|
- return
|
|
|
- }
|
|
|
+ })
|
|
|
|
|
|
// Dialog.confirm({
|
|
|
// title: '确定提现'+(Number(amount.value))+'元到微信零钱吗?',
|
|
@@ -238,7 +234,7 @@ export default defineComponent({
|
|
|
bankName.value = String(route.query.bankName)
|
|
|
bankCode.value = Number(route.query.bankCode)
|
|
|
encTrueName.value = String(route.query.encTrueName)
|
|
|
-
|
|
|
+ amount.value = String(route.query.amount)
|
|
|
}
|
|
|
|
|
|
|