1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
| <script>
| import {getCustomerInfo, xinheyuanBankList} from "@/api/modules/user";
|
| export default {
| props:{
| see:{
| type:Boolean,
| default:false
| },
| title:{
| type:String,
| default:"支持银行卡"
| },
| maxHeight:{
| type:Number,
| default:600
| }
| },
| name: "index",
| data() {
| return {
| bankList: [],
| };
| },
| async created() {
| await getCustomerInfo().then(res=>{
| uni.setStorageSync('customerZcyId',res.customerZcyId)
| uni.setStorageSync('customerBankcardId', res.customerBankcardId);
| uni.setStorageSync('idCard', res.idCard);
| uni.setStorageSync('userName', res.name);
| })
| await xinheyuanBankList().then(res=>{
| this.bankList = res;
| uni.setStorageSync("bankList",res);
| })
| },
| methods: {
| confirm(vla) {
| if(!this.see){
| this.$emit("confirm", vla);
| }
| this.$refs.card.close();
| },
| open(){
| this.$refs.card.open();
| }
| }
| }
| </script>
|
| <template>
| <uv-popup ref="card" mode="bottom" round="20">
| <view class="card-box" >
| <view class="name">{{title}}</view>
| <view class="ul" :style="{ maxHeight: maxHeight + 'rpx' }">
| <view class="li" v-for="(item,index) in bankList" :key=index @click="confirm(item)">
| <image class="logo" style="" :src="item.bankUrl"></image>
| <view class="title">{{ item.bankName }}</view>
| </view>
| </view>
| </view>
| </uv-popup>
| </template>
|
| <style scoped lang="scss">
| .card-box{
| margin: 40rpx;
| .ul{
| overflow-y: auto;
| }
| .name{
| text-align: center;
| font-size: 36rpx;
| color: #252938;
| font-weight: 700;
| margin-bottom: 40rpx;
| }
| .li{
| display: flex;
| flex-direction: row;
| align-items: center;
| padding: 20rpx;
|
| border-bottom: 1rpx solid #E5E5E5;
| .logo{
| width: 48rpx;height: 48rpx;
| margin-right: 20rpx;
| }
| .title{
| color: #333333;
| font-size: 28rpx;
| }
| }
| }
| </style>
|
|