Commit b4c092c1 authored by 石盼盼's avatar 石盼盼

Merge branch 'shipanpan' into 'master'

教练抢班,已抢班级详情接口对接

See merge request !4
parents 39dab9f5 cc70340e
...@@ -5,6 +5,7 @@ Page({ ...@@ -5,6 +5,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
showView : true,
}, },
...@@ -13,6 +14,12 @@ Page({ ...@@ -13,6 +14,12 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
},
showButton : function () {
var that = this;
that.setData({
showView : (!that.data.showView)
})
}, },
gocourseInstant:function(){ gocourseInstant:function(){
wx.navigateTo({ wx.navigateTo({
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
</view> </view>
</view> </view>
<view> <view>
<view class="sign">已签到</view> <view class="sign {{showView?'show':'hide'}}" bindtap="showButton">已签到</view>
<view class="evaluation" catchtap="goevaluation">运动评价</view> <view class="evaluation {{showView?'hide':'show'}}" catchtap="goevaluation">运动评价</view>
</view> </view>
</view> </view>
<view class="item flex-h flex-vc flex-hb"> <view class="item flex-h flex-vc flex-hb">
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
</view> </view>
</view> </view>
<view> <view>
<view class="sign1">签到</view> <!-- <view class="sign1">签到</view> -->
<view class="sign1 {{showView?'show':'hide'}}" bindtap="showButton">签到</view>
<view class="evaluation {{showView?'hide':'show'}}" catchtap="goevaluation">运动评价</view>
</view> </view>
</view> </view>
<view class="item flex-h flex-vc flex-hb"> <view class="item flex-h flex-vc flex-hb">
......
...@@ -129,3 +129,9 @@ ...@@ -129,3 +129,9 @@
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;
} }
.hide{
display: none;
}
.show{
display: block;
}
\ No newline at end of file
...@@ -41,5 +41,6 @@ ...@@ -41,5 +41,6 @@
font-size: 30rpx; font-size: 30rpx;
border: none; border: none;
outline: none; outline: none;
line-height: 82rpx;
} }
...@@ -5,23 +5,17 @@ import { ...@@ -5,23 +5,17 @@ import {
} from '../../../utils/base.js'; } from '../../../utils/base.js';
const base = new Base() const base = new Base()
Page({ Page({
/**
* 页面的初始数据
*/
data: { data: {
show:false,
activeIndex: 1, activeIndex: 1,
datalList: [], datalList: [],
locked:false locked:false
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) { onLoad: function (options) {
this.getList(); this.getList();
this.getMyclasslist() this.getMyclasslist();
this.getList();
}, },
getList: function () { getList: function () {
wx.showLoading({ wx.showLoading({
...@@ -37,10 +31,10 @@ Page({ ...@@ -37,10 +31,10 @@ Page({
console.log(data) console.log(data)
wx.hideLoading(); wx.hideLoading();
this.setData({ this.setData({
show:true,
datalList: data, datalList: data,
locked:false locked:false
}) })
console.log(data)
} }
} }
base.newRequest(params) base.newRequest(params)
...@@ -59,7 +53,6 @@ Page({ ...@@ -59,7 +53,6 @@ Page({
console.log(data) console.log(data)
wx.hideLoading(); wx.hideLoading();
this.setData({ this.setData({
show:true,
datalList:data, datalList:data,
locked:false locked:false
}) })
...@@ -67,6 +60,23 @@ Page({ ...@@ -67,6 +60,23 @@ Page({
} }
base.newRequest(params) base.newRequest(params)
}, },
getrobclass : function () {
const { coach_id, class_id} = this.data
let params = {
url:'coach/robclass',
data : {
coach_id : 5,
class_id : 16
},
callback : (data) => {
console.log(data)
this.setData({
datalList: data
})
}
}
base.newRequest(params)
},
changeTab(e) { changeTab(e) {
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
if (this.data.activeIndex != index) { if (this.data.activeIndex != index) {
...@@ -76,14 +86,15 @@ Page({ ...@@ -76,14 +86,15 @@ Page({
} }
}, },
goteamDetail (e) { goteamDetail (e) {
let item = e.currentTarget.dataset.item
console.log(item)
wx.navigateTo({ wx.navigateTo({
url: '../../team/teamDetail/teamDetail', url: '../../team/teamDetail/teamDetail?lesson_id=' + item.lesson_id,
}) })
}, },
initData:function(){ initData:function(){
this.setData({ this.setData({
show:false, datalList:[],
list:[],
locked:false locked:false
}) })
}, },
...@@ -93,18 +104,8 @@ Page({ ...@@ -93,18 +104,8 @@ Page({
this.setData({ this.setData({
locked:true locked:true
}) })
this.getList(); this.onLoadFun();
this.getMyclasslist()
} }
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
}, },
onReachBottom: function () {
if(!this.data.locked && this.data.more){
this.setData({
locked:true
})
this.getList();
this.getMyclasslist()
}
}
}) })
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
<text class="{{activeIndex == 2 ? 'active': ''}}" catchtap="changeTab" data-index="2">我的班级</text> <text class="{{activeIndex == 2 ? 'active': ''}}" catchtap="changeTab" data-index="2">我的班级</text>
</view> </view>
<view> <view>
<view wx:if="{{show}}">
<view wx:if="{{datalList.length>0}}"> <view wx:if="{{datalList.length>0}}">
<view class="tabContent" wx:if="{{activeIndex == 1 }}" wx:for="{{datalList}}" wx:key="item" data-item="{{item}}" > <view class="tabContent" wx:if="{{activeIndex == 1 }}" wx:for="{{datalList}}" wx:key="item" data-item="{{item}}">
<view class="tab_item"> <view class="tab_item">
<view class="class-title">{{item.course.name}}</view> <view class="class-title">{{item.course.name}}</view>
<view class="text column"> <view class="text column">
...@@ -14,13 +13,13 @@ ...@@ -14,13 +13,13 @@
<text>上课场馆:{{item.stadium.name}}</text> <text>上课场馆:{{item.stadium.name}}</text>
<text>上课时间:{{item.course_time.name}}</text> <text>上课时间:{{item.course_time.name}}</text>
</view> </view>
<view class="goclass">我要上课</view> <view class="goclass" bindtap="getrobclass">我要上课</view>
</view> </view>
</view> </view>
</view> </view>
<none wx:else></none> <none wx:else></none>
</view> </view>
<view wx:if="{{show}}"> <view>
<view wx:if="{{datalList.length>0}}"> <view wx:if="{{datalList.length>0}}">
<view class="tabContent1" wx:if="{{activeIndex == 2}}" wx:for="{{datalList}}" wx:key="item" data-item="{{item}}" catchtap="goteamDetail"> <view class="tabContent1" wx:if="{{activeIndex == 2}}" wx:for="{{datalList}}" wx:key="item" data-item="{{item}}" catchtap="goteamDetail">
<view class="tab_item1"> <view class="tab_item1">
...@@ -36,7 +35,6 @@ ...@@ -36,7 +35,6 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<none wx:else></none> <none wx:else></none>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -7,61 +7,54 @@ ...@@ -7,61 +7,54 @@
<view hidden="{{activeIndex == 1}}"> <view hidden="{{activeIndex == 1}}">
<view class="detailed flex-h"> <view class="detailed flex-h">
<view class="item-one"> <view class="item-one">
<view class="num">2200</view> <view class="num">500</view>
<view class="small">预计收益</view> <view class="small">预计收益</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="item-two"> <view class="item-two">
<view class="num">1000</view> <view class="num">300</view>
<view class="small">已结算</view> <view class="small">已结算</view>
</view> </view>
</view> </view>
<van-icon class="question_icon" name="question-o" /> <van-icon class="question_icon" name="question-o" />
<view class="tx">全部提现</view>
<view class="tip">提示:每周二为提现日!其他日不支持提现</view>
<view class="table"> <view class="table">
<view class="table-tr"> <view class="table-tr">
<view class="table-th">日期</view> <view class="table-th">日期</view>
<view class="table-th">结算金额</view> <view class="table-th">提现金额</view>
<view class="table-th">说明</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
<view class="table-tr"> <view class="table-tr">
<view class="table-td">2020-10-28</view> <view class="table-td">2020-10-28</view>
<view class="table-td">10</view> <view class="table-td">10</view>
<view class="table-td">用户"西西"第一节课</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -126,59 +119,5 @@ ...@@ -126,59 +119,5 @@
</view> </view>
</view> </view>
</view> </view>
<view hidden="{{currentTabIndex != 2}}">
<view class="detailed flex-h">
<view class="item-one">
<view class="num">500</view>
<view class="small">预计收益</view>
</view>
<view class="line"></view>
<view class="item-two">
<view class="num">300</view>
<view class="small">已结算</view>
</view>
</view>
<van-icon class="question_icon" name="question-o" />
<view class="tx">全部提现</view>
<view class="tip">提示:每周二为提现日!其他日不支持提现</view>
<view class="table">
<view class="table-tr">
<view class="table-th">日期</view>
<view class="table-th">提现金额</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
<view class="table-tr">
<view class="table-td">2020-10-28</view>
<view class="table-td">10</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -159,7 +159,8 @@ ...@@ -159,7 +159,8 @@
font-size: 24rpx; font-size: 24rpx;
line-height: 53rpx; line-height: 53rpx;
text-align: left; text-align: left;
padding-left: 22rpx; padding-left: 12rpx;
margin-left: 30rpx;
} }
/* table表格 */ /* table表格 */
.table{ .table{
......
// pages/team/teamDetail/teamDetail.js const app = getApp()
import { Base } from '../../../utils/base.js';
const base = new Base()
Page({ Page({
/**
* 页面的初始数据
*/
data: { data: {
courseData: '',
studentList : [],
lessonList: [],
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) { onLoad: function (options) {
console.log(options) console.log(options.lesson_id)
this.getclassdetail();
this.getlessondetail();
},
getclassdetail: function () {
const { coach_id, class_id} = this.data
let params = {
url : 'coach/classdetail',
data : {
coach_id : 5,
class_id : 16
},
callback : (data) => {
console.log(data)
this.setData({
courseData : data,
studentList : data.class_students,
})
}
}
base.newRequest(params)
},
getlessondetail: function () {
const {coach_id, class_id,lesson_id} = this.data
let params = {
url:'coach/lessondetail',
data:{
coach_id : 5,
class_id : 16,
lesson_id : 69
},
callback : (data) => {
console.log(data)
this.setData({
lessonList:data
})
}
}
base.newRequest(params)
}, },
goclassDetail:function(){ goclassDetail:function(){
wx.navigateTo({ wx.navigateTo({
...@@ -20,13 +55,6 @@ Page({ ...@@ -20,13 +55,6 @@ Page({
}) })
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
...@@ -34,20 +62,6 @@ Page({ ...@@ -34,20 +62,6 @@ Page({
}, },
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
...@@ -55,17 +69,7 @@ Page({ ...@@ -55,17 +69,7 @@ Page({
}, },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })
\ No newline at end of file
<view class="top"> <view class="top">
<view class="course"> <view class="course">
<view class="course_top flex-h flex-vc"> <view class="course_top flex-h flex-vc">
<image src="../../../images/personal_pic_01.jpg"></image> <image src="{{courseData.course.main_img}}"></image>
<view> <view>
<view class="class">足球课</view> <view class="class">{{courseData.course.name}}</view>
<text class="years">3~6岁</text> <text class="years">{{courseData.course_attr.age_meal.age_range}}</text>
<text>|</text> <text>|</text>
<text class="time">4课时</text> <text class="time">{{courseData.course_attr.class_meal.name}}</text>
</view> </view>
</view> </view>
<view class="course_bot"> <view class="course_bot">
<view class="class_time">上课时间:周三 15:00-16:00</view> <view class="class_time">上课时间:{{courseData.course_time.name}}</view>
<view class="class_place">上课地点:新天际建华幼儿园</view> <view class="class_place">上课地点:{{courseData.stadium.name}}</view>
</view> </view>
</view> </view>
<view class="state flex-h">
<view>已上课</view>
<view>即将上课</view>
<view>待上课</view>
<view>待上课</view>
</view>
</view> </view>
<view class="students"> <view class="students">
<text>本班学员</text> <text>本班学员</text>
<view class="stu flex-h flex-hw"> <view class="stu flex-h flex-hw">
<view class="stus column"> <view class="stus column" wx:for="{{studentList}}" wx:key="index" wx:for-item="item">
<image src="../../../images/photo.png"></image> <image src="/images/default_head.png" wx:if="{{item.child.thumb == null}}"></image>
<view>西西</view> <image src="{{item.child.thumb}}" wx:else></image>
</view> <view class="name">{{item.child.child_name}}</view>
<view class="stus column">
<image src="../../../images/photo.png"></image>
<view>西西</view>
</view>
<view class="stus column">
<image src="../../../images/photo.png"></image>
<view>西西</view>
</view>
<view class="stus column">
<image src="../../../images/photo.png"></image>
<view>西西</view>
</view>
<view class="stus column">
<image src="../../../images/photo.png"></image>
<view>西西</view>
</view>
<view class="stus column">
<image src="../../../images/photo.png"></image>
<view>西西</view>
</view>
<view class="stus column">
<image src="../../../images/photo.png"></image>
<view>西西</view>
</view> </view>
</view> </view>
</view> </view>
<view class="haveclass"> <view class="haveclass">
<text class="title">已上课时</text> <text class="title">已上课时</text>
<view class="item"> <view class="item" wx:for="{{lessonList}}" wx:key="index" wx:for-item="item">
<view class="lesson">第二节课</view> <view class="lesson">第二节课</view>
<view class="date">日期:2020-10-21</view> <view class="date">日期:2020-10-21</view>
<view class="number"> <view class="number">
...@@ -60,13 +43,4 @@ ...@@ -60,13 +43,4 @@
</view> </view>
<view class="btn" catchtap="goclassDetail">课程详情</view> <view class="btn" catchtap="goclassDetail">课程详情</view>
</view> </view>
<view class="item">
<view class="lesson">第一节课</view>
<view class="date">日期:2020-10-21</view>
<view class="number">
<text>应到:8人</text>
<text>实到:7人</text>
</view>
<view class="btn" catchtap="goclassDetail">课程详情</view>
</view>
</view> </view>
\ No newline at end of file
...@@ -24,6 +24,7 @@ page{ ...@@ -24,6 +24,7 @@ page{
width: 220rpx; width: 220rpx;
height: 144rpx; height: 144rpx;
margin-right: 30rpx; margin-right: 30rpx;
border-radius: 8rpx;
} }
.top .course .course_top .class{ .top .course .course_top .class{
color: #000000; color: #000000;
...@@ -43,6 +44,14 @@ page{ ...@@ -43,6 +44,14 @@ page{
.top .course .course_bot .class_time{ .top .course .course_bot .class_time{
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.top .state{
width:100%;
margin-top: 150rpx;
padding-left: 20rpx;
}
.top .state>view{
width:190rpx;
}
.students{ .students{
width: 100%; width: 100%;
background: #FFFFFF; background: #FFFFFF;
...@@ -66,6 +75,11 @@ page{ ...@@ -66,6 +75,11 @@ page{
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
border-radius: 50%;
}
.students .stu .name{
color: #1A1A1A;
font-size: 24rpx;
} }
.haveclass{ .haveclass{
width: 100%; width: 100%;
......
...@@ -147,6 +147,13 @@ ...@@ -147,6 +147,13 @@
"id": -1, "id": -1,
"name": "pages/tabbar/class/class", "name": "pages/tabbar/class/class",
"pathName": "pages/tabbar/class/class", "pathName": "pages/tabbar/class/class",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/team/teamDetail/teamDetail",
"pathName": "pages/team/teamDetail/teamDetail",
"scene": null "scene": null
} }
] ]
......
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