|
@@ -5,13 +5,13 @@
|
|
|
<el-col :span="24" class="zero one">
|
|
|
<el-col :span="16" class="one_1">
|
|
|
<el-carousel height="500px">
|
|
|
- <el-carousel-item v-for="(item, index) in bannerList" :key="index">
|
|
|
+ <el-carousel-item v-for="(item, index) in bannerList" :key="index" @click.native="toView(item, 'banner')">
|
|
|
<el-image class="image" :src="item.img_url && item.img_url.length > 0 ? item.img_url[0].url : ''"></el-image>
|
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="one_2">
|
|
|
- <el-col :span="24" class="newsList" v-for="(item, index) in newsList" :key="index">
|
|
|
+ <el-col :span="24" class="newsList" v-for="(item, index) in newsList" :key="index" @click.native="toView(item, 'news')">
|
|
|
<el-col :span="24" class="title textOver">{{ item.title }}</el-col>
|
|
|
<el-col :span="24" class="date">{{ item.create_time }}</el-col>
|
|
|
<el-col :span="24" class="brief">{{ item.brief }}</el-col>
|
|
@@ -25,14 +25,14 @@
|
|
|
<span></span>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="two_1">
|
|
|
- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="toView(item, 'news')">
|
|
|
<el-col :span="2" class="date">
|
|
|
<p>
|
|
|
<span>{{ getDate(item.create_time, 'day') }}</span>
|
|
|
<span>{{ getDate(item.create_time, 'year') }}</span>
|
|
|
</p>
|
|
|
</el-col>
|
|
|
- <el-col :span="2" class="info">
|
|
|
+ <el-col :span="22" class="info">
|
|
|
<el-col :span="24" class="title">{{ item.title }}</el-col>
|
|
|
<el-col :span="24" class="brief">{{ item.brief || '暂无' }}</el-col>
|
|
|
</el-col>
|
|
@@ -106,6 +106,10 @@ export default {
|
|
|
this.$set(this, `newsList`, res.data);
|
|
|
}
|
|
|
},
|
|
|
+ // 详细信息
|
|
|
+ toView(e, type) {
|
|
|
+ this.$router.push({ path: '/detail/index', query: { id: e._id, type: type } });
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|