index.vue
8.04 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<template>
<v-layout column justify-center align-center>
<v-flex>
<InfoCard />
<div id="tabBlock">
<div id="isBorrowing" :class="tabChoose === 'borrow' ? 'isChoosing' : ''" @click="tabChange('borrow')">正在借款</div>
<span id="tabDivider"></span>
<div id="isLending" :class="tabChoose === 'lend' ? 'isChoosing' : ''" @click="tabChange('lend')">正在出借</div>
</div>
<v-flex class="cardContainer">
<v-card v-for="(item, index) in listInfo" :key="index" class="infoCards" flat height="6rem">
<v-card-title class="infoCardsTitle" >
<div class="infoCardsAvatar">
<img v-if="item.avatar" :src="item.avatar" alt="" />
<i v-if="!item.avatar" class="material-icons icon iconfont icon-face"></i>
</div>
<div class="infoCardsName">{{item.name}}</div>
<div class="infoCardsTitleButton">补借条</div>
<div class="infoCardsCornerMark">
<div class="infoCardsCornerMarkString">剩余{{item.timeRemain}}</div>
</div>
</v-card-title>
<v-card-text class="infoCardsContent" >
<div class="infoCardsContentBlock amount">
<div class="infoCardsContentKey">筹款金额</div>
<div class="infoCardsContentValue">{{item.amount}}元</div>
</div>
<div class="infoCardsContentBlock time">
<div class="infoCardsContentKey">借款时长</div>
<div class="infoCardsContentValue">{{item.time}}天</div>
</div>
<div class="infoCardsContentBlock rate">
<div class="infoCardsContentKey">年利率</div>
<div class="infoCardsContentValue">{{item.rate}}%</div>
</div>
</v-card-text>
</v-card>
</v-flex>
</v-flex>
<v-bottom-nav id="bottomNav" fixed :value="true" :active.sync="navTarget" color="toolbar-grey" >
<v-btn class="bottomNavBtn" flat color="gold" value="buJieTiao">
<span>补借条</span>
<svg class='material-icons icon iconfont' width="1.6rem" height="1.6rem" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 566.9 566.9" style="enable-background:new 0 0 566.9 566.9;" xml:space="preserve">
<g>
<path d="M299.2,204.7h157.6v31.5H299.2V204.7z M299.2,267.7h157.6v31.5H299.2V267.7z M110.1,330.7h346.7v31.5H110.1V330.7z
M110.1,393.8h346.7v31.5H110.1V393.8z M299.2,141.6h157.6v31.5H299.2V141.6z M525.7,525.3H41.3V41.6h484.4V525.3z M60.5,506h445.9
V60.9H60.5V506z M60.5,506"/>
<g>
<path d="M157.8,147.6c-4.4,11.8-9.9,24-16.3,35.6v116h-23.2v-80.5c-2.4,3-4.9,5.9-7.2,8.4c-2.2-6.1-8.7-19.7-12.8-25.7
c14.5-14.6,28.4-37.8,36.5-61L157.8,147.6z M256.1,191.3V213H153.1v-21.7h19.7v-12.4h-16v-21.2h16v-18h23.4v18h15.5v-18h23.7v18
h17v21.2h-17v12.4H256.1z M164.7,220.2H246v79H221v-5.5h-32.4v5.5h-23.9V220.2z M188.5,240.1v7.7H221v-7.7H188.5z M221,274.5v-7.7
h-32.4v7.7H221z M196.1,191.3h15.5v-12.4h-15.5V191.3z"/>
</g>
</g>
</svg>
</v-btn>
<v-btn class="bottomNavBtn" flat color="gold" value="chaXinYong">
<span>查信用</span>
<i aria-hidden="true" class="material-icons icon iconfont icon-xinyongqia"></i>
</v-btn>
<v-btn class="bottomNavBtn" flat color="gold" value="qiuJieKuan">
<span>求借款</span>
<i aria-hidden="true" class="material-icons icon iconfont icon-dkw_jiekuan"></i>
</v-btn>
<v-btn class="bottomNavBtn" to="/userCenter" flat color="gold" value="geRenZhongXin">
<span>个人中心</span>
<i aria-hidden="true" class="material-icons icon iconfont icon-gerenzhongxin"></i>
</v-btn>
</v-bottom-nav>
</v-layout>
</template>
<script>
import InfoCard from '@/components/InfoCard'
export default {
data:() => ({
navTarget: 'buJieTiao',
tabChoose: 'borrow',
listInfo: [],
}),
components: {
InfoCard
},
created() {
this.listInfo = [{
name: '姚姚姚',
amount: '100',
time: '5',
rate: '5',
timeRemain: '1月',
avatar: ''
},{
name: '姚姚姚',
amount: '100',
time: '5',
rate: '5',
timeRemain: '6天',
avatar: '/netiou/avatar.png'
},{
name: '姚姚姚',
amount: '100',
time: '5',
rate: '5',
timeRemain: '6天',
avatar: '/netiou/avatar.png'
},{
name: '姚姚姚',
amount: '100',
time: '5',
rate: '5',
timeRemain: '6天',
avatar: '/netiou/avatar.png'
},{
name: '姚姚姚',
amount: '100',
time: '5',
rate: '5',
timeRemain: '6天',
avatar: '/netiou/avatar.png'
},{
name: '姚姚姚',
amount: '100',
time: '5',
rate: '5',
timeRemain: '6天',
avatar: '/netiou/avatar.png'
}]
},
methods: {
tabChange(tab) {
this.tabChoose = tab
}
}
}
</script>
<style lang="scss" scoped>
body {
height: 100%;
overflow: hidden;
}
#tabBlock {
width: 100%;
padding-top: 1.5rem;
div {
width: calc(50% - 2px);
display: inline-block;
text-align: center;
height: 18px;
font-size: 18px;
transition: color 0.3s ease-in-out;
-webkit-transition: color 0.3s ease-in-out;
}
#tabDivider:before {
content: "";
height: 18px;
width: 0;
border: 2px solid $gold;
}
.isChoosing {
color: $gold;
}
}
.cardContainer {
width: 92vw;
overflow: auto;
height: 50vh;
margin-top: 1.5rem;
.infoCards {
background-color: #fff;
color: #000;
border-radius: 2px;
margin-bottom: 1rem;
position: relative;
overflow:hidden;
.infoCardsTitle {
padding:0.5rem 1.3rem 0.2rem 1.3rem;
.infoCardsAvatar {
width: 2.5rem;
height: 2.5rem;
border-radius: 1.3rem;
overflow:hidden;
img {
width: 100%;
vertical-align: bottom;
}
.icon {
color: $avatar-grey;
font-size: 2.5rem;
}
}
.infoCardsName {
margin-left: 0.8rem;
font-size: 16px;
}
.infoCardsTitleButton {
width: 3.2rem;
height: 1.2rem;
line-height: 1.35rem;
font-size: 10px;
text-align: center;
background-image: linear-gradient(-229deg, #DAB269 37%, #E7C78C 87%);
border-radius: 32px;
margin-left: 0.9rem;
}
.infoCardsCornerMark {
font-size: 10px;
width: 6rem;
height: 2.8rem;
background-image: linear-gradient(-229deg, #DAB269 37%, #E7C78C 87%);
border-radius: 26px;
position: absolute;
top: -1.6rem;
right: -1rem;
z-index: 1;
.infoCardsCornerMarkString {
position: absolute;
bottom: 0;
left: 1rem;
}
}
}
.infoCardsContent {
width: 100%;
padding: 0;
.infoCardsContentBlock {
width: 33%;
display: inline-block;
text-align: center;
.infoCardsContentKey {
font-size: 0.8rem;
color: #898989;
}
.infoCardsContentValue {
font-size: 0.8rem;
color: $gold;
margin: auto;
}
}
}
}
}
#bottomNav {
height: 42pt;
box-sizing: border-box;
background-color: $toolbar-grey;
.bottomNavBtn {
color: #fff;
opacity: 1;
svg {
fill: #fff;
width: 1.8rem;
height: 1.8rem;
}
}
.bottomNavBtn.btn--active {
color: $gold;
svg {
fill: $gold;
}
}
}
</style>