14 changed files with 108 additions and 14 deletions
@ -0,0 +1,69 @@ |
|||
<template> |
|||
<div> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-12 my-4" v-if="article"> |
|||
<div class="title h2 mt-4">{{article.title}}</div> |
|||
<div class="single-subtitle d-flex justify-content-between border-bottom pb-2"> |
|||
<!-- <div class="text-muted">{{article.created_at}}</div> --> |
|||
</div> |
|||
<div class="edit-content py-4"> |
|||
<div v-html="article.body"></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import College from "@/api/college"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
cid: this.$route.params.cid, |
|||
aid: this.$route.params.aid, |
|||
article: null, |
|||
recommend: null, |
|||
} |
|||
}, |
|||
watch: { |
|||
$route() { |
|||
this.cid = this.$route.params.cid; |
|||
this.aid = this.$route.params.aid; |
|||
this.initPage(); |
|||
}, |
|||
}, |
|||
methods: { |
|||
initPage() { |
|||
this.getArticleDetail(); |
|||
this.getRecommend(); |
|||
}, |
|||
getArticleDetail() { |
|||
console.log(this.aid,'11111'); |
|||
College.getArticleDetail(this.aid).then(data => { |
|||
this.article = data; |
|||
}).catch(err => {}); |
|||
}, |
|||
getRecommend() { |
|||
College.getRecommend().then(data => { |
|||
this.recommend = data; |
|||
}).catch(err => {}) |
|||
} |
|||
}, |
|||
created() { |
|||
this.initPage(); |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
/deep/ { |
|||
.el-breadcrumb__inner a, .el-breadcrumb__inner.is-link{ |
|||
color: #606266; |
|||
} |
|||
.el-breadcrumb__item:last-child .el-breadcrumb__inner{ |
|||
color: white; |
|||
} |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue