['红包提现,红包转化默认值处理优化']
This commit is contained in:
@@ -7,16 +7,17 @@
|
|||||||
<span>(≈ {{ cost || '0.00' }} CNY)</span>
|
<span>(≈ {{ cost || '0.00' }} CNY)</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="balance">{{ balance || '0.00' }}</view>
|
<view class="balance">{{ balance || '0.00' }}</view>
|
||||||
<!-- <view class="frozen" @click="withdrawDetail">提现记录</view> -->
|
<!-- <view class="frozen" @click="withdrawDetail">提现记录</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="withdrawing-content">
|
<view class="withdrawing-content">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view style="flex: 1;">
|
<view style="flex: 1;">
|
||||||
<view class="inputTxt">提现数量</view>
|
<view class="inputTxt">提现数量</view>
|
||||||
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number"
|
<input class="input_num" ref='inputNumber' v-model="withdraw_input" @input='inputNum'
|
||||||
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;"
|
:value="withdraw_input" type="number"
|
||||||
placeholder="请输入提现数量" :disabled="balance===0" />
|
placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现数量"
|
||||||
|
:disabled="balance===0" />
|
||||||
</view>
|
</view>
|
||||||
<view class="all" @click="all">全部提现</view>
|
<view class="all" @click="all">全部提现</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
withdraw_input: '', // 提现通证数量
|
withdraw_input: '', // 提现通证数量
|
||||||
bank_accounts: 0,
|
bank_accounts: 0,
|
||||||
bankInfo: {},
|
bankInfo: {},
|
||||||
certification:false,//默认没有认证
|
certification: false, //默认没有认证
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -60,10 +61,10 @@
|
|||||||
// 提现基本信息
|
// 提现基本信息
|
||||||
getInfo() {
|
getInfo() {
|
||||||
cashsCreate().then(res => {
|
cashsCreate().then(res => {
|
||||||
this.withdraw_input = Number(res.balance)
|
// this.withdraw_input = Number(res.balance)
|
||||||
this.balance = res.balance
|
this.balance = res.balance
|
||||||
this.cost = res.cost
|
this.cost = res.cost
|
||||||
this.total = Number(res.balance) * Number(res.cost)
|
// this.total = Number(res.balance) * Number(res.cost)
|
||||||
this.certification = res.certification
|
this.certification = res.certification
|
||||||
uni.setStorageSync('refresh', false)
|
uni.setStorageSync('refresh', false)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 输入提现通证数量
|
// 输入提现通证数量
|
||||||
inputNum(e) {
|
inputNum(e) {
|
||||||
let number = Number(e.detail.value)
|
let number = Number(e.detail.value)
|
||||||
@@ -92,10 +94,13 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '最大值能超过' + this.balance + '',
|
title: '最大值能超过' + this.balance + '',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
});
|
});
|
||||||
this.withdraw_input = this.balance
|
this.$nextTick(() => {
|
||||||
this.total = this.balance * this.cost
|
this.withdraw_input = this.balance
|
||||||
|
this.total = this.balance * this.cost
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -106,7 +111,7 @@
|
|||||||
this.total = this.balance * this.cost
|
this.total = this.balance * this.cost
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '啥也没有,我也做不到~',
|
title: '请核对提现金额~',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
@@ -145,7 +150,7 @@
|
|||||||
}
|
}
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content:'您是否确认提现到现金红包账户,交易将免手续费',
|
content: '您是否确认提现到现金红包账户,交易将免手续费',
|
||||||
confirmColor: '#7c52fc',
|
confirmColor: '#7c52fc',
|
||||||
cancelColor: '#cacaca',
|
cancelColor: '#cacaca',
|
||||||
cancelText: '我再想想',
|
cancelText: '我再想想',
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<view class="item">
|
<view class="item">
|
||||||
<view style="flex: 1;">
|
<view style="flex: 1;">
|
||||||
<view class="inputTxt">提现金额</view>
|
<view class="inputTxt">提现金额</view>
|
||||||
<input class="input_num" v-model="withdraw_input" @input='inputNum' type="number" placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现金额" :disabled="balance===0" />
|
<input class="input_num" ref='inputNuber' v-model="withdraw_input" @input='inputNum' type="number" placeholder-style="color:#999;font-weight:normal; font-size:34rpx;" placeholder="请输入提现金额" :disabled="balance===0" />
|
||||||
</view>
|
</view>
|
||||||
<view class="all" @click="all">全部提现</view>
|
<view class="all" @click="all">全部提现</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
this.balance = res.balance
|
this.balance = res.balance
|
||||||
this.tax = res.tax
|
this.tax = res.tax
|
||||||
this.bank_accounts = res.bank_accounts.length
|
this.bank_accounts = res.bank_accounts.length
|
||||||
this.withdraw_input = Number(res.balance)
|
// this.withdraw_input = Number(res.balance)
|
||||||
this.certification = res.certification
|
this.certification = res.certification
|
||||||
uni.setStorageSync('refresh', false)
|
uni.setStorageSync('refresh', false)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -117,16 +117,20 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '当前不能提现',
|
title: '当前不能提现',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
});
|
});
|
||||||
this.withdraw_input = 0
|
this.withdraw_input = 0
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '最大值能超过' + this.balance + '',
|
title: '最大值能超过' + this.balance + '',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
|
mask: true
|
||||||
});
|
});
|
||||||
this.withdraw_input = this.balance
|
this.$nextTick(() => {
|
||||||
|
this.withdraw_input = this.balance
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user