luyisha 3 years ago
parent
commit
9c3196e6d9
  1. 30
      src/views/home/index.vue

30
src/views/home/index.vue

@ -91,15 +91,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- futures class --> <!-- 系统公告 -->
<div class="section-block section-block-4"> <div class="section-block section-block-4">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<div class="img-box" v-for="(item, index) in articleList" :key="index"> <router-link class="post-link img-box notice-bg" v-for="(item, index) in noticeList" :key="index" :to="`/college/detail/${item.category_id}/${item.id}`">
<router-link class="post-link" :to="`/college/detail/${item.category_id}/${item.id}`"> <!-- <div>{{ item.title }}</div> -->
<img :src="item.full_cover" alt="" > </router-link>
</router-link>
<!-- <div>{{ item.title }}</div> -->
</div>
</div> </div>
</div> </div>
<!-- 市场趋势 --> <!-- 市场趋势 -->
@ -1062,7 +1059,7 @@ export default {
this.bannerList = res.bannerList; this.bannerList = res.bannerList;
this.homeList = res.homeList; this.homeList = res.homeList;
this.homeList2 = res.homeList.splice(0,4); this.homeList2 = res.homeList.slice(0,4);
// console.log(res.homeList); // console.log(res.homeList);
this.marketList = res.marketList; this.marketList = res.marketList;
// this.calculatePath() // this.calculatePath()
@ -1201,7 +1198,7 @@ export default {
getArticleList() { getArticleList() {
College.getArticleList(18) College.getArticleList(18)
.then((data) => { .then((data) => {
this.articleList = data.splice(0, 3); this.articleList = data.slice(0, 3);
setTimeout(() => { setTimeout(() => {
this.skroll(); this.skroll();
}, 100); }, 100);
@ -1211,7 +1208,13 @@ export default {
// //
article() { article() {
Member.article({ type: "notice" }).then((res) => { Member.article({ type: "notice" }).then((res) => {
this.noticeList = res.data.splice(0, 4); let arr = res.data;
arr.map(item=>{
if(item.id == 163 || item.id == 157 || item.id == 158){
this.noticeList.push(item)
}
})
// this.noticeList = res.data.slice(0, 3);
}); });
}, },
getNoticeDate(str) { getNoticeDate(str) {
@ -2293,6 +2296,13 @@ path {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
} }
.notice-bg{
height: 200px;
background-image: url("../../../static/images/7.png");
background-size: 100% 100%;
padding: 20px;
cursor: pointer;
}
.img-box-2{ .img-box-2{
width: 386px; width: 386px;

Loading…
Cancel
Save