// 快捷支付银行卡 var cardsMixns = function () { return { data() { return { isPopup:true, tabsIndex:0, bankIndex:'', isCardStep:0, checkedCards:{}, params: { name: '', cardNumber: '', cardtype:0 }, } }, filters: { cardsFormat(valus) { // 银行卡只显示最后四位数 ,隐藏信息用*代替 return valus.replace(/^(\d{4})\d+(\d{4})$/,"$1****$2") }, }, computed: { disabled() { return !(this.bankIndex === 0 || this.bankIndex > 0); }, disabled1() { return !(this.params.name && this.params.cardNumber.length > 18); }, }, methods: { handleCardStep(){ // 选择银行下一步 if(this.disabled){ return } this.isCardStep = 1 }, handleConfirm(){ //确认信息并跳转银行页面 }, handleTabsClick(index){ // 切换 console.log('tabsIndex',index) this.tabsIndex = index }, handleShowPopup(){ //显示添加银行卡弹窗 this.getBankList(); this.isPopup = true }, hanldeChooseBanks(cards,index){ //选择银行 this.bankIndex = index this.checkedCards = cards console.log('bank',cards) }, handleCloseModel(){ //关闭窗口 this.tabsIndex = 0 this.bankIndex = '' this.isCardStep = 0 this.isPopup = false }, } } }();