提交 02a07a1a authored 作者: lihuihui's avatar lihuihui
......@@ -44,30 +44,30 @@ export default {
<style lang="scss" scoped>
.course-item {
padding: 15px 0;
padding: 0.3rem 0;
border-bottom: 1px solid #ccc;
}
.course-arrow {
width: 30px;
height: 100px;
width: 0.6rem;
height: 2rem;
}
.course-arrow__up {
background: url('https://zws-imgs-pub.ezijing.com/transport/weapp/icon_arrow_up.png') no-repeat left center;
background-size: 15px 15px;
background-size: 0.3rem 0.3rem;
}
.course-arrow__down {
background: url('https://zws-imgs-pub.ezijing.com/transport/weapp/icon_arrow_down.png') no-repeat left center;
background-size: 15px 15px;
background-size: 0.3rem 0.3rem;
}
.course-item-top {
display: flex;
}
.course-item-bottom {
padding-left: 30px;
padding-left: 0.6rem;
}
.course-item-pic {
width: 158px;
height: 100px;
width: 3.15rem;
height: 2rem;
margin-right: 10px;
overflow: hidden;
}
......@@ -88,11 +88,11 @@ export default {
}
.course-item__text {
display: inline-block;
height: 24px;
margin-left: 10px;
padding: 0 10px;
font-size: 10px;
line-height: 24px;
height: 0.48rem;
margin-left: 0.15rem;
padding: 0 0.2rem;
font-size: 0.22rem;
line-height: 0.48rem;
}
.course-item__text:first-child {
margin-left: 0;
......
......@@ -8,7 +8,7 @@
<ul>
<li v-for="subItem in item.children" :key="subItem.id" @click="onClick(subItem)">
<div class="name">{{subItem.name}}</div>
<div class="progress">{{subItem.video_progress | progressText}}</div>
<!-- <div class="progress">{{subItem.video_progress | progressText}}</div> -->
</li>
</ul>
</van-collapse-item>
......
<template>
<div class="main-container" v-show="loaded">
<div class="main-container" v-show="loaded" style="margin:0 0.15rem">
<template v-if="list.length">
<course-item v-for="item in list" :data="item" :key="item.course_id" @on-click="handleClick" />
</template>
......@@ -15,7 +15,7 @@ export default {
name: 'Course',
components: { CourseItem },
metaInfo: {
title: 'VIP课程'
title: '课程学习'
},
data() {
return {
......
<template>
<div class="main-container" v-if="loaded">
<template v-if="detail.chapters && detail.chapters.length">
<course-chapter :courseId="courseId" :data="detail.chapters"></course-chapter>
</template>
<van-empty description="暂无内容" v-else />
<div class="course-title">{{detail.course_name}}</div>
<van-tabs
class="main-tabs"
v-model="tabActive"
color="#2b7ce9"
:line-height="2"
:swipeable="true"
>
<van-tab title="课程学习">
<template v-if="detail.chapters && detail.chapters.length">
<course-chapter :courseId="courseId" :data="detail.chapters"></course-chapter>
</template>
<van-empty description="暂无内容" v-else />
</van-tab>
<van-tab title="知识点速学">
<div class="tab-content">
<course-tag :courseId="courseId"></course-tag>
</div>
</van-tab>
</van-tabs>
</div>
</template>
<script>
import CourseChapter from './components/courseChapter.vue'
import CourseTag from '../tag/index.vue'
import * as api from '@/api/course.js'
export default {
name: 'CourseLearnItem',
components: { CourseChapter },
metaInfo() {
return {
title: this.title
}
components: { CourseChapter, CourseTag },
metaInfo: {
title: '课程内容'
},
data() {
return {
tabActive: 0,
loaded: false,
detail: {}
}
......@@ -27,9 +43,6 @@ export default {
computed: {
courseId() {
return this.$route.params.id
},
title() {
return this.detail.curriculum ? this.detail.curriculum.curriculum_name : ''
}
},
methods: {
......@@ -53,3 +66,19 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.course-title {
font-size: 15px;
font-weight: 600;
color: #222;
padding: 20px 0 10px;
}
.tab-content {
margin-left: -0.4rem;
margin-right: -0.4rem;
min-height: 100vh;
background: #eee;
padding: 0.4rem;
}
</style>
<template>
<div class="main-container" v-show="loaded">
<div class="main-container" v-show="loaded" style="margin:0 0.15rem;">
<template v-if="list.length">
<course-item v-for="item in list" :data="item" :key="item.course_id" @on-click="handleClick" />
</template>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论