|
@@ -2,6 +2,12 @@
|
2
|
2
|
<div class="mainPage">
|
3
|
3
|
<div class="topBanner">
|
4
|
4
|
<!-- <img src="" class="centerLabel cover" alt=""> -->
|
|
5
|
+ <swiper :options="swiperOption" ref="mySwiper">
|
|
6
|
+ <swiper-slide class="swiper-slide" v-for="(item,index) in 5" :key="index">
|
|
7
|
+ {{index}}
|
|
8
|
+ </swiper-slide>
|
|
9
|
+ <div class="swiper-pagination" slot="pagination"></div>
|
|
10
|
+ </swiper>
|
5
|
11
|
</div>
|
6
|
12
|
<div class="pageTitle flex-h">
|
7
|
13
|
<h5 class="flex-item">
|
|
@@ -19,7 +25,20 @@
|
19
|
25
|
</nav>
|
20
|
26
|
</div>
|
21
|
27
|
<div class="MsgBanner">
|
22
|
|
-
|
|
28
|
+ <div class="flex-h">
|
|
29
|
+ <i class="iconfont icon-xiaoxi"></i>
|
|
30
|
+ <span>最新消息:</span>
|
|
31
|
+ <div class="flex-item">
|
|
32
|
+ <div>
|
|
33
|
+ <swiper :options="swiperOptionMsg" ref="mySwiperMsg">
|
|
34
|
+ <swiper-slide class="swiper-slide" v-for="(item,index) in 5" :key="index">
|
|
35
|
+ <router-link :to="{name:'',query:{}}">这是一条消息</router-link>
|
|
36
|
+ </swiper-slide>
|
|
37
|
+ <div class="swiper-pagination" slot="pagination"></div>
|
|
38
|
+ </swiper>
|
|
39
|
+ </div>
|
|
40
|
+ </div>
|
|
41
|
+ </div>
|
23
|
42
|
</div>
|
24
|
43
|
<div class="pageTitle flex-h">
|
25
|
44
|
<h5 class="flex-item">
|
|
@@ -51,11 +70,28 @@
|
51
|
70
|
|
52
|
71
|
<script>
|
53
|
72
|
import newsItem from '../../../../components/newsItem/index'
|
|
73
|
+import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
|
74
|
+import 'swiper/dist/css/swiper.css'
|
54
|
75
|
|
55
|
76
|
export default {
|
56
|
77
|
name: '',
|
57
|
78
|
data () {
|
58
|
79
|
return {
|
|
80
|
+ swiperOption: {
|
|
81
|
+ observer:true,
|
|
82
|
+ loop : true,
|
|
83
|
+ autoplay: {
|
|
84
|
+ disableOnInteraction: false,
|
|
85
|
+ }
|
|
86
|
+ },
|
|
87
|
+ swiperOptionMsg: {
|
|
88
|
+ observer:true,
|
|
89
|
+ direction : 'vertical',
|
|
90
|
+ loop : true,
|
|
91
|
+ autoplay: {
|
|
92
|
+ disableOnInteraction: false,
|
|
93
|
+ }
|
|
94
|
+ },
|
59
|
95
|
newsList: [{ // 资讯列表
|
60
|
96
|
title:'我是标题我是标题我是标题我是标题我是标题我是标题',
|
61
|
97
|
time:'2018年5月25日',
|
|
@@ -85,10 +121,17 @@ export default {
|
85
|
121
|
}
|
86
|
122
|
},
|
87
|
123
|
computed: {
|
88
|
|
-
|
|
124
|
+ MySwiper() {
|
|
125
|
+ return this.$refs.mySwiper.swiper
|
|
126
|
+ },
|
|
127
|
+ MySwiperMsg() {
|
|
128
|
+ return this.$refs.MySwiperMsg.swiper
|
|
129
|
+ },
|
89
|
130
|
},
|
90
|
131
|
components: {
|
91
|
132
|
newsItem,
|
|
133
|
+ swiper,
|
|
134
|
+ swiperSlide,
|
92
|
135
|
},
|
93
|
136
|
created () {
|
94
|
137
|
|