降价文件链接: http: //127.0.0.1 :8000/media/uploads/content/test_y4O7oOS.md
Vue模板:
<template>
<div>
{{ artilce.title }}
{{ artilce.description }}
{{ artilce.get_content_file }}
</div>
</template>
Vue方法:
methods: {
async getArticleDetail() {
const category_slug = this.$route.params.category_slug
const article_slug = this.$route.params.article_slug
await axios
.get(`/api/${category_slug}/${article_slug}/`)
.then(response => {
this.artilce = response.data
document.title = this.artilce.title
})
.catch(err => {
console.log(err)
})
}
}