Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
87ea7956
Commit
87ea7956
authored
Dec 30, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c1fa6358
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
34 deletions
+44
-34
teachremind.js
business/pages/classservice/teachremind.js
+7
-19
teachremind.wxml
business/pages/classservice/teachremind.wxml
+1
-1
teachremind.wxss
business/pages/classservice/teachremind.wxss
+20
-1
landpage.js
src/pages/myschedule/landpage.js
+4
-12
landpage.wxml
src/pages/myschedule/landpage.wxml
+1
-1
landpage.wxss
src/pages/myschedule/landpage.wxss
+11
-0
No files found.
business/pages/classservice/teachremind.js
View file @
87ea7956
...
...
@@ -132,26 +132,14 @@ Page({
code
,
data
}
=
res
;
const
{
start_time
,
end_time
}
=
data
;
const
startDate
=
start_time
.
split
(
' '
)[
0
];
const
endDate
=
end_time
.
split
(
' '
)[
0
];
const
starttime
=
start_time
.
split
(
' '
)[
1
];
const
endtime
=
end_time
.
split
(
' '
)[
1
];
const
week
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
data
.
showTime
=
{
year
:
Number
(
startDate
.
split
(
'-'
)[
0
]),
month
:
Number
(
startDate
.
split
(
'-'
)[
1
]),
day
:
Number
(
startDate
.
split
(
'-'
)[
2
]),
week
:
week
[
new
Date
(
startDate
).
getDay
()],
starttime
:
starttime
.
slice
(
0
,
5
),
endtime
:
starttime
.
slice
(
0
,
5
),
if
(
code
==
200
){
const
startDate
=
data
.
start_time
.
split
(
' '
)[
0
];
const
week
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
data
.
showWeek
=
week
[
new
Date
(
startDate
).
getDay
()]
this
.
setData
({
schedulesDetail
:
data
})
}
this
.
setData
({
schedulesDetail
:
data
})
}).
catch
((
res
)
=>
{
})
},
...
...
business/pages/classservice/teachremind.wxml
View file @
87ea7956
...
...
@@ -3,7 +3,7 @@
<view class="schedules-info">
<view class="header-box">
<view class="header-title">上课时间</view>
<view class="time-box">
周{{schedulesDetail.showTime.week}} {{schedulesDetail.showTime.year}}年{{schedulesDetail.showTime.month}}月{{schedulesDetail.showTime.day}}日
</view>
<view class="time-box">
<text>周{{schedulesDetail.showWeek}}</text>{{schedulesDetail.start_time&&filter.matchTime(schedulesDetail.start_time,'month')}}{{schedulesDetail.start_time&&filter.matchTime(schedulesDetail.start_time,'hour')}}-{{schedulesDetail.end_time&&filter.matchTime(schedulesDetail.end_time,'hour')}}
</view>
</view>
<view class="content-box">
<view class="list-item">
...
...
business/pages/classservice/teachremind.wxss
View file @
87ea7956
...
...
@@ -24,12 +24,31 @@ page{
}
.schedules-info .header-box .time-box{
font-size:36rpx;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
line-height:1;
text-align: center;
padding: 30rpx 0 42rpx 0;
display: flex;
align-items: center;
justify-content: center;
}
.schedules-info .header-box .time-box text{
padding-right: 24rpx;
font-size: 36rpx;
color: #000;
font-weight: bold;
position: relative;
}
.schedules-info .header-box .time-box text::after{
content: '';
width: 1px;
height: 30rpx;
background: rgba(0,0,0,.5);
position: absolute;
top: 50%;
right: 12rpx;
transform: translateY(-50%);
}
.schedules-info .content-box{
padding: 8rpx 36rpx 32rpx 36rpx;
...
...
src/pages/myschedule/landpage.js
View file @
87ea7956
...
...
@@ -108,20 +108,12 @@ Page({
if
(
code
!=
200
)
{
// 失败的处理
}
else
{
const
{
start_time
}
=
data
;
const
startDate
=
start_time
.
split
(
' '
)[
0
];
const
startDate
=
data
.
start_time
.
split
(
' '
)[
0
];
const
week
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
data
.
showTime
=
{
year
:
Number
(
startDate
.
split
(
'-'
)[
0
]),
month
:
Number
(
startDate
.
split
(
'-'
)[
1
]),
day
:
Number
(
startDate
.
split
(
'-'
)[
2
]),
week
:
week
[
new
Date
(
startDate
).
getDay
()],
// starttime: starttime.slice(0, 5),
// endtime: starttime.slice(0, 5),
}
data
.
showWeek
=
week
[
new
Date
(
startDate
).
getDay
()]
this
.
setData
({
courseDetail
:
res
.
data
,
nowDate
:
res
.
datetime
courseDetail
:
data
,
//
nowDate: res.datetime
})
}
}).
catch
((
e
)
=>
{
...
...
src/pages/myschedule/landpage.wxml
View file @
87ea7956
...
...
@@ -4,7 +4,7 @@
<view class="schedule-detail">
<view class="time-box">
<view class="label">上课时间</view>
<view class="time"><text>周{{courseDetail.show
Time.week}}</text> {{courseDetail.showTime.year}}年{{courseDetail.showTime.month}}月{{courseDetail.showTime.day}}日
</view>
<view class="time"><text>周{{courseDetail.show
Week}}</text>{{courseDetail.start_time&&filter.matchTime(courseDetail.start_time,'month')}}{{courseDetail.start_time&&filter.matchTime(courseDetail.start_time,'hour')}}-{{courseDetail.end_time&&filter.matchTime(courseDetail.end_time,'hour')}}
</view>
</view>
<view class="item-box">
<view class="line-item">
...
...
src/pages/myschedule/landpage.wxss
View file @
87ea7956
...
...
@@ -43,6 +43,17 @@ page{
font-size: 36rpx;
color: #000;
font-weight: bold;
position: relative;
}
.schedule-detail .time-box .time text::after{
content: '';
width: 1px;
height: 30rpx;
background: rgba(0,0,0,.5);
position: absolute;
top: 50%;
right: 12rpx;
transform: translateY(-50%);
}
.schedule-detail .item-box{
padding: 22rpx 26rpx 18rpx;
...
...
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