Commit 5296b242 by 梁建民

js

parent e35fc94c
...@@ -654,7 +654,7 @@ ...@@ -654,7 +654,7 @@
background: #1080d0; background: #1080d0;
color: #ffffff; color: #ffffff;
font-size: 16px; font-size: 16px;
z-index: 999999999999; z-index: 999;
transition: all 0.2s ease; transition: all 0.2s ease;
} }
......
...@@ -13,17 +13,17 @@ ...@@ -13,17 +13,17 @@
</p> </p>
<div class="withdraw-amount"> <div class="withdraw-amount">
<p><em>*</em> 提现金额</p> <p><em>*</em> 提现金额</p>
<span></span><input type="number" class="money" v-model="withdrawNum"/> <span></span><input type="text" readonly="readonly" @touchstart.stop="moneyBtn = true" class="money" v-model="withdrawNum"/>
<div v-if="amountNum" class="withdraw-money">可提现金额 {{walletInfoData.wallet_usable_format}}<span @click="withdraw">全部提现</span></div> <div v-if="amountNum" class="withdraw-money">可提现金额 {{walletInfoData.wallet_usable_format}}<span @click="withdraw">全部提现</span></div>
<div v-else class="amount-tips">输入金额超过可提现金额</div> <div v-else class="amount-tips">输入金额超过可提现金额</div>
</div> </div>
<div class="withdraw-password"> <div class="withdraw-password">
<p><em>*</em> 支付密码</p> <p><em>*</em> 支付密码</p>
<template v-if="showPassword"> <template v-if="showPassword">
<input type="password" placeholder="请输入支付密码" class="va-m inp password" v-model="password"/> <input type="password" readonly="readonly" @touchstart.stop="passwdBtn = true" placeholder="请输入支付密码" class="va-m inp password" v-model="password"/>
</template> </template>
<template v-else> <template v-else>
<input type="text" placeholder="请输入支付密码" class="va-m inp password" v-model="password"/> <input type="text" readonly="readonly" @touchstart.stop="passwdBtn = true" placeholder="请输入支付密码" class="va-m inp password" v-model="password"/>
</template> </template>
<van-icon v-if="showPassword" name="closed-eye" class="va-m f-r" @click="changeShow"/> <van-icon v-if="showPassword" name="closed-eye" class="va-m f-r" @click="changeShow"/>
<van-icon v-else name="eye-o" class="va-m f-r" @click="changeShow"/> <van-icon v-else name="eye-o" class="va-m f-r" @click="changeShow"/>
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
<button :disabled="amountWithdrawFlag" class="submit" :class="withdrawNum == '' || amountWithdrawFlag ? 'submitNO' : ''" @click="submit">提交</button> <button :disabled="amountWithdrawFlag" class="submit" :class="withdrawNum == '' || amountWithdrawFlag ? 'submitNO' : ''" @click="submit">提交</button>
</div> </div>
<van-number-keyboard :show="moneyBtn" theme="custom" extra-key="." close-button-text="完成" @blur="moneyBtn = false;passwdBtn=false;" @input="onInput" @delete="onDelete" :zIndex="zIndex"/>
<van-number-keyboard :show="passwdBtn" theme="custom" extra-key="." close-button-text="完成" @blur="passwdBtn = false;passwdBtn=false;" @input="onInputPwd" @delete="onDeletePwd" :zIndex="zIndex"/>
</section> </section>
</template> </template>
...@@ -38,9 +41,9 @@ ...@@ -38,9 +41,9 @@
import Vue from 'vue'; import Vue from 'vue';
import {mapState} from 'vuex' import {mapState} from 'vuex'
import Header from '@/views/common/Header.vue'; import Header from '@/views/common/Header.vue';
import {Icon, Toast} from 'vant'; import {Icon, Toast, NumberKeyboard} from 'vant';
Vue.use(Icon); Vue.use(Icon).use(NumberKeyboard);
export default { export default {
name: 'walletWithdraw', name: 'walletWithdraw',
...@@ -52,7 +55,10 @@ ...@@ -52,7 +55,10 @@
amountNum: true, amountNum: true,
password: '', password: '',
withdrawNum: '', withdrawNum: '',
clickFlag: true clickFlag: true,
moneyBtn: false,
passwdBtn:false,
zIndex: 999999
} }
}, },
computed: { computed: {
...@@ -98,6 +104,18 @@ ...@@ -98,6 +104,18 @@
}); });
} }
} }
},
onInput(key) {
this.withdrawNum = (this.withdrawNum + key);
},
onDelete(key) {
this.withdrawNum = this.withdrawNum.slice(0, this.withdrawNum.length - 1);
},
onInputPwd(key){
this.password = (this.password + key);
},
onDeletePwd(key){
this.password = this.password.slice(0, this.password.length - 1);
} }
}, },
components: { components: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment