Commit 77e3bd2b authored by 石盼盼's avatar 石盼盼

Merge branch 'shipanpan' into 'master'

已上课时样式修改,接口对接,运动评价徽章接口对接

See merge request !9
parents e279a0a4 915dab03
......@@ -10,7 +10,7 @@ Page({
},
onLoad: function (options) {
console.log(options)
console.log(options.lesson_id)
this.getlessondetail()
},
......@@ -35,9 +35,11 @@ Page({
base.newRequest(params)
},
goperformance:function(){
goperformance:function(e){
var child_id = e.currentTarget.dataset.id
console.log(child_id)
wx.navigateTo({
url: '../../index/performance/performance',
url: '../../index/performance/performance?child_id=' + child_id,
})
},
gocourseinstant: function () {
......
......@@ -24,7 +24,7 @@
</view>
</view>
<view class="status">
<view class="evaluation" catchtap="goperformance" wx:if="{{item.is_leave == 0}}">运动评价</view>
<view class="evaluation" data-id="{{item.id}}" catchtap="goperformance" wx:if="{{item.is_leave == 0}}">运动评价</view>
<view class="leave" wx:else>已请假</view>
<view class="unread" wx:if="{{ !item.class_moment }}"></view>
</view>
......
......@@ -8,33 +8,20 @@ Page({
windowWidth: '',
windowHeight: '',
coach : '',
scoreList: '',
coachcomment:'',
awardList: [
{
src:'/images/my/per_pic_02.png'
},
{
src:'/images/my/per_pic_02.png'
},
{
src:'/images/my/per_pic_02.png'
},
{
src:'/images/my/per_pic_02.png'
},
{
src:'/images/my/per_pic_02.png'
}
]
awardList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options.child_id)
this.getRpx()
this.getCharts()
this.getcomment()
this.getbadges()
},
getRpx() {
var res = wx.getSystemInfoSync(); //试图获取屏幕宽高数据
......@@ -50,7 +37,7 @@ Page({
categories: ['耐力', '体力', '柔韧度', '训练完整度', '运动量' ],
series: [{
name: '运动表现',
data: [90, 110, 125, 95, 87]
data: [90, 110, 125, 95, 87],
}],
width: this.data.windowWidth,
height: this.data.windowHeight,
......@@ -75,10 +62,29 @@ Page({
console.log(data)
this.setData({
coach : data.coach,
coachcomment : data
coachcomment : data,
scoreList : data.comment_score,
})
}
}
base.newRequest(params)
},
getbadges : function () {
const { user_child_id,class_id,class_single_id } = this.data
let params = {
url: 'badges',
data : {
user_child_id,
class_id,
class_single_id
},
callback : (data) =>{
console.log(data)
this.setData({
})
}
}
base.newRequest(params)
}
})
\ No newline at end of file
......@@ -20,8 +20,9 @@
<view class="parents">
<view class="title">家长回复</view>
<view class="flex-h">
<image src="{{coachcomment.child.wx_user.avatarurl}}"></image>
<text class="name">{{coachcomment.child.wx_user.nickname}}</text>
<image src="/images/default_head.png" wx:if="{{coachcomment.child.wx_user.avatarurl == null}}"></image>
<image src="{{coachcomment.child.wx_user.avatarurl}}" wx:else></image>
<text class="name">{{coachcomment.child.wx_user.nickname ? 'coachcomment.child.wx_user.nickname' : '家长名字'}}</text>
</view>
<view class="comments">{{coachcomment.comment_reply}}</view>
</view>
......
......@@ -87,6 +87,7 @@ page {
width: 80rpx;
height: 80rpx;
margin-right: 22rpx;
border-radius: 50%;
}
.parents .name{
color: #1A1A1A;
......
......@@ -25,7 +25,7 @@ Page({
this.setData({
courseData : data,
studentList : data.class_students,
lessonList : data.end_lessons
lessonList : data.class_single
})
}
}
......
{
"usingComponents": {},
"usingComponents": {
"van-steps": "../../../components/vant/steps/index"
},
"navigationBarTitleText": "班级详情"
}
\ No newline at end of file
......@@ -27,32 +27,20 @@
</view>
<view class="haveclass">
<text class="title">已上课时</text>
<view class="haveclass-top flex-h flex-hb">
<text class="title">已上课时</text>
<text class="restclass">剩余<text class="number">2</text>课时</text>
<text class="restclass">剩余<text class="number">{{courseData.left_num_count}}</text>课时</text>
</view>
<!-- <view class="item" wx:for="{{lessonList}}" wx:key="index" data-id="{{item.id}}" catchtap="goclassDetail">
<view class="lesson">第{{item.class_index}}节课</view>
<view class="item" wx:for="{{lessonList}}" wx:key="index" data-id="{{item.id}}" >
<image src="/images/select_circle.png" wx:if="{{item.lesson_status == 1}}"></image>
<image src="/images/circle.png" wx:else></image>
<view class="line"></view>
<view class="{{item.lesson_status == 1 ? 'lesson' : 'unlesson'}}">第{{item.class_index}}节课</view>
<view class="date">日期:{{item.class_date}}</view>
<view class="number">
<text>应到:{{item.class_single_person_count}}人</text>
<text>实到:{{item.class_single_person_not_leave_count}}人</text>
</view>
<view class="btn">课程详情</view>
</view> -->
<block wx:for="{{lessonList}}" wx:key="index">
<view class="item">
<view class="item_content">
<view class="lesson">第{{item.class_index}}节课</view>
<view class="date">日期:{{item.class_date}}</view>
<view class="number">
<text>应到:{{item.class_single_person_count}}人</text>
<text>实到:{{item.class_single_person_not_leave_count}}人</text>
</view>
<view class="btn">课程详情</view>
</view>
</view>
</block>
<view class="btn" wx:if="{{item.lesson_status == 1}}" data-id="{{item.id}}" catchtap="goclassDetail">课程详情</view>
</view>
</view>
\ No newline at end of file
......@@ -98,7 +98,8 @@ page{
margin-left: 10rpx;
margin-right: 10rpx;
}
.haveclass .item{
.haveclass .item{
width: 640rpx;
height: 206rpx;
background: #FFFFFF;
......@@ -107,22 +108,23 @@ page{
padding: 40rpx 20rpx;
margin-bottom: 24rpx;
margin-left: 50rpx;
border-left: 1px solid #EEF0F2;
position: relative;
}
.haveclass .item::after{
content: '';
display: inline-block;
.haveclass .item image{
width: 26rpx;
height: 26rpx;
position: absolute;
left: -60rpx;
top: 60rpx;
width: 20rpx;
height: 20rpx;
border-radius: 20rpx;
background: #BDBDBD;
border: 2px solid #EEE;
left: -50rpx;
top: 48rpx;
}
.haveclass .item .line{
width: 2rpx;
height: 205rpx;
background: #EBEBEB;
position: absolute;
left: -38rpx;
top: 73rpx;
}
.haveclass .item .lesson{
color: #000000;
......@@ -130,6 +132,12 @@ page{
margin-bottom: 33rpx;
font-weight: bold;
}
.haveclass .item .unlesson{
color: #999999;
font-size: 30rpx;
margin-bottom: 33rpx;
font-weight: bold;
}
.haveclass .item .date{
color: #999999;
font-size: 24rpx;
......@@ -140,7 +148,7 @@ page{
font-size: 24rpx;
}
.haveclass .item .number text{
margin-right: 10rpx;
margin-right: 50rpx;
}
.haveclass .item .btn{
width: 136rpx;
......@@ -154,4 +162,4 @@ page{
position: absolute;
bottom: 40rpx;
right: 20rpx;
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment