Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
475b22f7
Commit
475b22f7
authored
Nov 23, 2022
by
kyle
Browse files
Options
Browse Files
Download
Plain Diff
学习统计
parents
1b0130d3
c8e77411
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
139 additions
and
1 deletions
+139
-1
api/api.ts
+12
-0
pages.json
+9
-0
pages/learningStatistics/learningStatistics.vue
+115
-0
pages/myLearning/myLearning.vue
+3
-1
No files found.
api/api.ts
View file @
475b22f7
...
...
@@ -224,5 +224,17 @@ export default {
// 我的团队
queryMyTeamInfo
(
params
){
return
request
(
`
${
cffpURL
}
/cffp/orgInfo/queryMyTeamInfo`
,
"POST"
,
params
)
},
// 学习统计
userStudyCount
(
params
){
return
request
(
`
${
cffpURL
}
/study/userStudyCount`
,
"POST"
,
params
)
},
// 课程包学习进度明细
userCoursePackBar
(
params
){
return
request
(
`
${
cffpURL
}
/study/userCoursePackBar`
,
"POST"
,
params
)
},
// 学习明细
userStudyTime
(
params
){
return
request
(
`
${
cffpURL
}
/study/userStudyTime`
,
"POST"
,
params
)
}
}
pages.json
View file @
475b22f7
...
...
@@ -357,6 +357,15 @@
}
}
,{
"path"
:
"pages/learningStatistics/learningStatistics"
,
"style"
:
{
"navigationBarTitleText"
:
"学习统计"
,
"enablePullDownRefresh"
:
false
}
}
],
//
"tabBar"
:
{
//
"color"
:
"#7A7E83"
,
//
tab
上的文字默认颜色
...
...
pages/learningStatistics/learningStatistics.vue
0 → 100644
View file @
475b22f7
<
template
>
<view
class=
"container"
>
<view
class=
"dataCountBox"
>
<view
class=
"leftBox"
>
<view>
<text
class=
"count"
>
{{
userStudyCountList
.
studyTimeTotal
}}
</text>
<text>
分钟
</text>
</view>
<view
style=
"margin-top: 16rpx;"
>
累计学习时长
</view>
</view>
<view
class=
"rightBox"
>
<view>
<text
class=
"count"
>
{{
userStudyCountList
.
fileTotal
}}
</text>
<text>
节
</text>
</view>
<view
style=
"margin-top: 16rpx;"
>
累计完成课程
</view>
</view>
</view>
<!-- 总览学习进度 -->
<view
class=
"studyProgressBox"
>
<h4>
总览学习进度
</h4>
</view>
</view>
</
template
>
<
script
>
import
api
from
"@/api/api"
;
export
default
{
data
()
{
return
{
userId
:
'1'
,
userStudyCountList
:{},
userCoursePackBarList
:{},
userStudyTimeList
:{},
packFileId
:
''
,
orderId
:
''
,
month
:
''
};
},
methods
:{
userStudyCount
(){
api
.
userStudyCount
({
userId
:
this
.
userId
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userStudyCountList
=
res
[
'data'
];
}
})
},
userCoursePackBar
(){
api
.
userCoursePackBar
({
userId
:
this
.
userId
,
packFileId
:
this
.
packFileId
,
orderId
:
this
.
orderId
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userCoursePackBarList
=
res
[
'data'
];
}
})
},
userStudyTime
(){
api
.
userStudyTime
({
userId
:
this
.
userId
,
month
:
this
.
month
}).
then
(
res
=>
{
if
(
res
[
'success'
]){
this
.
userStudyTimeList
=
res
[
'data'
];
}
})
}
},
mounted
()
{
this
.
userStudyCount
()
}
}
</
script
>
<
style
lang=
"scss"
>
.container
{
height
:
100%
;
.dataCountBox{
padding
:
30
rpx
0
;
margin
:
10
rpx
20
rpx
;
display
:
flex
;
background-color
:
#fff
;
color
:
#666666
;
.leftBox,.rightBox{
flex
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
.count{
color
:
#0A2F99
;
font-size
:
40
rpx
;
}
}
.leftBox
{
border-right
:
1px
solid
#F4F4F4
;
}
}
.studyProgressBox
{
h4{
position
:
relative
;
font-size
:
36
rpx
;
color
:
#333
;
padding-left
:
50
rpx
;
margin-top
:
10
rpx
;
margin-bottom
:
20
rpx
;
&:before{
content
:
''
;
display
:
block
;
position
:
absolute
;
left
:
30
rpx
;
top
:
10%
;
width
:
6
rpx
;
height
:
70%
;
background-color
:
#FA882F
;
border-radius
:
4
rpx
;
}
}
}
}
</
style
>
pages/myLearning/myLearning.vue
View file @
475b22f7
...
...
@@ -36,7 +36,7 @@
</view>
<view
class=
"learningStatisticsContainer"
v-if=
"tabType===2"
>
<learning-statistics></learning-statistics>
</view>
</view>
</view>
...
...
@@ -45,7 +45,9 @@
<
script
>
import
api
from
"@/api/api"
;
import
dataHandling
from
"@/util/dataHandling"
;
import
learningStatistics
from
"@/pages/learningStatistics/learningStatistics.vue"
;
export
default
{
components
:{
learningStatistics
},
data
()
{
return
{
tabType
:
1
,
...
...
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