|
|
@@ -1,27 +1,38 @@
|
|
|
<template>
|
|
|
- <div class="tab">
|
|
|
- <h1 class="title">我的主页</h1>
|
|
|
- <search-bar></search-bar>
|
|
|
- <section>
|
|
|
- <h1 class="sub-title">最近浏览</h1>
|
|
|
- <c-button @click.native="push()">临时:PDF阅读器链接</c-button>
|
|
|
- <br>
|
|
|
- </section>
|
|
|
- <section>
|
|
|
- <h1 class="sub-title">课程列表</h1>
|
|
|
- </section>
|
|
|
+ <div class="tab complex-tab">
|
|
|
+ <div class="left">
|
|
|
+ <h1 class="title">我的主页</h1>
|
|
|
+ <search-bar></search-bar>
|
|
|
+ <section>
|
|
|
+ <h1 class="sub-title">最近浏览</h1>
|
|
|
+ <!-- <c-button @click.native="push()">临时:PDF阅读器链接</c-button>-->
|
|
|
+ <slide-card :click-handler="push"></slide-card>
|
|
|
+ <br>
|
|
|
+ </section>
|
|
|
+ <section>
|
|
|
+ <h1 class="sub-title">课程列表</h1>
|
|
|
+ <course-card :course="{}" :index="2" :clickHandler="handleCourseCardClick"></course-card>
|
|
|
+ <course-card :course="{}" :index="2" :clickHandler="handleCourseCardClick"></course-card>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ <router-view/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import SearchBar from '@/components/SearchBar'
|
|
|
-import CButton from '@/components/CButton'
|
|
|
+import SlideCard from '@/components/SlideCard'
|
|
|
+import CourseCard from '@/components/CourseCard'
|
|
|
export default {
|
|
|
- components: { CButton, SearchBar },
|
|
|
+ components: { CourseCard, SlideCard, SearchBar },
|
|
|
methods: {
|
|
|
// todo 临时
|
|
|
push () {
|
|
|
this.$router.push('/pdf-reader/1')
|
|
|
+ },
|
|
|
+ handleCourseCardClick (courseId) {
|
|
|
+ // todo
|
|
|
+ this.$router.push({ name: 'teacher-course-slides', params: { courseId: courseId } })
|
|
|
}
|
|
|
}
|
|
|
}
|