|
|
@@ -2,8 +2,9 @@
|
|
|
<div class="tab complex-tab">
|
|
|
<div class="left">
|
|
|
<h1 class="title">课程管理</h1>
|
|
|
- <div class="sub-title">我的课程</div>
|
|
|
- <div class="no-content-warning">您还没有设置相关课程喔~</div>
|
|
|
+ <!-- <div class="no-content-warning">您还没有设置相关课程喔~</div>-->
|
|
|
+ <course-card :course="{}" :index="1" :clickHandler="handleClick"></course-card>
|
|
|
+ <course-card :course="{}" :index="2" :clickHandler="handleClick"></course-card>
|
|
|
<c-button @click.native="handleCreateNewCourse">新建课程</c-button>
|
|
|
</div>
|
|
|
<transition name="fade" mode="in-out">
|
|
|
@@ -14,12 +15,16 @@
|
|
|
|
|
|
<script>
|
|
|
import CButton from '@/components/CButton'
|
|
|
+import CourseCard from '@/components/CourseCard'
|
|
|
|
|
|
export default {
|
|
|
- components: { CButton },
|
|
|
+ components: { CButton, CourseCard },
|
|
|
methods: {
|
|
|
handleCreateNewCourse () {
|
|
|
this.$router.push('/teacher/courses/create-new')
|
|
|
+ },
|
|
|
+ handleClick (courseId) {
|
|
|
+ this.$router.push({ name: 'teacher-course-detail', params: { courseId: courseId } })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -27,4 +32,8 @@ export default {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import "tab-common";
|
|
|
+
|
|
|
+.c-button {
|
|
|
+ margin-top: 24px;
|
|
|
+}
|
|
|
</style>
|