['对接现金红包接口及样式处理']
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<span>(≈ {{ cost || '0.00' }} CNY)</span>
|
||||
</view>
|
||||
<view class="balance">{{ balance || '0.00' }}</view>
|
||||
<view class="frozen" @click="withdrawDetail">提现记录</view>
|
||||
<!-- <view class="frozen" @click="withdrawDetail">提现记录</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -23,13 +23,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="total" v-if="total">≈ ¥{{total.toFixed(2)}} </view>
|
||||
<view class="btn" @click="actions">提现至红包</view>
|
||||
<view class="des">提现到红包,可在红包中提现到银行卡 手续费: 无</view>
|
||||
<view class="btn" @click="actions">提现至现金红包</view>
|
||||
<view class="des">提现至红包,可在红包中提现到银行卡 手续费: 无</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
cashsCreate,
|
||||
accountCashs,
|
||||
withdrawsIndexCreate,
|
||||
withdrawsIndex
|
||||
} from '@/apis/interfaces/withdraws';
|
||||
@@ -58,12 +60,10 @@
|
||||
methods: {
|
||||
// 提现基本信息
|
||||
getInfo() {
|
||||
withdrawsIndexCreate().then(res => {
|
||||
this.balance = res.balance
|
||||
this.tax = res.tax
|
||||
this.cost = res.cost
|
||||
this.bank_accounts = res.bank_accounts.length
|
||||
cashsCreate().then(res => {
|
||||
this.withdraw_input = Number(res.balance)
|
||||
this.balance = res.balance
|
||||
this.cost = res.cost
|
||||
this.total = Number(res.balance) * Number(res.cost)
|
||||
uni.setStorageSync('refresh', false)
|
||||
}).catch(err => {
|
||||
@@ -76,7 +76,6 @@
|
||||
// 输入提现能量球数量
|
||||
inputNum(e) {
|
||||
let number = Number(e.detail.value)
|
||||
console.log(number, this.balance)
|
||||
if (number <= Number(this.balance)) {
|
||||
this.total = Number(e.detail.value) * this.cost
|
||||
} else {
|
||||
@@ -98,10 +97,7 @@
|
||||
this.withdraw_input = this.balance
|
||||
this.total = this.balance * this.cost
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// 点击全部
|
||||
all() {
|
||||
@@ -120,16 +116,8 @@
|
||||
// 提现
|
||||
actions() {
|
||||
let data = {
|
||||
bank_account_id: this.bankInfo.bank_account_id,
|
||||
amount: Number(this.withdraw_input)
|
||||
}
|
||||
// if (data.bank_account_id === undefined || data.bank_account_id === null || data.bank_account_id === '') {
|
||||
// uni.showToast({
|
||||
// title: this.bank_accounts > 0 ? '请选择银行卡' : '请添加银行卡',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
if (data.amount === 0) {
|
||||
uni.showToast({
|
||||
title: '请输入能量球数量',
|
||||
@@ -139,7 +127,7 @@
|
||||
}
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content:'您是否确认提现到红包,交易将免手续费',
|
||||
content:'您是否确认提现到现金红包账户,交易将免手续费',
|
||||
confirmColor: '#7c52fc',
|
||||
cancelColor: '#cacaca',
|
||||
cancelText: '我再想想',
|
||||
@@ -149,7 +137,7 @@
|
||||
uni.showLoading({
|
||||
title: '提交中'
|
||||
})
|
||||
withdrawsIndex(data).then(res => {
|
||||
accountCashs(data).then(res => {
|
||||
uni.showToast({
|
||||
title: res,
|
||||
icon: 'none',
|
||||
|
||||
Reference in New Issue
Block a user