You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.2 KiB
76 lines
2.2 KiB
<template>
|
|
<div>
|
|
<secondary-nav />
|
|
<!-- 列表 -->
|
|
<div class="container course-list">
|
|
<div class="row mt-3">
|
|
<div class="col-12">
|
|
<div class="title h3 my-4">{{title}}</div>
|
|
<div class="row justify-content-between">
|
|
<router-link :to="`/college/detail/${cid}/${item.id}`" class="item col-lg-3 col-md-6 mb-4 col-xs-12" v-for="(item,index) in articleList" :key="index">
|
|
<div class="banner">
|
|
<!-- <img src="http://iph.href.lu/260x150" alt /> -->
|
|
<img style="height: 135px;width: 254px;margin-bottom: 35px;" :src="item.full_cover" alt />
|
|
</div>
|
|
<div class="txt" style="padding: 0px 45px 0px 0px;font-size: 20px;">
|
|
{{item.title}}
|
|
</div>
|
|
</router-link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import College from "@/api/college";
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
cid: this.$route.params.cid,
|
|
articleList: [],
|
|
}
|
|
},
|
|
computed: {
|
|
title() {
|
|
let key = this.cid;
|
|
switch (key) {
|
|
case 'novice':
|
|
return this.$t('college.noviceTutorial')
|
|
case 'strategy':
|
|
return this.$t('college.TradingStrategy')
|
|
case 'research':
|
|
return this.$t('college.industryResearch')
|
|
case 'dictionary':
|
|
return this.$t('college.dictionary')
|
|
case 'report':
|
|
return this.$t('college.media')
|
|
case 'OkChain':
|
|
return 'OkChain'
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
getArticleList() {
|
|
College.getArticleList(this.cid).then(data => {
|
|
this.articleList = data;
|
|
|
|
}).catch();
|
|
}
|
|
},
|
|
watch: {
|
|
$route() {
|
|
this.cid = this.$route.params.cid;
|
|
this.getArticleList();
|
|
}
|
|
},
|
|
created() {
|
|
this.getArticleList();
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|
|
|