Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
84f773f6
Commit
84f773f6
authored
Oct 14, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的学习
parent
eee1f78d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
196 additions
and
42 deletions
+196
-42
mystudy.vue
pages/school/mystudy/mystudy.vue
+196
-42
No files found.
pages/school/mystudy/mystudy.vue
View file @
84f773f6
...
...
@@ -15,6 +15,56 @@
</view>
<view
class=
"arrow"
></view>
</view>
<view
v-if=
"current==0"
class=
"studyBox"
>
<view
class=
"plot"
>
<!-- TODO 图表-->
</view>
<view
class=
"studyB-b"
>
<view
class=
"s-b-time"
>
<view
class=
"s-b-time-i"
style=
"border-right: 1px solid #D8D8D8;"
>
<text>
今日学习
</text>
<view
style=
"display: flex;flex-direction: row;align-items: flex-end;"
>
<text
class=
"time"
>
{{
studyTime
.
ToDayTime
.
Time
?
studyTime
.
ToDayTime
.
Time
:
'0'
}}
</text>
<text
class=
"unit"
>
{{
studyTime
.
ToDayTime
.
Unit
?
studyTime
.
ToDayTime
.
Unit
:
'分钟'
}}
</text>
</view>
</view>
<view
class=
"s-b-time-i"
style=
"border-right: 1px solid #D8D8D8;"
>
<text>
连续学习
</text>
<view
style=
"display: flex;flex-direction: row;align-items: flex-end;"
>
<text
class=
"time"
>
{{
studyTime
.
StydyDay
?
studyTime
.
StydyDay
:
'0'
}}
</text>
<text
class=
"unit"
>
天
</text>
</view>
</view>
<view
class=
"s-b-time-i"
>
<text>
累计学习
</text>
<view
style=
"display: flex;flex-direction: row;align-items: flex-end;"
>
<text
class=
"time"
>
{{
studyTime
.
TotalTime
.
Time
?
studyTime
.
TotalTime
.
Time
:
'0'
}}
</text>
<text
class=
"unit"
>
{{
studyTime
.
TotalTime
.
Unit
?
studyTime
.
TotalTime
.
Unit
:
'分钟'
}}
</text>
</view>
</view>
</view>
<view
class=
"studyB-lately"
>
<text
style=
"font-size: 16px;color: #1B1D1E;"
>
最近学习
</text>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
<text
style=
"font-size: 12px;color: #999999;"
>
更多
</text>
<u-icon
name=
"arrow"
size=
'20'
color=
'#A5A3AB'
></u-icon>
</view>
</view>
</view>
<view
style=
"display: flex;width:100%;flex-direction: row;overflow-x: auto;padding-bottom: 15px;background: #FFF;"
>
<view
class=
"latelybox-item"
v-for=
"(item,index) in RecentStudy"
:key=
"index"
:style=
"
{'margin-right':RecentStudy.length==index+1?'15px':'0'}">
<image
style=
"width: 134px; height: 75px;border-radius: 4px;"
mode=
"aspectFill"
:src=
"item.CarouselImage"
/>
<view
style=
"height: 30px;line-height: 30px;width: 134px;padding: 0 5px;"
>
<text
class=
"name"
>
{{
item
.
GoodsName
}}
</text>
</view>
</view>
</view>
</view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'goback'
></auth>
...
...
@@ -44,7 +94,9 @@
UserId
:
0
,
u
:{},
showAuth
:
false
,
current
:
0
current
:
0
,
studyTime
:{},
RecentStudy
:[],
}
},
components
:
{
...
...
@@ -62,19 +114,7 @@
this
.
paddingHTop
=
this
.
nav
+
'px'
;
this
.
windowWidth
=
this
.
$utils
.
SystemInfo
().
windowWidth
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
...
...
@@ -84,6 +124,8 @@
this
.
showAuth
=
true
;
}
else
{
// this.init();
this
.
getMyStudyTime
()
//我的学习时间
this
.
getMyRecentStudyPageList
()
//最近学习
}
},
methods
:{
...
...
@@ -91,17 +133,48 @@
goback
(){
uni
.
navigateBack
({})
},
scrollHandler
(
e
)
{
this
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
scrollTopHandler
()
{
this
.
scrollTop
=
0
;
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
},
getMyStudyTime
(){
this
.
request2
({
url
:
'/api/AppletEducation/GetMyStudyTime'
,
data
:
{
Day
:
6
}
},
res
=>
{
this
.
studyTime
=
res
.
data
}
);
},
getMyRecentStudyPageList
(){
this
.
request2
({
url
:
'/api/AppletEducation/GetMyRecentStudyPageList'
,
data
:
{
pageIndex
:
1
,
pageSize
:
10
}
},
res
=>
{
this
.
RecentStudy
=
res
.
data
.
pageData
this
.
RecentStudy
=
[{
"GoodsId"
:
367486
,
"GoodsName"
:
"计算机基础 大学英语 1A 大学英语 1B 中国近现代史纲要 高等数学(工) 现在报名超值优惠大礼包等着你~"
,
"CarouselImage"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1601448769000_118.jpg"
},
{
"GoodsId"
:
367485
,
"GoodsName"
:
"大东第一课1"
,
"CarouselImage"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1599208676000_42.jpeg"
},{
"GoodsId"
:
367486
,
"GoodsName"
:
"计算机基础 大学英语 1A 大学英语 1B 中国近现代史纲要 高等数学(工) 现在报名超值优惠大礼包等着你~"
,
"CarouselImage"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1601448769000_118.jpg"
},{
"GoodsId"
:
367486
,
"GoodsName"
:
"计算机基础 大学英语 1A 大学英语 1B 中国近现代史纲要 高等数学(工) 现在报名超值优惠大礼包等着你~"
,
"CarouselImage"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/1601448769000_118.jpg"
},]
}
);
},
change
(
val
){
console
.
log
(
val
)
this
.
current
=
val
...
...
@@ -119,25 +192,106 @@
background
:
#FAF8F9
;
}
.mystudy
.headStatus
{
overflow
:
hidden
;
position
:
relative
;
width
:
140vw
;
padding-right
:
40vw
;
padding-bottom
:
10px
;
position
:
fixed
;
left
:
0
;
right
:
0
;
top
:
0
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#FFF
;
}
.mystudy
.arrow
{
height
:
24px
;
margin
:
5px
;
width
:
24px
;
}
overflow
:
hidden
;
position
:
relative
;
width
:
140vw
;
padding-right
:
40vw
;
padding-bottom
:
10px
;
position
:
fixed
;
left
:
0
;
right
:
0
;
top
:
0
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#FFF
;
}
.mystudy
.arrow
{
height
:
24px
;
margin
:
5px
;
width
:
24px
;
}
.mystudy
.studyBox
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.mystudy
.plot
{
width
:
100%
;
height
:
160px
;
}
.mystudy
.studyB-b
{
width
:
100%
;
padding
:
15px
;
background
:
#FFF
;
border-top-left-radius
:
30px
;
border-top-right-radius
:
30px
;
}
.mystudy
.s-b-time
{
width
:
100%
;
height
:
102px
;
border-radius
:
10px
;
background
:
#F5F5F7
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
20px
0
;
}
.mystudy
.s-b-time-i
{
width
:
33.2%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
font-size
:
13px
;
color
:
#111111
;
padding-left
:
20px
;
}
.mystudy
.s-b-time-i
.time
{
font-size
:
28px
;
color
:
#111111
;
font-weight
:
500
;
}
.mystudy
.s-b-time-i
.unit
{
font-size
:
12px
;
color
:
#999999
;
margin-bottom
:
3px
;
}
.mystudy
.studyB-lately
{
width
:
100%
;
height
:
40px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
.mystudy
.latelybox
{
overflow-x
:
auto
!important
;
display
:
flex
;
padding
:
10px
0
;
}
.mystudy
.latelybox-item
{
height
:
106px
;
position
:
relative
;
box-shadow
:
0
4px
10px
1px
#D2D2D2
;
margin-left
:
15px
;
border-radius
:
6px
;
overflow
:
hidden
;
flex-shrink
:
0
}
.mystudy
.latelybox-item
.name
{
font-size
:
12px
;
color
:
#1B1D1E
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
}
</
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