Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
9d929bb5
提交
9d929bb5
authored
7月 06, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab.ezijing.com/ezijing/transport-weapp-h5
上级
61d7328c
22652d36
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
84 行增加
和
11 行删除
+84
-11
index.vue
src/pages/course/learn/index.vue
+6
-0
item.vue
src/pages/course/learn/item.vue
+22
-8
courseTagMessage.vue
src/pages/course/tag/courseTagMessage.vue
+5
-1
index.vue
src/pages/course/tag/index.vue
+7
-0
item.vue
src/pages/course/tag/item.vue
+13
-1
list.vue
src/pages/course/tag/list.vue
+25
-1
index.vue
src/pages/home/index.vue
+6
-0
没有找到文件。
src/pages/course/learn/index.vue
浏览文件 @
9d929bb5
...
...
@@ -21,8 +21,14 @@ export default {
},
methods
:
{
getCourseList
()
{
this
.
$toast
.
loading
({
duration
:
0
,
message
:
'加载中...'
,
forbidClick
:
true
})
api
.
getCourseList
().
then
(
response
=>
{
this
.
courseList
=
response
this
.
$toast
.
clear
()
})
}
},
...
...
src/pages/course/learn/item.vue
浏览文件 @
9d929bb5
<
template
>
<div
class=
"main-container"
>
<div
class=
"main-container"
v-show=
"loaded"
>
<div
class=
"course-title"
>
{{
detail
.
course_name
}}
</div>
<van-tabs
class=
"main-tabs"
v-model=
"tabActive"
color=
"#2b7ce9"
:sticky=
"true"
:line-height=
"2"
@
click=
"onTabClick"
>
...
...
@@ -13,10 +12,9 @@
<course-chapter
:courseId=
"courseId"
:data=
"detail.chapters"
></course-chapter>
</van-tab>
<van-tab
title=
"知识点速学"
name=
"1"
>
<course-tag
:courseId=
"courseId"
style=
"margin-left:-0.4rem;margin-right:-0.4rem;min-height:100vh;background:#eee;"
></course-tag>
<div
class=
"tab-content"
>
<course-tag
:courseId=
"courseId"
></course-tag>
</div>
</van-tab>
</van-tabs>
</div>
...
...
@@ -35,6 +33,7 @@ export default {
data
()
{
return
{
tabActive
:
'0'
,
loaded
:
false
,
detail
:
{}
}
},
...
...
@@ -42,7 +41,7 @@ export default {
$route
:
{
immediate
:
true
,
handler
(
route
)
{
this
.
tabActive
=
route
.
query
.
tab
||
'
1
'
this
.
tabActive
=
route
.
query
.
tab
||
'
0
'
}
}
},
...
...
@@ -57,12 +56,20 @@ export default {
},
// 课程学习
getCourse
()
{
this
.
$toast
.
loading
({
duration
:
0
,
message
:
'加载中...'
,
forbidClick
:
true
})
this
.
loaded
=
false
api
.
getCourse
(
this
.
courseId
).
then
(
response
=>
{
this
.
loaded
=
true
response
.
chapters
=
response
.
chapters
.
filter
(
item
=>
{
item
.
children
=
item
.
children
.
filter
(
child
=>
child
.
type
===
2
)
return
item
.
children
.
length
})
this
.
detail
=
response
this
.
$toast
.
clear
()
})
}
},
...
...
@@ -77,6 +84,13 @@ export default {
font-size
:
15px
;
font-weight
:
600
;
color
:
#222
;
padding
:
20px
0
10px
;
padding
:
20px
20px
10px
;
}
.tab-content
{
margin-left
:
-0
.4rem
;
margin-right
:
-0
.4rem
;
min-height
:
100vh
;
background
:
#eee
;
padding
:
0
.4rem
;
}
</
style
>
src/pages/course/tag/courseTagMessage.vue
浏览文件 @
9d929bb5
...
...
@@ -69,7 +69,11 @@ export default {
viewMore
()
{
this
.
$router
.
push
({
name
:
'courseTag'
,
params
:
{
courseId
:
this
.
courseId
,
chapterId
:
this
.
data
.
id
}
params
:
{
courseId
:
this
.
courseId
,
chapterId
:
this
.
data
.
id
},
query
:
{
is_test
:
this
.
isTest
?
'1'
:
'0'
}
})
}
},
...
...
src/pages/course/tag/index.vue
浏览文件 @
9d929bb5
...
...
@@ -60,6 +60,11 @@ export default {
methods
:
{
// 获取知识点列表
getCourseTagList
()
{
this
.
$toast
.
loading
({
duration
:
0
,
message
:
'加载中...'
,
forbidClick
:
true
})
api
.
getCourseTagList
(
this
.
courseId
).
then
(
response
=>
{
this
.
$emit
(
'ready'
,
response
)
this
.
detail
=
response
...
...
@@ -71,6 +76,7 @@ export default {
payload
:
item
}
})
this
.
$toast
.
clear
()
})
},
// 输入搜索
...
...
@@ -152,6 +158,7 @@ export default {
}
.send
{
height
:
50px
;
padding-bottom
:
env
(
safe-area-inset-bottom
);
.inner
{
position
:
fixed
;
left
:
0
;
...
...
src/pages/course/tag/item.vue
浏览文件 @
9d929bb5
<
template
>
<div
class=
"course-tag-wrapper"
>
<div
class=
"course-tag-wrapper"
v-show=
"loaded"
>
<div
class=
"course-tag-hd"
>
<h1
class=
"tag-title"
>
{{
detail
.
title
}}
</h1>
</div>
...
...
@@ -17,6 +17,7 @@ export default {
name
:
'CourseTagItem'
,
data
()
{
return
{
loaded
:
false
,
detail
:
{}
}
},
...
...
@@ -33,8 +34,16 @@ export default {
methods
:
{
// 获取知识点详情
getCourseTag
()
{
this
.
$toast
.
loading
({
duration
:
0
,
message
:
'加载中...'
,
forbidClick
:
true
})
this
.
loaded
=
false
api
.
getCourseTag
(
this
.
tagId
).
then
(
response
=>
{
this
.
loaded
=
true
this
.
detail
=
response
this
.
$toast
.
clear
()
})
}
},
...
...
@@ -51,8 +60,11 @@ export default {
box-sizing
:
border-box
;
}
.course-tag-hd
{
position
:
sticky
;
top
:
0
;
padding
:
0
.4rem
;
background-color
:
#fff
;
z-index
:
10
;
}
.course-tag-bd
{
padding
:
0
.4rem
;
...
...
src/pages/course/tag/list.vue
浏览文件 @
9d929bb5
<
template
>
<div
class=
"course-tag-wrapper"
>
<div
class=
"course-tag-wrapper"
v-show=
"loaded"
>
<div
class=
"course-tag-hd"
>
<h1
class=
"course-title"
>
{{
detail
.
course_name
}}
</h1>
</div>
...
...
@@ -22,6 +22,7 @@ export default {
name
:
'CourseTagList'
,
data
()
{
return
{
loaded
:
false
,
detail
:
{
chapters
:
[]
}
}
},
...
...
@@ -40,16 +41,36 @@ export default {
},
tagList
()
{
return
this
.
chapter
.
tag
||
[]
},
isTest
()
{
return
this
.
$route
.
query
.
is_test
===
'1'
}
},
methods
:
{
// 获取知识点列表
getCourseTagList
()
{
this
.
$toast
.
loading
({
duration
:
0
,
message
:
'加载中...'
,
forbidClick
:
true
})
this
.
loaded
=
false
api
.
getCourseTagList
(
this
.
courseId
).
then
(
response
=>
{
this
.
loaded
=
true
this
.
detail
=
response
this
.
$toast
.
clear
()
})
},
onClick
({
id
})
{
if
(
this
.
isTest
)
{
const
query
=
{
type
:
2
,
tag_id
:
id
,
papersUrl
:
'zy/v2/examination/course-papers'
}
this
.
$router
.
push
({
path
:
'/exam/answer'
,
query
})
return
}
this
.
$router
.
push
({
name
:
'courseTagItem'
,
params
:
{
id
}
})
}
},
...
...
@@ -65,8 +86,11 @@ export default {
box-sizing
:
border-box
;
}
.course-tag-hd
{
position
:
sticky
;
top
:
0
;
padding
:
0
.4rem
;
background-color
:
#fff
;
z-index
:
10
;
}
.course-tag-bd
{
padding
:
0
.4rem
;
...
...
src/pages/home/index.vue
浏览文件 @
9d929bb5
...
...
@@ -51,8 +51,14 @@ export default {
methods
:
{
// 获取课程试听列表
getCourseList
()
{
this
.
$toast
.
loading
({
duration
:
0
,
message
:
'加载中...'
,
forbidClick
:
true
})
api
.
getFreeCourseList
().
then
(
response
=>
{
this
.
courseList
=
response
this
.
$toast
.
clear
()
})
},
// 搜索
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论