<!--nova-travel/page/vip-info/real-name/real-name.wxml-->
<nav type="back" title="银行卡" background-color="{{activeColor ? activeColor : '#ffffff'}}"  frontColor="{{titleColor ? titleColor : 'black'}}"></nav>
<view class="real_name_wrap">
  <view class="card">
    <view class="title">我的卡</view>
    <block wx:for="{{cardList}}" wx:key="index">
      <!-- 银行卡 -->
      <view class="real_name">
        <view class="name">{{item.bankName}}</view>
        <view class="number" wx:if="{{item.cardId.length == 16}}">**** **** **** {{item.cardId[12]}}{{item.cardId[13]}}{{item.cardId[14]}}{{item.cardId[15]}}</view>
        <view class="number" wx:if="{{item.cardId.length == 17}}">**** **** **** {{item.cardId[13]}}{{item.cardId[14]}}{{item.cardId[15]}}{{item.cardId[16]}}</view>
        <view class="number" wx:if="{{item.cardId.length == 18}}">**** **** **** {{item.cardId[14]}}{{item.cardId[15]}}{{item.cardId[16]}}{{item.cardId[17]}}</view>
        <view class="number" wx:if="{{item.cardId.length == 19}}">**** **** **** {{item.cardId[15]}}{{item.cardId[16]}}{{item.cardId[17]}}{{item.cardId[18]}}</view>
        <van-icon bind:tap="delete" data-index="{{index}}" name="delete" size="40rpx" color="#fbf9f8" style="position:absolute;right:30rpx;top:30rpx;"/>
      </view>
    </block>
    <view class="add" bindtap="onClickShow"style="background-color: {{activeColor ? activeColor : '#00c2cb'}};color:{{titleColor?titleColor:'ffffff'}}">
      <van-icon name="add-o" color="{{titleColor?titleColor:'ffffff'}}" size="40rpx"/>
      <text style="background-color: {{activeColor ? activeColor : '#00c2cb'}};color:{{titleColor?titleColor:'ffffff'}}">添加银行卡</text>
    </view>
  </view>
</view>

<!-- 遮罩层 -->
<van-overlay show="{{ show }}" bind:click="onClickHide">
  <view class="wrapper" >
    <view class="block">
       <!-- 添加银行卡 -->
      <view class="bank" catch:tap="noop">
        <view class="title">添加银行卡</view>
        <!-- 姓名 -->
        <view class="box">
          <text>持卡人</text>
          <input class="weui-input" bindinput="bindKeyInput" data-prop="name" value="{{name}}" placeholder="持卡人姓名"/>
        </view>
        <!-- 卡号 -->
        <view class="box">
          <text>卡 号</text>
          <input class="weui-input" bindinput="bindKeyInput" data-prop="cardId" value="{{cardId}}" type="number" placeholder="持卡人姓名"/>
        </view>
        <!-- 开户行 -->
        <view class="box">
          <text>开卡行</text>
          <input class="weui-input" bindinput="bindKeyInput" data-prop="bankName" value="{{bankName}}" placeholder="例 中国银行"/>
        </view>
        <button bind:tap="submit" style="background-color: {{activeColor ? activeColor : '#00c2cb'}};color:{{titleColor?titleColor:'ffffff'}}">提 交</button>
      </view>
    </view>
  </view>
</van-overlay>