提交 19b53738 authored 作者: pengxiaohui's avatar pengxiaohui

修改首页校长寄语

上级 c6575dbf
...@@ -10,50 +10,20 @@ ...@@ -10,50 +10,20 @@
</van-swipe-item> </van-swipe-item>
</template> </template>
</van-swipe> </van-swipe>
<text-swiper v-if="isShowSwiper" :listData="list" @slideTo="handleSlideTo" />
</card> </card>
</template> </template>
<script> <script>
import Card from '@/components/Card' import Card from '@/components/Card'
import NewLink from '@/components/NewLink' import NewLink from '@/components/NewLink'
import TextSwiper from './TextSwiper'
export default { export default {
components: { Card, NewLink, TextSwiper }, components: { Card, NewLink },
data() { data() {
return { return { list: [] }
list: [],
swiperOption: {
speed: 400,
autoplay: false,
delay: 3000,
loop: false,
// pagination: {
// el: '.swiper-pagination',
// clickable: true
// },
// direction: 'vertical',
height: 500
// autoHeight: true
},
isShowSwiper: false
}
}, },
async fetch() { async fetch() {
const params = { project_id: process.env.projectId, type_tag: 'img_text_school' } const params = { project_id: process.env.projectId, type_tag: 'img_text_school' }
this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => { this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
this.isShowSwiper = false
setTimeout(() => {
this.isShowSwiper = true
},300)
return res.data.data
})
},
mounted() {
this.isShowSwiper = false
setTimeout(() => {
this.isShowSwiper = true
},300)
} }
} }
</script> </script>
...@@ -82,4 +52,4 @@ export default { ...@@ -82,4 +52,4 @@ export default {
height: 10px; height: 10px;
border-radius: 2px; border-radius: 2px;
} }
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论