|
@@ -7,11 +7,12 @@
|
|
|
{{showMore ? '收起' : '显示'}}详情
|
|
{{showMore ? '收起' : '显示'}}详情
|
|
|
</c-button>
|
|
</c-button>
|
|
|
</back-title>
|
|
</back-title>
|
|
|
|
|
+ <div class="course-name-bar">{{course.name}}</div>
|
|
|
<show-transition>
|
|
<show-transition>
|
|
|
<course-detail v-if="showMore" :course="course"></course-detail>
|
|
<course-detail v-if="showMore" :course="course"></course-detail>
|
|
|
</show-transition>
|
|
</show-transition>
|
|
|
<template v-for="notice of notices">
|
|
<template v-for="notice of notices">
|
|
|
- <notice-card :key="'notice-' + notice.id"
|
|
|
|
|
|
|
+ <notice-card show :key="'notice-' + notice.id"
|
|
|
:notice="notice">
|
|
:notice="notice">
|
|
|
</notice-card>
|
|
</notice-card>
|
|
|
</template>
|
|
</template>
|
|
@@ -50,14 +51,22 @@ export default {
|
|
|
return momentFromNow(this.course.createAt)
|
|
return momentFromNow(this.course.createAt)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ course () {
|
|
|
|
|
+ this.fetchNotices()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
mounted () {
|
|
mounted () {
|
|
|
- getNotices({ courseId: this.course.id }).then(res => {
|
|
|
|
|
- this.notices = res.data
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- this.$setErrorMessage(err.response.data.msg)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.fetchNotices()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ fetchNotices () {
|
|
|
|
|
+ getNotices({ courseId: this.course.id }).then(res => {
|
|
|
|
|
+ this.notices = res.data
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.$setErrorMessage(err.response.data.msg)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
handleCheckSlideList () {
|
|
handleCheckSlideList () {
|
|
|
this.$router.push({ name: 'student-course-slides' })
|
|
this.$router.push({ name: 'student-course-slides' })
|
|
|
},
|
|
},
|
|
@@ -99,4 +108,10 @@ export default {
|
|
|
.course-detail {
|
|
.course-detail {
|
|
|
transform: translateY(-16px);
|
|
transform: translateY(-16px);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.course-name-bar {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ top: -12px;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|