Commit 915dab03 authored by 石盼盼's avatar 石盼盼

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

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