Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
036fc508
Commit
036fc508
authored
Jan 12, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ba23f732
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
113 additions
and
103 deletions
+113
-103
courseList.vue
src/pages/study/courseList.vue
+113
-103
No files found.
src/pages/study/courseList.vue
View file @
036fc508
<
style
scoped
>
.studyCourse
{
/* width: 100%; */
/* height: 100vh; */
min-height
:
100vh
;
background
:
#F5F5F5
;
padding
:
32
rpx
;
box-sizing
:
border-box
;
...
...
@@ -34,7 +34,7 @@
.Course_List
{
width
:
100%
;
height
:
auto
;
border-bottom
:
1px
solid
#F5F5F5
;
border-bottom
:
1px
solid
#F5F5F5
;
}
.CourseList_One
{
...
...
@@ -42,7 +42,7 @@
display
:
flex
;
align-items
:
center
;
background-color
:
#FFFFFF
;
padding
:
0
30
rpx
;
padding
:
0
30
rpx
;
}
.Course_Name
{
...
...
@@ -61,95 +61,103 @@
font-size
:
22
rpx
;
margin-top
:
28
rpx
;
}
.Course_SeName
{
width
:
50%
;
margin
:
0
20
rpx
;
.Course_SeName
{
width
:
50%
;
margin
:
0
20
rpx
;
}
.Course_Two
{
.Course_Two
{
background-color
:
#EBEBEB
;
height
:
200
rpx
;
width
:
100%
;
height
:
200
rpx
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
}
.Course_Two
>
view
{
flex
:
0
0
33.3%
;
.Course_Two
>
view
{
flex
:
0
0
33.3%
;
text-align
:
center
;
}
.Course_Two
img
{
width
:
90
rpx
;
height
:
90
rpx
;
.Course_Two
img
{
width
:
90
rpx
;
height
:
90
rpx
;
}
.Course_Opera
{
.Course_Opera
{
color
:
#666666
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
text-align
:
center
;
margin-top
:
5
rpx
;
margin-top
:
5
rpx
;
}
.loading
{
position
:
fixed
;
z-index
:
9999
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
position
:
fixed
;
z-index
:
9999
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
</
style
>
<
template
>
<view
class=
"studyCourse"
>
<view
class=
"Course_Top"
>
<view
class=
"CourseBan"
>
《
{{
CourseName
}}
》
</view>
<view
class=
"CourseTotal"
v-if=
"TotalHours>0"
>
共
{{
TotalHours
}}
课
</view>
</view>
<div
class=
"loading"
v-if=
"isShowLoad"
>
<van-loading
type=
"spinner"
color=
"#fff"
/>
</div>
<view
class=
"Course_Bottom"
v-if=
"ChapterList.length>0"
>
<view
class=
"Course_List"
v-for=
"(item,index) in ChapterList"
:key=
"index"
>
<view
class=
"CourseList_One"
@
click=
"getReview(index)"
>
<view>
<van-circle
:value=
"item.StudyProgress"
layer-color=
"#E4E5FB"
:size=
"75"
color=
"#4C50E7"
:rate=
"100"
:speed=
"100"
:text=
"getSpeed(item.StudyProgress)"
/>
</view>
<view
class=
"Course_SeName"
>
<view
class=
"Course_Name"
>
{{
item
.
ChapterTree
.
ChapterName
}}
</view>
<view
class=
"Course_Index"
>
第
{{
item
.
ChapterTree
.
ChapterNo
}}
课
</view>
</view>
<view>
<van-rate
:value=
"item.Score"
:size=
"20"
readonly
color=
"#FAC217"
void-color=
"#EBEBEB"
void-icon=
"star"
icon=
"star"
:count=
"3"
/>
</view>
</view>
<view
class=
"Course_Two"
v-if=
"item.isShow"
@
click=
"goWordStudy(item,1)"
>
<view>
<template
v-if=
"ChapterList.length>0"
>
<view
class=
"Course_Top"
>
<view
class=
"CourseBan"
>
《
{{
CourseName
}}
》
</view>
<view
class=
"CourseTotal"
v-if=
"TotalHours>0"
>
共
{{
TotalHours
}}
课
</view>
</view>
<div
class=
"loading"
v-if=
"isShowLoad"
>
<van-loading
type=
"spinner"
color=
"#fff"
/>
</div>
<view
class=
"Course_Bottom"
>
<view
class=
"Course_List"
v-for=
"(item,index) in ChapterList"
:key=
"index"
>
<view
class=
"CourseList_One"
@
click=
"getReview(index)"
>
<view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/review.png"
alt=
""
/>
<van-circle
:value=
"item.StudyProgress"
layer-color=
"#E4E5FB"
:size=
"75"
color=
"#4C50E7"
:rate=
"100"
:speed=
"100"
:text=
"getSpeed(item.StudyProgress)"
/>
</view>
<view
class=
"Course_SeName"
>
<view
class=
"Course_Name"
>
{{
item
.
ChapterTree
.
ChapterName
}}
</view>
<view
class=
"Course_Index"
>
第
{{
item
.
ChapterTree
.
ChapterNo
}}
课
</view>
</view>
<view
class=
"Course_Opera"
>
课程回顾
</view>
</view>
<view
@
click=
"goWordStudy(item,2)"
>
<view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/fuxi.png"
alt=
""
/>
<van-rate
:value=
"item.Score"
:size=
"20"
readonly
color=
"#FAC217"
void-color=
"#EBEBEB"
void-icon=
"star"
icon=
"star"
:count=
"3"
/>
</view>
<view
class=
"Course_Opera"
>
单词
</view>
</view>
<view>
<view
@
click=
"jumpPage(`/pages/word/test?CourseId=0`)"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/ceshi.png"
alt=
""
/>
<view
class=
"Course_Two"
v-if=
"item.isShow"
@
click=
"goWordStudy(item,1)"
>
<view>
<view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/review.png"
alt=
""
/>
</view>
<view
class=
"Course_Opera"
>
课程回顾
</view>
</view>
<view
@
click=
"goWordStudy(item,2)"
>
<view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/fuxi.png"
alt=
""
/>
</view>
<view
class=
"Course_Opera"
>
单词
</view>
</view>
<view>
<view
@
click=
"jumpPage(`/pages/word/test?CourseId=0`)"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/ceshi.png"
alt=
""
/>
</view>
<view
class=
"Course_Opera"
>
练习
</view>
</view>
<view
class=
"Course_Opera"
>
练习
</view>
</view>
</view>
</view>
</view>
<van-empty
v-else
class=
"custom-image"
image=
"https://img01.yzcdn.cn/vant/custom-empty-image.png"
description=
"暂无数据"
/>
</
template
>
<van-empty
description=
"暂无数据"
v-else
/>
</view>
</template>
...
...
@@ -171,75 +179,77 @@
uni
.
setNavigationBarTitle
({
title
:
"所有单词"
,
});
if
(
options
.
ClassId
&&
options
.
CourseId
)
{
if
(
options
.
ClassId
&&
options
.
CourseId
)
{
this
.
msg
.
ClassId
=
options
.
ClassId
;
this
.
msg
.
CourseId
=
options
.
CourseId
this
.
getChapterList
();
}
if
(
options
.
CourseName
)
{
if
(
options
.
CourseName
)
{
this
.
CourseName
=
options
.
CourseName
}
if
(
options
.
TotalHours
)
{
if
(
options
.
TotalHours
)
{
this
.
TotalHours
=
options
.
TotalHours
}
},
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
ChapterList
:
[],
//课程列表
msg
:{
ClassId
:
0
,
CourseId
:
0
msg
:
{
ClassId
:
0
,
CourseId
:
0
},
CourseName
:
''
,
TotalHours
:
0
,
isShowLoad
:
false
CourseName
:
''
,
TotalHours
:
0
,
isShowLoad
:
false
})
let
methods
=
{
async
getChapterList
()
{
data
.
isShowLoad
=
true
;
proxy
.
$request
(
"/AppletIndex/GetMyStudyCourseChapterList"
,
data
.
msg
).
then
((
res
)
=>
{
data
.
isShowLoad
=
false
;
if
(
res
.
Code
==
1
)
{
data
.
ChapterList
=
res
.
Data
;
data
.
ChapterList
.
forEach
(
x
=>
{
x
.
isShow
=
false
})
}
});
data
.
isShowLoad
=
true
;
proxy
.
$request
(
"/AppletIndex/GetMyStudyCourseChapterList"
,
data
.
msg
).
then
((
res
)
=>
{
data
.
isShowLoad
=
false
;
if
(
res
.
Code
==
1
)
{
data
.
ChapterList
=
res
.
Data
;
data
.
ChapterList
.
forEach
(
x
=>
{
x
.
isShow
=
false
})
}
});
},
getSpeed
(
score
){
if
(
score
<
100
)
{
return
score
+
'%'
}
else
{
getSpeed
(
score
)
{
if
(
score
<
100
)
{
return
score
+
'%'
}
else
{
return
'已学完'
}
},
//点击展开
getReview
(
index
){
data
.
ChapterList
.
forEach
((
x
,
i
)
=>
{
if
(
index
!=
i
)
{
x
.
isShow
=
false
;
getReview
(
index
)
{
data
.
ChapterList
.
forEach
((
x
,
i
)
=>
{
if
(
index
!=
i
)
{
x
.
isShow
=
false
;
}
})
data
.
ChapterList
[
index
].
isShow
=
!
data
.
ChapterList
[
index
].
isShow
;
data
.
ChapterList
[
index
].
isShow
=
!
data
.
ChapterList
[
index
].
isShow
;
},
jumpPage
(
url
)
{
uni
.
navigateTo
({
url
:
url
,
});
},
goWordStudy
(
obj
,
Type
){
if
(
obj
){
let
url
=
`/pages/word/wordStudy?CourseId=
${
obj
.
ChapterTree
.
CourseId
}
&&ChapterId=
${
obj
.
ChapterTree
.
ChapterId
}
&&ReviewChapterId=0&&Type=
${
Type
}
`
goWordStudy
(
obj
,
Type
)
{
if
(
obj
)
{
let
url
=
`/pages/word/wordStudy?CourseId=
${
obj
.
ChapterTree
.
CourseId
}
&&ChapterId=
${
obj
.
ChapterTree
.
ChapterId
}
&&ReviewChapterId=0&&Type=
${
Type
}
`
uni
.
navigateTo
({
url
:
url
url
:
url
});
}
}
}
onMounted
(()
=>
{
})
onMounted
(()
=>
{})
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
...
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