|
@@ -1,7 +1,12 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="Course-box">
|
3
|
|
- <div class="banner-box-top mglr-10" >
|
4
|
|
- <van-swipe class="banner-swipe" :autoplay="3000" @change="i => currentItem = i" :show-indicators="false">
|
|
3
|
+ <div class="banner-box-top mglr-10">
|
|
4
|
+ <van-swipe
|
|
5
|
+ class="banner-swipe"
|
|
6
|
+ :autoplay="3000"
|
|
7
|
+ @change="i => currentItem = i"
|
|
8
|
+ :show-indicators="false"
|
|
9
|
+ >
|
5
|
10
|
<van-swipe-item v-for="(image, index) in HomeBannerImages" :key="index">
|
6
|
11
|
<ration-div :ratio="0.6">
|
7
|
12
|
<van-image width="100%" height="100%" :src="image.thumb" />
|
|
@@ -9,12 +14,22 @@
|
9
|
14
|
</van-swipe-item>
|
10
|
15
|
</van-swipe>
|
11
|
16
|
<div class="custom-indicator">
|
12
|
|
- <span v-for="(_, index) in HomeBannerImages" :key="index" :class="{'active': currentItem === index }"></span>
|
|
17
|
+ <span
|
|
18
|
+ v-for="(_, index) in HomeBannerImages"
|
|
19
|
+ :key="index"
|
|
20
|
+ :class="{'active': currentItem === index }"
|
|
21
|
+ ></span>
|
13
|
22
|
</div>
|
14
|
23
|
</div>
|
15
|
|
-
|
|
24
|
+
|
16
|
25
|
<!-- list -->
|
17
|
|
- <van-list class="mglr-10 course-list" v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
|
26
|
+ <van-list
|
|
27
|
+ class="mglr-10 course-list"
|
|
28
|
+ v-model="loading"
|
|
29
|
+ :finished="finished"
|
|
30
|
+ finished-text="没有更多了"
|
|
31
|
+ @load="onLoad"
|
|
32
|
+ >
|
18
|
33
|
<course-card
|
19
|
34
|
v-for="item in courseList"
|
20
|
35
|
:key="item.courseId"
|
|
@@ -106,7 +121,6 @@ export default {
|
106
|
121
|
</script>
|
107
|
122
|
|
108
|
123
|
<style lang="less" scoped>
|
109
|
|
-
|
110
|
124
|
.mglr-10 {
|
111
|
125
|
margin-left: 10px;
|
112
|
126
|
margin-right: 10px;
|
|
@@ -145,13 +159,12 @@ export default {
|
145
|
159
|
background: rgba(0, 0, 0, 0.2);
|
146
|
160
|
|
147
|
161
|
& + span {
|
148
|
|
- margin-left: .2em;
|
|
162
|
+ margin-left: 0.2em;
|
149
|
163
|
}
|
150
|
164
|
}
|
151
|
165
|
.active {
|
152
|
|
- background: rgba(0, 0, 0, .65);
|
|
166
|
+ background: rgba(0, 0, 0, 0.65);
|
153
|
167
|
}
|
154
|
168
|
}
|
155
|
|
-
|
156
|
169
|
}
|
157
|
170
|
</style>
|