123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <template name="record">
- <view class="record-template">
- <!-- 全部银行卡 -->
- <tui-bottom-popup :radius="true" :show="show">
- <view class="tui-popup-box clearfix">
- <view class="title">
- 全部银行卡
- <view class="title-close">
- <text class="iconfont icon-iconfontguanbi" @click="hidePopup"></text>
- </view>
- </view>
- <view class="tui-popup-main coupon">
- <scroll-view class="tui-popup-scroll" scroll-y="true">
- <view class="pay-card-main">
- <view
- class="pay-item-cell"
- v-for="(cards, index) in dataList"
- :key="index"
- @click="handleChoose(index, cards)"
- >
- <view class="item-icon"
- ><image
- :src="
- 'https://static.caimei365.com/app/img/pay/icon_' +
- cards.bankCode +
- '_@2x.png'
- "
- ></image
- ></view>
- <view class="item-texts"
- ><text
- >{{ cards.bankName }}( {{ cards.quickPayBankNumber | bankNumeberFilter }} )</text
- ></view
- >
- <view class="item-checked">
- <text
- class="iconfont"
- :class="[checkedIndex === index ? 'icon-yixuanze3' : 'icon-weixuanze']"
- ></text>
- </view>
- </view>
- <view class="pay-item-cell add" @click="handleAddCard(2)">
- <view class="item-icon"><text class="iconfont icon-gerenwangyinzhifu"></text></view>
- <view class="item-texts add"><text>添加新卡支付</text></view>
- <view class="item-checked"> <text class="iconfont icon-xiangyou"></text> </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- </tui-bottom-popup>
- </view>
- </template>
- <script>
- export default {
- name: 'record',
- props: {
- show: {
- type: Boolean,
- default: false
- },
- list: {
- type: Array,
- default: []
- }
- },
- data() {
- return {
- isIphoneX: this.$store.state.isIphoneX,
- checkedIndex: '',
- dataList: []
- }
- },
- filters: {
- bankNumeberFilter(value) {
- return value.substring(value.length - 4, value.length)
- }
- },
- created() {
- this.initDataList(this.list)
- },
- methods: {
- initDataList(list){
- // 初始化
- this.dataList = list
- console.log('list',this.dataList)
- },
- handleChoose(index, cards) {
- //选择银行卡
- this.checkedIndex = index
- const data = {
- quickPayBankNumber:cards.quickPayBankNumber,
- quickPayMobile:cards.quickPayMobile,
- quickPayBankExpireTime:cards.quickPayBankExpireTime,
- quickPayUserName:cards.quickPayUserName,
- bankName:cards.bankName,
- bankCode:cards.bankCode,
- idCard:cards.idCard,
- cvvCode:cards.cvvCode
- }
- this.$emit('handleChoiceaCards', data)
- this.hidePopup()
- },
- handleAddCard(index) {
- //跳转添加卡号
- this.$emit('addCards', index)
- },
- hidePopup() {
- this.$parent.popupShow1 = false
- }
- }
- }
- </script>
- <style lang="scss">
- .record-template {
- width: 100%;
- height: auto;
- background: #ffffff;
- float: left;
- margin-top: 24rpx;
- }
- .tui-popup-box {
- position: relative;
- box-sizing: border-box;
- min-height: 220rpx;
- padding: 24rpx 32rpx 0 32rpx;
- .title {
- font-size: $font-size-32;
- color: $text-color;
- line-height: 68rpx;
- text-align: center;
- float: left;
- width: 100%;
- height: 68rpx;
- box-sizing: border-box;
- padding: 0 24rpx;
- position: relative;
- font-weight: bold;
- .title-close {
- width: 68rpx;
- height: 68rpx;
- text-align: center;
- line-height: 68rpx;
- position: absolute;
- right: 0;
- top: 0;
- .iconfont {
- color: #b2b2b2;
- font-size: 40rpx;
- }
- }
- }
- .tui-popup-main {
- width: 100%;
- float: left;
- padding-top: 10rpx;
- .tui-popup-scroll {
- width: 100%;
- height: 600rpx;
- .pay-card-main {
- width: 100%;
- height: auto;
- float: left;
- box-sizing: border-box;
- .pay-item-cell {
- height: 100rpx;
- box-sizing: border-box;
- padding: 26rpx 0;
- background-color: #ffffff;
- border-bottom: 1px solid #e1e1e1;
- .item-icon {
- width: 48rpx;
- height: 48rpx;
- margin-right: 20rpx;
- float: left;
- image {
- width: 48rpx;
- height: 48rpx;
- display: block;
- }
- .iconfont {
- font-size: 48rpx;
- &.icon-gerenwangyinzhifu {
- color: #004889;
- }
- }
- }
- .item-texts {
- line-height: 48rpx;
- font-size: $font-size-28;
- color: $text-color;
- float: left;
- &.add {
- font-weight: bold;
- }
- }
- .item-checked {
- width: 48rpx;
- height: 48rpx;
- float: right;
- text-align: center;
- line-height: 48rpx;
- font-size: $font-size-40;
- color: #ffffff;
- .icon-weixuanze {
- color: #b2b2b2;
- }
- .icon-yixuanze3 {
- color: #F3B574;
- }
- .icon-xiangyou {
- color: #b2b2b2;
- }
- }
- }
- }
- }
- }
- }
- </style>
|