index.vue
3.62 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<template>
<div class="app-container" style="padding: 0px">
<!--卡券 sta-->
<el-row :gutter="16" class="">
<el-col :span="6" v-for="(ticket,id) in ticketList" :key="id" class="margin-bottom16">
<el-card class="box-card">
<div class="ticket-title boxshadow-4 eff-bgcolor " >
<div class=" float-left eff-icon"></div>
<div class="ticket-name hs-hidden-nowrap hs-cursor-pointer float-left" >{{ticket.orgName}}-{{ticket.cardName}}</div>
<div class="ticket-oper float-right">有效</div>
</div>
<div class="ticket-content">
<div class="ticket-main clearfix" >
<div class=" hs-hidden-nowrap hs-cursor-pointer float-left ticket-effmoney" >{{ticket.fullCutValue | fen2Yuan}}</div>
<div class="ticket-notes float-left">元 优惠券</div>
</div>
<div class="ticket-time">有效时间:{{ticket.endTime | string2Date(1)}}</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {getCouponPerson} from '@/api/cardticket.js';
export default {
data() {
return {
ticketList:[
/*{
id:'123',
ptype:'1',
plname:'静雅地上停车场',
pname:'有效',
pmoney:'50',
ptime:'2019/8/30',
}*/
]
}
},
methods: {
/**查询车主个人卡券*/
getCouponPerson:function () {
getCouponPerson().then(response =>{
if(response.code='8888'){
this.ticketList=response.data;
}
});
}
},
mounted:function () {
this.getCouponPerson();
}
}
</script>
<style lang="scss" scoped>
.el-card__body{
padding: 0;
}
.ticket-title{
height: 46px;
line-height: 46px;
width: 100%;
}
.ticket-content{
height: 98px;
width: 100%;
}
.eff-bgcolor{
background-color: rgb(64, 158, 255);
}
.off-bgcolor{
background-color: #909399;
}
.eff-icon{
margin:8px 8px 8px 16px;
height: 30px;
width: 30px;
background-image: url("../../assets/cardticket/card_red.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.off-icon{
margin:8px 8px 8px 16px;
height: 30px;
width: 30px;
background-image: url("../../assets/cardticket/card_gray.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.ticket-name{
width:120px;
height:46px;
font-size:14px;
font-weight:500;
color:rgba(255,255,255,1);
line-height:46px;
}
.ticket-oper{
font-size:12px;
font-weight:500;
color:rgba(255,255,255,1);
width:42px;
height:20px;
line-height: 20px;
text-align: center;
border-radius:2px;
margin-top: 10px;
margin-right: 16px;
border:1px solid rgba(255,255,255,1);
}
.ticket-main{
width:100%;
height:62px;
.ticket-effmoney{
font-size:44px;
font-weight:600;
color:rgb(64, 158, 255);
height:62px;
line-height:62px;
margin-left: 16px;
max-width: 120px;
}
.ticket-offmoney{
font-size:44px;
font-weight:600;
color:rgba(92,92,92,1);
height:62px;
line-height:62px;
margin-left: 16px;
max-width: 120px;
}
.ticket-notes{
height: 20px;
line-height: 20px;
font-size:14px;
font-weight:500;
color:rgba(64,64,64,1);
width: 70px;
margin-left: 10px;
margin-top: 30px;
}
}
.ticket-time{
width:143px;
height:20px;
font-size:14px;
font-weight:500;
color:rgba(64,64,64,1);
line-height:20px;
margin-left: 16px;
}
</style>