Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
5e7d4989
Commit
5e7d4989
authored
Apr 27, 2021
by
林文清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学习在线
parent
3804cdbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
14 deletions
+55
-14
curriculum.vue
src/pages/learn/curriculum.vue
+55
-14
No files found.
src/pages/learn/curriculum.vue
View file @
5e7d4989
...
...
@@ -3,30 +3,34 @@
<view
class=
"title"
>
课程简介
</view>
<view
class=
"u-content"
>
<u-parse
:html=
"courseInfo.intro"
></u-parse>
</view>
<view
class=
"lecturer"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight: bold;margin: 30rpx 0;"
>
讲师
</view>
<view
class=
""
style=
"display: flex;"
>
<image
src=
"../../static/logo.png"
mode=
""
></image>
<view
style=
"font-size: 30rpx;font-weight:1000;margin: 19px 24px;"
>
扳手卢老师
</view>
<view
class=
""
v-if=
"courseInfo.isTeachers"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight: bold;margin: 30rpx 0;"
>
讲师
</view>
<view
class=
""
style=
"display: flex;"
>
<image
src=
"../../static/logo.png"
mode=
""
></image>
<view
style=
"font-size: 30rpx;font-weight:1000;margin: 19px 24px;"
>
{{
courseInfo
.
teacher
.
name
}}
</view>
</view>
</view>
<view
class=
""
style=
"margin: 36rpx 0;"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight:1000"
>
目录
</view>
<view
v-for=
"
item
in list"
>
<view
v-for=
"
(item,index)
in list"
>
<view
class=
"chapter"
>
{{
item
.
name
}}
</view>
<view
class=
"video"
v-for=
"
key
in item.section"
@
click=
details(key.id)
>
<view
class=
"video"
v-for=
"
(section,key)
in item.section"
@
click=
details(key.id)
>
<view
class=
"video_1"
>
<view
class=
"text"
v-text=
"wareType(key.ware)"
>
<view
class=
"text"
v-text=
"wareType(section.ware)"
>
</view>
<text
>
1-
{{
key
.
order
}}
</text>
<text
class=
"text2"
>
{{
key
.
name
}}
</text>
<text
class=
"text3"
v-text=
"
key
.isLearned==false?'未开始':'完成'"
></text>
<text
class=
"texts"
>
{{
index
+
1
}}
-
{{
key
+
1
}}
</text>
<text
class=
"text2"
>
{{
section
.
name
}}
</text>
<text
class=
"text3"
v-text=
"
section
.isLearned==false?'未开始':'完成'"
></text>
</view>
</view>
</view>
...
...
@@ -45,6 +49,11 @@
},
list
:[],
examId
:
1
,
courseInfo
:
{
intro
:
''
,
isTeachers
:
false
,
teacher
:
{}
}
}
},
onLoad
(
a
){
...
...
@@ -52,8 +61,31 @@
this
.
params
.
course_id
=
a
.
course_id
console
.
log
(
this
.
params
.
course_id
)
this
.
getCapterDetails
()
this
.
getCourseInfo
()
},
methods
:
{
getCourseInfo
()
{
let
param
=
{
course_id
:
this
.
params
.
course_id
};
this
.
$u
.
api
.
CourseList
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
courseInfo
.
intro
=
res
.
data
.
course
.
intro
;
this
.
courseInfo
.
isTeachers
=
res
.
data
.
course
.
teachers
.
length
>
0
;
this
.
courseInfo
.
teacher
=
this
.
courseInfo
.
isTeachers
?
res
.
data
.
course
.
teachers
[
0
]
:
{};
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
});
},
//获取章节详情
getCapterDetails
()
{
console
.
log
(
'获取章节详情'
)
...
...
@@ -133,7 +165,7 @@
<
style
lang=
"scss"
>
.title
{
height
:
1
64rpx
;
height
:
64rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
margin
:
24rpx
34rpx
;
...
...
@@ -158,6 +190,12 @@
margin
:
20rpx
0
;
position
:
relative
;
width
:
100%
;
.texts
{
border
:
1px
solid
#8F8F94
;
text-align
:
center
;
line-height
:
38rpx
;
margin-right
:
5rpx
;
}
.text
{
width
:
100rpx
;
height
:
38rpx
;
...
...
@@ -179,4 +217,7 @@
right
:
0
;
}
}
.u-content
{
padding
:
0rpx
34rpx
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment