提交 2fd68510 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 阅读材料显示描述

上级 4e7a87ff
<template> <template>
<container :title="chapter.name"> <container :title="chapter.name">
<div class="read-desc" v-html="detail.reading_content"></div>
<file-list :files="files"></file-list> <file-list :files="files"></file-list>
</container> </container>
</template> </template>
...@@ -32,6 +33,7 @@ export default { ...@@ -32,6 +33,7 @@ export default {
}, },
data() { data() {
return { return {
detail: {},
files: [] files: []
} }
}, },
...@@ -44,6 +46,7 @@ export default { ...@@ -44,6 +46,7 @@ export default {
methods: { methods: {
getChapterReading() { getChapterReading() {
api.getChapterReading(this.resourceId).then(response => { api.getChapterReading(this.resourceId).then(response => {
this.detail = response
this.files = response.reading_attachment this.files = response.reading_attachment
}) })
} }
...@@ -53,3 +56,10 @@ export default { ...@@ -53,3 +56,10 @@ export default {
} }
} }
</script> </script>
<style scoped>
.read-desc {
font-size: 16px;
margin-bottom: 40px;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论