|
@@ -1,25 +1,11 @@
|
|
|
<template>
|
|
|
<div class="home">
|
|
|
<el-carousel height="100px" class="hfbox" direction="vertical" autoplay :interval="3000">
|
|
|
- <el-carousel-item>
|
|
|
- <a class="hf" href="http://www.news.cn/zt/djxxjy/index.html">
|
|
|
- <img src="../assets/hf1.jpg" class="hfimg">
|
|
|
- </a>
|
|
|
- </el-carousel-item>
|
|
|
- <el-carousel-item>
|
|
|
- <a class="hf" href="http://www.gov.cn/zhuanti/zggcddescqgdbdh/index.htm">
|
|
|
- <img src="../assets/hf2.jpg" class="hfimg">
|
|
|
- </a>
|
|
|
- </el-carousel-item>
|
|
|
- <el-carousel-item>
|
|
|
- <a class="hf" href="http://www.news.cn/zt/djxxjy/index.html">
|
|
|
- <img src="../assets/hf1.jpg" class="hfimg">
|
|
|
- </a>
|
|
|
- </el-carousel-item>
|
|
|
- <el-carousel-item>
|
|
|
- <a class="hf" href="http://www.gov.cn/zhuanti/zggcddescqgdbdh/index.htm">
|
|
|
- <img src="../assets/hf2.jpg" class="hfimg">
|
|
|
+ <el-carousel-item v-for="(item, index) in scrollList" :key="index">
|
|
|
+ <a class="hf" :href="item.url" v-if="item.url">
|
|
|
+ <img :src="item.img" class="hfimg">
|
|
|
</a>
|
|
|
+ <img :src="item.img" class="hfimg" v-else>
|
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
|
<div class="listBox">
|
|
@@ -63,7 +49,7 @@ export default {
|
|
|
links
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['menusall'])
|
|
|
+ ...mapState(['menusall', 'scrollList'])
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -136,9 +122,11 @@ export default {
|
|
|
await this.btnClick({ name: '10', type: 'threeDatagg', limit: 6, parentCode: true });
|
|
|
// 所有菜单
|
|
|
await this.menusQueryAll();
|
|
|
+ // 横幅
|
|
|
+ await this.upScrollQuery();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions(['contentsQuery', 'menusQueryAll', 'sourceQuery']),
|
|
|
+ ...mapActions(['contentsQuery', 'menusQueryAll', 'sourceQuery', 'upScrollQuery']),
|
|
|
async btnClick(e) {
|
|
|
const filter = { bind: e?.name };
|
|
|
if (e?.parentCode) filter.parentCode = e?.name;
|