Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
e7cc090e
提交
e7cc090e
authored
8月 06, 2020
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
c41ef047
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
35 行增加
和
46 行删除
+35
-46
item.vue
src/pages/course/learn/item.vue
+6
-4
courseTagMessage.vue
src/pages/course/tag/courseTagMessage.vue
+25
-36
item.vue
src/pages/course/tag/item.vue
+1
-1
list.vue
src/pages/course/tag/list.vue
+2
-4
tagMessage.vue
src/pages/course/tag/tagMessage.vue
+1
-1
没有找到文件。
src/pages/course/learn/item.vue
浏览文件 @
e7cc090e
...
...
@@ -8,13 +8,13 @@
:line-height=
"2"
:swipeable=
"true"
>
<van-tab
title=
"
课程
学习"
>
<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=
"
知识点速学
"
>
<van-tab
title=
"
按考点学习
"
>
<div
class=
"tab-content"
>
<course-tag
:courseId=
"courseId"
></course-tag>
</div>
...
...
@@ -30,8 +30,10 @@ import * as api from '@/api/course.js'
export
default
{
name
:
'CourseLearnItem'
,
components
:
{
CourseChapter
,
CourseTag
},
metaInfo
:
{
title
:
'课程内容'
metaInfo
()
{
return
{
title
:
this
.
detail
.
course_name
||
''
}
},
data
()
{
return
{
...
...
src/pages/course/tag/courseTagMessage.vue
浏览文件 @
e7cc090e
<
template
>
<div
class=
"course-tag-message"
:class=
"classes"
>
<div
class=
"course-tag-message"
>
<div
class=
"course-tag-message-hd"
>
<div
class=
"course-tag-message__title"
>
{{
data
.
name
}}
</div>
<div
class=
"course-tag-message__more"
@
click=
"viewMore"
v-if=
"hasMore"
>
更多
<van-icon
name=
"arrow"
/>
</div>
</div>
<div
class=
"course-tag-message-bd"
v-if=
"data
.tag && data.tag
.length"
>
<div
class=
"course-tag-message-bd"
v-if=
"data
List && dataList
.length"
>
<ul
class=
"message-tag-list"
ref=
"content"
>
<template
v-for=
"item in data
.tag
"
>
<template
v-for=
"item in data
List
"
>
<li
class=
"course-tag-item"
:key=
"item.id"
@
click=
"onClick(item)"
>
<p>
{{
item
.
title
}}
</p>
</li>
</
template
>
</ul>
</div>
<div
class=
"more"
@
click=
"viewMore"
v-if=
"hasMore"
>
<
template
v-if=
"!showMore"
>
<span>
更多
</span>
<van-icon
name=
"arrow-down"
></van-icon>
</
template
>
<
template
v-else
>
<span>
收起
</span>
<van-icon
name=
"arrow-up"
></van-icon>
</
template
>
</div>
</div>
</template>
...
...
@@ -35,22 +29,19 @@ export default {
},
data
()
{
return
{
showMore
:
false
,
maxHeight
:
102
,
contentHeight
:
0
maxCount
:
8
}
},
computed
:
{
hasMore
()
{
return
this
.
contentHeight
>
this
.
maxHeight
},
classes
()
{
return
{
'has-more'
:
this
.
hasMore
&&
!
this
.
showMore
}
return
this
.
data
.
tag
?
this
.
data
.
tag
.
length
>
this
.
maxCount
:
false
},
isWeapp
()
{
return
this
.
$store
.
state
.
isWeapp
},
// 最多现实8条
dataList
()
{
return
this
.
data
.
tag
?
this
.
data
.
tag
.
slice
(
0
,
this
.
maxCount
)
:
[]
}
},
methods
:
{
...
...
@@ -68,9 +59,6 @@ export default {
this
.
$emit
(
'change'
,
data
)
}
},
toggleMore
()
{
this
.
showMore
=
!
this
.
showMore
},
viewMore
()
{
const
path
=
`/course/learn/
${
this
.
courseId
}
/tag/
${
this
.
data
.
id
}
?is_test=
${
this
.
isTest
?
'1'
:
'0'
}
`
if
(
this
.
isWeapp
)
{
...
...
@@ -82,9 +70,6 @@ export default {
this
.
$router
.
push
({
path
})
}
}
},
mounted
()
{
this
.
contentHeight
=
this
.
$refs
.
content
?
this
.
$refs
.
content
.
offsetHeight
:
0
}
}
</
script
>
...
...
@@ -96,18 +81,25 @@ export default {
border-radius
:
6px
;
}
.course-tag-message-hd
{
display
:
flex
;
}
.course-tag-message__title
{
flex
:
1
;
font-size
:
15px
;
font-weight
:
bold
;
color
:
#222
;
}
.has-more
.course-tag-message-bd
{
margin-top
:
10px
;
height
:
102px
;
overflow
:
hidden
;
.course-tag-message__more
{
margin-left
:
20px
;
font-size
:
13px
;
color
:
#f47885
;
}
.message-tag-list
{
margin-top
:
20px
;
}
.course-tag-item
{
display
:
inline-block
;
max-width
:
100%
;
// height: 24px;
margin
:
0
10px
10px
0
;
padding
:
0
15px
;
background
:
#f47885
;
...
...
@@ -117,9 +109,6 @@ export default {
font-size
:
13px
;
color
:
#fff
;
line-height
:
24px
;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
}
}
.more
{
...
...
src/pages/course/tag/item.vue
浏览文件 @
e7cc090e
...
...
@@ -29,7 +29,7 @@ export default {
name
:
'CourseTagItem'
,
metaInfo
()
{
return
{
title
:
'知识点速学
'
title
:
this
.
detail
.
title
||
'
'
}
},
data
()
{
...
...
src/pages/course/tag/list.vue
浏览文件 @
e7cc090e
...
...
@@ -22,7 +22,7 @@ export default {
name
:
'CourseTagList'
,
metaInfo
()
{
return
{
title
:
this
.
isTest
?
'知识点小测'
:
'知识点速学
'
title
:
this
.
detail
.
course_name
||
'
'
}
},
data
()
{
...
...
@@ -39,9 +39,7 @@ export default {
return
this
.
$route
.
params
.
chapterId
},
chapter
()
{
const
found
=
this
.
detail
.
chapters
.
find
(
item
=>
item
.
id
===
this
.
chapterId
)
const
found
=
this
.
detail
.
chapters
.
find
(
item
=>
item
.
id
===
this
.
chapterId
)
return
found
||
{}
},
tagList
()
{
...
...
src/pages/course/tag/tagMessage.vue
浏览文件 @
e7cc090e
...
...
@@ -17,7 +17,7 @@
</div>
<div
class=
"tools"
>
<ul>
<li
@
click=
"toExamPage"
>
知识点
考试
</li>
<li
@
click=
"toExamPage"
>
相关
考试
</li>
<li
@
click=
"toCourseVideo"
v-if=
"data.has_video"
>
相关视频
</li>
</ul>
</div>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论