cards.vue
2.48 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
<div>
<div class="card-list">
<div v-for="(card, index) in bankCardList" :key="index" class="card-item">
<div class="card-info">
<p class="bank-name">{{card.bankName}}</p>
<p class="card-id">
<span>****</span>
<span>****</span>
<span>****</span>
<span class="num">{{card.bankCardNo}}</span>
</p>
<p class="user-name">持卡人:{{card.name}}</p>
</div>
</div>
</div>
<p class="change-tip">更换银行卡请致电官方客服</p>
<p class="tel-num">
<a href="tel:400-889-9646" class="tel-href">400-889-9646</a>
</p>
</div>
</template>
<script>
import { createNamespacedHelpers } from 'vuex';
import LayoutApp from '../../../components/layout/layout-app';
import {Scroll} from 'cube-ui';
const {mapState, mapActions} = createNamespacedHelpers('mine/bankCard');
export default {
methods: {
...mapActions(['fetchBankCard']),
init() {
if (!this.bankCardList.length) {
this.fetchBankCard();
}
}
},
computed: {
...mapState(['bankCardList'])
},
components: {
LayoutApp,
}
};
</script>
<style lang="scss" scoped>
/deep/ .layout-context {
background-color: #f0f0f0!important;
}
.card-list {
padding: 50px;
}
.card-item {
margin: 30px;
padding: 40px;
background: linear-gradient(#363636, #1b181d);
color: #fff;
border-radius: 10px;
position: relative;
overflow: hidden;
&:after {
content: "";
width: 100%;
height: 120%;
background: linear-gradient(116deg, #666, #111);
transform: rotate(63deg);
position: absolute;
top: -20%;
right: -31%;
z-index: 1;
opacity: 0.4;
}
.card-info {
position: relative;
z-index: 2;
}
.bank-name {
font-size: 44px;
}
.card-id {
font-size: 32px;
padding-right: 30px;
margin: 60px 0 50px;
display: flex;
justify-content: space-between;
letter-spacing: 2px;
.num {
font-size: 40px;
position: relative;
top: -10px;
}
}
.user-name {
font-size: 28px;
opacity: 0.9;
position: relative;
bottom: -6px;
}
}
.change-tip,
.tel-num {
text-align: center;
font-size: 28px;
line-height: 1.5;
color: #444;
margin-bottom: 14px;
}
.tel-href {
color: #d0021b;
font-size: 27px;
text-decoration: underline;
}
</style>