Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wandouchengzhang_coach
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
石盼盼
wandouchengzhang_coach
Commits
cbe0bc4e
Commit
cbe0bc4e
authored
Nov 28, 2020
by
吴颖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'修改测试问题'
parent
5264b659
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
221 additions
and
238 deletions
+221
-238
app.js
app.js
+1
-0
badgelist.wxss
pages/index/badgelist/badgelist.wxss
+5
-9
classDetail.js
pages/index/classDetail/classDetail.js
+0
-3
classManagement.js
pages/index/classManagement/classManagement.js
+4
-6
courseInstant.js
pages/index/courseInstant/courseInstant.js
+11
-2
courseInstant.json
pages/index/courseInstant/courseInstant.json
+3
-1
courseInstant.wxml
pages/index/courseInstant/courseInstant.wxml
+11
-6
courseInstant.wxss
pages/index/courseInstant/courseInstant.wxss
+9
-0
evaluation.js
pages/index/evaluation/evaluation.js
+0
-1
performance.js
pages/index/performance/performance.js
+35
-37
performance.wxml
pages/index/performance/performance.wxml
+1
-1
performance.wxss
pages/index/performance/performance.wxss
+1
-0
class.js
pages/tabbar/class/class.js
+116
-110
index.js
pages/tabbar/index/index.js
+19
-40
index.wxml
pages/tabbar/index/index.wxml
+4
-21
index.wxss
pages/tabbar/index/index.wxss
+1
-1
No files found.
app.js
View file @
cbe0bc4e
...
@@ -136,5 +136,6 @@ App({
...
@@ -136,5 +136,6 @@ App({
token
:
''
,
token
:
''
,
backurl
:
''
,
// 全局跳转页面路径
backurl
:
''
,
// 全局跳转页面路径
coach_id
:
''
,
// 教练id
coach_id
:
''
,
// 教练id
classRush
:
false
// 抢班是否成功
}
}
})
})
\ No newline at end of file
pages/index/badgelist/badgelist.wxss
View file @
cbe0bc4e
...
@@ -40,18 +40,14 @@ page{
...
@@ -40,18 +40,14 @@ page{
background: #fff;
background: #fff;
border-radius: 15rpx;
border-radius: 15rpx;
}
}
.imgbox view{
margin-left:26rpx;
}
.bigimg {
.bigimg {
width: 1
5
0rpx;
width: 1
8
0rpx;
height: 1
5
0rpx;
height: 1
8
0rpx;
border-radius: 50%;
border-radius: 50%;
margin: 0 28rpx 50rpx 28rpx;
margin: 0 25rpx 50rpx 25rpx;
}
.bigimg:nth-child(3n-1) {
margin: 0 64rpx 50rpx 64rpx;
}
}
/* 按钮样式 */
/* 按钮样式 */
.button{
.button{
width: 750rpx;
width: 750rpx;
...
...
pages/index/classDetail/classDetail.js
View file @
cbe0bc4e
...
@@ -21,10 +21,7 @@ Page({
...
@@ -21,10 +21,7 @@ Page({
coach_id
:
app
.
globalData
.
coach_id
,
coach_id
:
app
.
globalData
.
coach_id
,
class_id
:
options
.
class_id
,
class_id
:
options
.
class_id
,
lesson_id
:
options
.
lesson_id
,
lesson_id
:
options
.
lesson_id
,
})
})
console
.
log
(
options
.
lesson_id
)
console
.
log
(
options
.
class_id
)
this
.
getlessondetail
()
this
.
getlessondetail
()
},
},
...
...
pages/index/classManagement/classManagement.js
View file @
cbe0bc4e
...
@@ -51,12 +51,10 @@ Page({
...
@@ -51,12 +51,10 @@ Page({
}
}
},
},
getDate
()
{
getDate
()
{
let
date
=
util
.
formatTime
(
new
Date
())
let
curTime
=
new
Date
().
getTime
()
let
newDate
=
new
Date
()
let
str
=
this
.
data
.
courseTime
.
split
(
'
'
)[
0
]
+
'
'
+
this
.
data
.
courseTime
.
split
(
'
~
'
)[
1
]
const
hour
=
newDate
.
getHours
()
let
courseTime
=
new
Date
(
str
).
getTime
()
const
minute
=
newDate
.
getMinutes
()
if
(
curTime
>
courseTime
)
{
let
time
=
date
+
'
'
+
hour
+
'
:
'
+
minute
if
(
time
>
this
.
data
.
courseTime
)
{
this
.
setData
({
this
.
setData
({
isMoment
:
true
isMoment
:
true
})
})
...
...
pages/index/courseInstant/courseInstant.js
View file @
cbe0bc4e
...
@@ -14,6 +14,8 @@ Page({
...
@@ -14,6 +14,8 @@ Page({
imgBox
:
[],
imgBox
:
[],
imgShow
:
true
,
imgShow
:
true
,
fileList
:
[],
fileList
:
[],
show
:
false
,
autoplay
:
false
},
},
/**
/**
...
@@ -35,7 +37,6 @@ Page({
...
@@ -35,7 +37,6 @@ Page({
lesson_id
:
this
.
data
.
lesson_id
lesson_id
:
this
.
data
.
lesson_id
},
},
callback
:(
data
)
=>
{
callback
:(
data
)
=>
{
console
.
log
(
data
.
class_moment
)
if
(
data
.
class_moment
!=
null
)
{
if
(
data
.
class_moment
!=
null
)
{
let
class_moment
=
JSON
.
parse
(
data
.
class_moment
)
let
class_moment
=
JSON
.
parse
(
data
.
class_moment
)
let
arr1
=
[],
arr2
=
[]
let
arr1
=
[],
arr2
=
[]
...
@@ -180,6 +181,14 @@ Page({
...
@@ -180,6 +181,14 @@ Page({
},
},
paly
()
{
// 播放视频
paly
()
{
// 播放视频
this
.
setData
({
autoplay
:
true
,
show
:
true
,
})
},
onClose
()
{
this
.
setData
({
show
:
false
})
}
}
})
})
\ No newline at end of file
pages/index/courseInstant/courseInstant.json
View file @
cbe0bc4e
{
{
"usingComponents"
:
{},
"usingComponents"
:
{
"van-popup"
:
"/components/vant/popup/index"
},
"navigationBarTitleText"
:
"课程瞬间"
"navigationBarTitleText"
:
"课程瞬间"
}
}
\ No newline at end of file
pages/index/courseInstant/courseInstant.wxml
View file @
cbe0bc4e
<view wx:if="{{type
!
= 'check'}}">
<view wx:if="{{type
=
= 'check'}}">
<view class="video">
<view class="video">
<view class="head">
<view class="head">
<text class="title">运动工程</text>
<text class="title">运动工程</text>
</view>
</view>
<view class="imgBox flex-h">
<view class="imgBox flex-h">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<video src="{{item.url}}" data-index="{{index}}" bindplay='paly'></video>
<video src="{{item.url}}" data-index="{{index}}" bindplay='paly'
wx:if="{{!show}}"
></video>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
</view>
</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose">
<view class="showVideo">
<video src="{{videoBox[0].url}}"></video>
</view>
</van-popup>
</view>
</view>
<view wx:else>
<view wx:else>
<view class="video">
<view class="video">
...
@@ -29,7 +34,7 @@
...
@@ -29,7 +34,7 @@
<view class="imgBox flex-h">
<view class="imgBox flex-h">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<video src="{{item.url}}" data-index="{{index}}"></video>
<video src="{{item.url}}" data-index="{{index}}"></video>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteVideo"
wx:if="{{type != 'check'}}"
>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteVideo">
<text class='iconfont iconguanbi'></text>
<text class='iconfont iconguanbi'></text>
</view>
</view>
</view>
</view>
...
@@ -46,17 +51,17 @@
...
@@ -46,17 +51,17 @@
<view class="imgBox flex-h flex-hw">
<view class="imgBox flex-h flex-hw">
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx">
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx">
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteImg"
wx:if="{{type != 'check'}}"
>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteImg">
<text class='iconfont iconguanbi'></text>
<text class='iconfont iconguanbi'></text>
</view>
</view>
</view>
</view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseImg"
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseImg"
wx:if="{{imgBox.length < 9
&& type != 'check'
}}">
wx:if="{{imgBox.length < 9}}">
<text class='iconfont iconxiangji'></text>
<text class='iconfont iconxiangji'></text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="button"
wx:if="{{type != 'check'}}"
>
<view class="button">
<view class="submit" catchtap="save">提交</view>
<view class="submit" catchtap="save">提交</view>
</view>
</view>
...
...
pages/index/courseInstant/courseInstant.wxss
View file @
cbe0bc4e
...
@@ -88,3 +88,12 @@ page {
...
@@ -88,3 +88,12 @@ page {
text-align: center;
text-align: center;
line-height: 80rpx;
line-height: 80rpx;
}
}
.showVideo {
width: 6400rpx;
height: 430rpx;
}
.showVideo video {
width: 100%;
height: 100%;
}
\ No newline at end of file
pages/index/evaluation/evaluation.js
View file @
cbe0bc4e
...
@@ -64,7 +64,6 @@ Page({
...
@@ -64,7 +64,6 @@ Page({
deleteBadge
:
function
(
e
)
{
deleteBadge
:
function
(
e
)
{
var
imgs
=
this
.
data
.
imgBox
var
imgs
=
this
.
data
.
imgBox
var
index
=
e
.
currentTarget
.
dataset
.
index
var
index
=
e
.
currentTarget
.
dataset
.
index
// console.log(index)
imgs
.
splice
(
index
,
1
)
imgs
.
splice
(
index
,
1
)
this
.
setData
({
this
.
setData
({
imgBox
:
imgs
imgBox
:
imgs
...
...
pages/index/performance/performance.js
View file @
cbe0bc4e
...
@@ -17,10 +17,12 @@ Page({
...
@@ -17,10 +17,12 @@ Page({
lesson_id
:
''
,
lesson_id
:
''
,
child_id
:
''
,
child_id
:
''
,
class_single_id
:
''
,
class_single_id
:
''
,
ec
:
null
,
ec
:
{
lazyLoad
:
true
// 延迟加载
},
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
init
()
this
.
setData
({
this
.
setData
({
coach_id
:
app
.
globalData
.
coach_id
,
coach_id
:
app
.
globalData
.
coach_id
,
class_id
:
options
.
class_id
,
class_id
:
options
.
class_id
,
...
@@ -31,33 +33,6 @@ Page({
...
@@ -31,33 +33,6 @@ Page({
this
.
getcomment
()
this
.
getcomment
()
this
.
getbadges
()
this
.
getbadges
()
},
},
init
()
{
const
getPixelRatio
=
()
=>
{
let
pixelRatio
=
0
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
pixelRatio
=
res
.
pixelRatio
},
fail
:
function
()
{
pixelRatio
=
0
}
})
return
pixelRatio
}
var
dpr
=
getPixelRatio
()
this
.
setData
({
ec
:
{
onInit
:
function
(
canvas
,
width
,
height
)
{
chartLine
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
dpr
});
canvas
.
setChart
(
chartLine
);
}
}
})
},
getcomment
:
function
()
{
getcomment
:
function
()
{
let
params
=
{
let
params
=
{
url
:
'
coach/comment
'
,
url
:
'
coach/comment
'
,
...
@@ -84,13 +59,37 @@ Page({
...
@@ -84,13 +59,37 @@ Page({
arrs
.
push
(
option
)
arrs
.
push
(
option
)
newArrs
.
push
(
this
.
data
.
scoreList
[
i
].
score
)
newArrs
.
push
(
this
.
data
.
scoreList
[
i
].
score
)
}
}
this
.
getOption
(
arrs
,
newArrs
)
this
.
initCharts
(
arrs
,
newArrs
)
}
}
},
},
}
}
base
.
newRequest
(
params
)
base
.
newRequest
(
params
)
},
},
initCharts
(
arrs
,
newArrs
)
{
var
that
=
this
const
getPixelRatio
=
()
=>
{
let
pixelRatio
=
0
wx
.
getSystemInfo
({
success
:
function
(
res
)
{
pixelRatio
=
res
.
pixelRatio
},
fail
:
function
()
{
pixelRatio
=
0
}
})
return
pixelRatio
}
that
.
selectComponent
(
'
#mychart
'
).
init
((
canvas
,
width
,
height
)
=>
{
var
chart
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
getPixelRatio
()
});
chart
.
setOption
(
that
.
getOption
(
arrs
,
newArrs
));
return
chart
;
})
},
getOption
(
xData
,
data_cur
)
{
getOption
(
xData
,
data_cur
)
{
var
option
=
{
var
option
=
{
backgroundColor
:
"
#ffffff
"
,
backgroundColor
:
"
#ffffff
"
,
...
@@ -102,7 +101,7 @@ Page({
...
@@ -102,7 +101,7 @@ Page({
show
:
false
show
:
false
},
},
radar
:
{
radar
:
{
radius
:
9
0
,
radius
:
9
4
,
center
:
[
'
50%
'
,
'
50%
'
],
center
:
[
'
50%
'
,
'
50%
'
],
shape
:
'
circle
'
,
shape
:
'
circle
'
,
splitNumber
:
4
,
// 分割段数
splitNumber
:
4
,
// 分割段数
...
@@ -157,8 +156,7 @@ Page({
...
@@ -157,8 +156,7 @@ Page({
y
:
0
,
y
:
0
,
x2
:
0
,
x2
:
0
,
y2
:
1
,
y2
:
1
,
colorStops
:
[
colorStops
:
[{
{
offset
:
0
,
offset
:
0
,
color
:
'
#00E24A
'
color
:
'
#00E24A
'
},
},
...
@@ -172,7 +170,7 @@ Page({
...
@@ -172,7 +170,7 @@ Page({
}]
}]
};
};
chartLine
.
setOption
(
option
);
return
option
},
},
getbadges
:
function
()
{
getbadges
:
function
()
{
let
params
=
{
let
params
=
{
...
...
pages/index/performance/performance.wxml
View file @
cbe0bc4e
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<view class="flex-h flex-vc">
<view class="flex-h flex-vc">
<view class="teacher_left flex-v flex-hc">
<view class="teacher_left flex-v flex-hc">
<image src="/images/default_head.png" wx:if="{{coach.thumb == null}}"></image>
<image src="/images/default_head.png" wx:if="{{coach.thumb == null}}"></image>
<image src="{{coach.thumb}}" wx:else></image>
<image src="{{coach.thumb}}" wx:else
mode="aspectFill"
></image>
<text class="name">{{coach.title}}</text>
<text class="name">{{coach.title}}</text>
</view>
</view>
<view class="teacher_right">{{coachcomment.class_comment}}</view>
<view class="teacher_right">{{coachcomment.class_comment}}</view>
...
...
pages/index/performance/performance.wxss
View file @
cbe0bc4e
...
@@ -51,6 +51,7 @@ page {
...
@@ -51,6 +51,7 @@ page {
margin: 40rpx auto;
margin: 40rpx auto;
}
}
.teacher_left{
.teacher_left{
width: 80rpx;
font-size: 24rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-family: PingFang SC;
font-weight: 500;
font-weight: 500;
...
...
pages/tabbar/class/class.js
View file @
cbe0bc4e
...
@@ -34,7 +34,6 @@ Page({
...
@@ -34,7 +34,6 @@ Page({
coach_id
:
this
.
data
.
coach_id
coach_id
:
this
.
data
.
coach_id
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
console
.
log
(
data
)
wx
.
hideLoading
();
wx
.
hideLoading
();
this
.
setData
({
this
.
setData
({
datalList
:
data
,
datalList
:
data
,
...
@@ -75,12 +74,17 @@ Page({
...
@@ -75,12 +74,17 @@ Page({
class_id
:
class_id
class_id
:
class_id
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
app
.
globalData
.
classRush
=
true
base
.
toast
(
'
抢班成功
'
)
base
.
toast
(
'
抢班成功
'
)
this
.
setData
({
this
.
setData
({
datalList
:
[]
datalList
:
[],
classList
:
[],
})
})
this
.
getList
()
this
.
getList
()
this
.
getMyclasslist
()
},
confirmback
:()
=>
{
app
.
globalData
.
classRush
=
false
}
}
}
}
base
.
newRequest
(
params
)
base
.
newRequest
(
params
)
...
@@ -102,6 +106,7 @@ Page({
...
@@ -102,6 +106,7 @@ Page({
initData
:
function
()
{
initData
:
function
()
{
this
.
setData
({
this
.
setData
({
datalList
:
[],
datalList
:
[],
classList
:
[],
locked
:
false
locked
:
false
})
})
},
},
...
@@ -111,7 +116,8 @@ Page({
...
@@ -111,7 +116,8 @@ Page({
this
.
setData
({
this
.
setData
({
locked
:
true
locked
:
true
})
})
this
.
onLoad
();
this
.
getList
()
this
.
getMyclasslist
();
}
}
wx
.
stopPullDownRefresh
()
wx
.
stopPullDownRefresh
()
},
},
...
...
pages/tabbar/index/index.js
View file @
cbe0bc4e
...
@@ -11,10 +11,11 @@ Page({
...
@@ -11,10 +11,11 @@ Page({
*/
*/
data
:
{
data
:
{
coach_id
:
''
,
coach_id
:
''
,
// isOpen: false,
daysColor
:
[],
daysColor
:
[],
today
:
''
,
// 今天日期
today
:
''
,
// 今天日期
curDate
:
''
,
curTime
:
''
,
// 选中日期 与curDate格式不同返回格式是毫秒级
curDate
:
''
,
// 选中日期
list
:
[],
list
:
[],
allList
:
[],
allList
:
[],
month
:
''
,
month
:
''
,
...
@@ -43,13 +44,22 @@ Page({
...
@@ -43,13 +44,22 @@ Page({
let
month
=
util
.
formatNumber
(
new
Date
().
getMonth
()
+
1
)
let
month
=
util
.
formatNumber
(
new
Date
().
getMonth
()
+
1
)
this
.
setData
({
this
.
setData
({
coach_id
:
app
.
globalData
.
coach_id
,
coach_id
:
app
.
globalData
.
coach_id
,
today
:
util
.
formatTime
(
new
Date
()),
today
:
new
Date
(
util
.
formatTime
(
new
Date
())).
getTime
(),
curTime
:
new
Date
(
util
.
formatTime
(
new
Date
())).
getTime
(),
curDate
:
util
.
formatTime
(
new
Date
()),
curDate
:
util
.
formatTime
(
new
Date
()),
month
:
year
+
month
month
:
year
+
month
})
})
this
.
getAllList
()
this
.
getAllList
()
this
.
getList
()
this
.
getList
()
},
},
onShow
()
{
if
(
app
.
globalData
.
classRush
)
{
// 抢班成功之后刷新当前页面
this
.
initData
()
this
.
getAllList
()
this
.
getList
()
app
.
globalData
.
classRush
=
false
}
},
getAllList
()
{
getAllList
()
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'
加载中...
'
,
title
:
'
加载中...
'
,
...
@@ -82,6 +92,8 @@ Page({
...
@@ -82,6 +92,8 @@ Page({
list
:
data
,
list
:
data
,
locked
:
false
locked
:
false
})
})
console
.
log
(
this
.
data
.
list
)
}
}
}
}
base
.
newRequest
(
params
)
base
.
newRequest
(
params
)
...
@@ -109,14 +121,15 @@ Page({
...
@@ -109,14 +121,15 @@ Page({
class
:
'
circle_data
'
class
:
'
circle_data
'
})
})
})
})
// const calendar = this.selectComponent('#calendar').calendar;
calendar
.
setDateStyle
(
daysColor
)
calendar
.
setDateStyle
(
daysColor
)
},
},
afterTapDate
(
e
)
{
afterTapDate
(
e
)
{
const
calendar
=
this
.
selectComponent
(
'
#calendar
'
).
calendar
const
calendar
=
this
.
selectComponent
(
'
#calendar
'
).
calendar
calendar
.
cancelSelectedDates
()
calendar
.
cancelSelectedDates
()
this
.
setData
({
this
.
setData
({
curDate
:
e
.
detail
.
year
+
'
-
'
+
util
.
formatNumber
(
e
.
detail
.
month
)
+
'
-
'
+
util
.
formatNumber
(
e
.
detail
.
date
)
curDate
:
e
.
detail
.
year
+
'
-
'
+
util
.
formatNumber
(
e
.
detail
.
month
)
+
'
-
'
+
util
.
formatNumber
(
e
.
detail
.
date
),
today
:
new
Date
(
util
.
formatTime
(
new
Date
())).
getTime
(),
curTime
:
new
Date
(
e
.
detail
.
year
+
'
-
'
+
util
.
formatNumber
(
e
.
detail
.
month
)
+
'
-
'
+
util
.
formatNumber
(
e
.
detail
.
date
)).
getTime
(),
})
})
const
toSet
=
[
const
toSet
=
[
{
{
...
@@ -130,7 +143,7 @@ Page({
...
@@ -130,7 +143,7 @@ Page({
if
(
!
this
.
data
.
locked
)
{
if
(
!
this
.
data
.
locked
)
{
this
.
setData
({
this
.
setData
({
locked
:
true
,
locked
:
true
,
courseL
ist
:
[],
l
ist
:
[],
})
})
this
.
getList
();
this
.
getList
();
}
}
...
@@ -142,34 +155,6 @@ Page({
...
@@ -142,34 +155,6 @@ Page({
})
})
this
.
getAllList
();
this
.
getAllList
();
},
},
// prev: function (event) {
// let currentMonth = util.formatNumber(event.detail.currentMonth)
// this.setData({
// month: event.detail.currentYear + currentMonth
// })
// this.getAllList();
// },
// next: function (event) {
// let currentMonth = util.formatNumber(event.detail.currentMonth)
// this.setData({
// month: event.detail.currentYear + currentMonth
// })
// this.getAllList();
// },
// dayClick: function (event) {
// console.log(event)
// this.setData({
// curDate: event.detail.year + '-' + util.formatNumber(event.detail.month) + '-' + util.formatNumber(event.detail.day)
// })
// if (!this.data.locked) {
// this.setData({
// locked: true,
// courseList: [],
// })
// this.getList();
// }
// },
onChange
(
e
)
{
onChange
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
let
index
=
e
.
currentTarget
.
dataset
.
index
let
list
=
this
.
data
.
classlist
let
list
=
this
.
data
.
classlist
...
@@ -186,12 +171,6 @@ Page({
...
@@ -186,12 +171,6 @@ Page({
})
})
}
}
},
},
// 日历展开与否
// open() {
// this.setData({
// isOpen: !this.data.isOpen
// })
// },
goclassManagement
:
function
(
e
)
{
goclassManagement
:
function
(
e
)
{
let
item
=
e
.
currentTarget
.
dataset
.
item
let
item
=
e
.
currentTarget
.
dataset
.
item
let
classTime
=
this
.
data
.
curDate
+
'
'
+
item
.
start_time
+
'
~
'
+
item
.
end_time
let
classTime
=
this
.
data
.
curDate
+
'
'
+
item
.
start_time
+
'
~
'
+
item
.
end_time
...
...
pages/tabbar/index/index.wxml
View file @
cbe0bc4e
...
@@ -9,38 +9,21 @@
...
@@ -9,38 +9,21 @@
bind:whenChangeMonth="whenChangeMonth"
bind:whenChangeMonth="whenChangeMonth"
/>
/>
</view>
</view>
<!-- <view class="riliShow">
</view>
<view class="flex-h flex-vc flex-hc" catchtap="open">
<text>{{isOpen ? '收起':'更多日期'}}</text>
<text class="iconfont icongengduo {{isOpen ? 'up': 'down'}}"></text>
</view>
</view> -->
</view>
<wxs module="util">
var time = function() {
var hour = getDate().getHours()
var minute = getDate().getMinutes()
var time = hour + ':' + minute
return time
}
module.exports = {
time: time
}
</wxs>
<view wx:if='{{list.length > 0}}'>
<view wx:if='{{list.length > 0}}'>
<block wx:for="{{list}}" wx:key='index' >
<block wx:for="{{list}}" wx:key='index' >
<view class="cont flex-v flex-hb" catchtap="goclassDetail">
<view class="cont flex-v flex-hb" catchtap="goclassDetail">
<view class="top flex-h flex-vc flex-hb">
<view class="top flex-h flex-vc flex-hb">
<view class="time_title">{{item.course.name}}</view>
<view class="time_title">{{item.course.name}}</view>
<view wx:if='{{today != cur
Dat
e}}'>
<view wx:if='{{today != cur
Tim
e}}'>
<view class="over" wx:if="{{item.class_status_display == '已结束'}}">{{item.class_status_display}}</view>
<view class="over" wx:if="{{item.class_status_display == '已结束'}}">{{item.class_status_display}}</view>
<view class="state" wx:if="{{item.class_status_display == '即将开课'}}">{{item.class_status_display}}</view>
<view class="state" wx:if="{{item.class_status_display == '即将开课'}}">{{item.class_status_display}}</view>
</view>
</view>
<view wx:else>
<view wx:else>
<view class="state" wx:if='{{
util.time() < item.start_time
}}'>即将开课</view>
<view class="state" wx:if='{{
item.time_status == 1
}}'>即将开课</view>
<view class="inclass" wx:
if='{{util.time() > item.start_time && util.time()< item.end_time
}}'>开课中</view>
<view class="inclass" wx:
elif='{{ item.time_status == 2
}}'>开课中</view>
<view class="over" wx:
if='{{util.time() > item.end_time
}}'>已结束</view>
<view class="over" wx:
elif='{{item.time_status == 3
}}'>已结束</view>
</view>
</view>
</view>
</view>
<view class="time">上课时间:{{item.class_date}} {{item.start_time}}-{{item.end_time}} </view>
<view class="time">上课时间:{{item.class_date}} {{item.start_time}}-{{item.end_time}} </view>
...
...
pages/tabbar/index/index.wxss
View file @
cbe0bc4e
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
}
}
/* 已结束样式 */
/* 已结束样式 */
.over{
.over{
color: #B3B3B3;
color: #B3B3B3
!important
;
font-size: 24rpx;
font-size: 24rpx;
}
}
.cont .time{
.cont .time{
...
...
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