Commit 945588be authored by 石盼盼's avatar 石盼盼

Merge branch 'shipanpan' into 'master'

Shipanpan

See merge request !2
parents 812ab945 0a8390a5
// components/navbar/index.js
const App = getApp();
Component({
properties: {
},
data: {
},
methods: {
}
})
\ No newline at end of file
{
"component": true
}
\ No newline at end of file
<view class="noneBox">
<image src="../../images/none.png"></image>
<view>暂无内容</view>
</view>
\ No newline at end of file
/**app.wxss**/
@import "../../iconfont/iconfont";
.noneBox{
padding: 50rpx 0;
}
.noneBox image{
display: block;
width: 394rpx;
height: 297rpx;
margin: 0 auto;
}
.noneBox view{
color: #999;
font-size: 28rpx;
text-align: center;
margin-top: 20rpx;
}
\ No newline at end of file
images/my/per_icon_03.png

1.72 KB | W: | H:

images/my/per_icon_03.png

2 KB | W: | H:

images/my/per_icon_03.png
images/my/per_icon_03.png
images/my/per_icon_03.png
images/my/per_icon_03.png
  • 2-up
  • Swipe
  • Onion skin
const app = getApp()
import {
Base
......@@ -9,26 +10,59 @@ Page({
* 页面的初始数据
*/
data: {
show:false,
activeIndex: 1,
list: [],
hasMore: true,
page: 1
datalList: [],
locked:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getList()
this.getList();
this.getMyclasslist()
},
getList(){
getList: function () {
wx.showLoading({
title: '加载中',
})
const { coach_id } = this.data;
let params = {
url: '',
url: 'coach/roblist',
data: {
coach_id : 5
},
callback:(data)=>{
console.log(data)
wx.hideLoading();
this.setData({
show:true,
datalList: data,
locked:false
})
}
}
base.newRequest(params)
},
getMyclasslist: function () {
wx.showLoading({
title: '加载中...',
})
const { coach_id } = this.data;
let params = {
url:'coach/myclasses',
data : {
coach_id : 5
},
callback: (data) =>{
console.log(data)
wx.hideLoading();
this.setData({
show:true,
datalList:data,
locked:false
})
}
}
base.newRequest(params)
......@@ -41,15 +75,36 @@ Page({
})
}
},
goteamDetail: function () {
goteamDetail (e) {
wx.navigateTo({
url: '../../team/teamDetail/teamDetail',
})
},
initData:function(){
this.setData({
show:false,
list:[],
locked:false
})
},
onPullDownRefresh: function () {
this.initData()
if(!this.data.locked){
this.setData({
locked:true
})
this.getList();
this.getMyclasslist()
}
wx.stopPullDownRefresh()
},
onReachBottom: function () {
if(!this.data.locked && this.data.more){
this.setData({
locked:true
})
this.getList();
this.getMyclasslist()
}
}
})
......@@ -4,58 +4,39 @@
<text class="{{activeIndex == 2 ? 'active': ''}}" catchtap="changeTab" data-index="2">我的班级</text>
</view>
<view>
<view class="tabContent" wx:if="{{activeIndex == 1}}">
<view class="tab_item" catchtap="goteamDetail">
<view class="class-title">篮球班</view>
<view wx:if="{{show}}">
<view wx:if="{{datalList.length>0}}">
<view class="tabContent" wx:if="{{activeIndex == 1 }}" wx:for="{{datalList}}" wx:key="item" data-item="{{item}}" >
<view class="tab_item">
<view class="class-title">{{item.course.name}}</view>
<view class="text column">
<text>所在区域:裕华区</text>
<text>上课场馆:新天际建华幼儿园</text>
<text>上课时间:周六 09:00~10:00</text>
<text>所在区域:{{item.stadium.region.name}}</text>
<text>上课场馆:{{item.stadium.name}}</text>
<text>上课时间:{{item.course_time.name}}</text>
</view>
<view class="goclass">我要上课</view>
</view>
<view class="tab_item" catchtap="goteamDetail">
<view class="class-title">篮球班</view>
<view class="text column">
<text>所在区域:裕华区</text>
<text>上课场馆:新天际建华幼儿园</text>
<text>上课时间:周六 09:00~10:00</text>
</view>
<view class="goclass">我要上课</view>
</view>
<view class="tab_item" catchtap="goteamDetail">
<view class="class-title">篮球班</view>
<view class="text column">
<text>所在区域:裕华区</text>
<text>上课场馆:新天际建华幼儿园</text>
<text>上课时间:周六 09:00~10:00</text>
</view>
<view class="goclass">我要上课</view>
</view>
<none wx:else></none>
</view>
<view class="tabContent1" wx:if="{{activeIndex == 2}}">
<view wx:if="{{show}}">
<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="tab_item1">
<view class="top">
<view class="class-title">篮球班</view>
<view class="statue">学期中</view>
<view class="class-title">{{item.course.name}}</view>
<view class="statue">{{item.class_status_display}}</view>
</view>
<view class="text column">
<text>所在区域:裕华区</text>
<text>上课场馆:新天际建华幼儿园</text>
<text>上课时间:周六 09:00~10:00</text>
<text>所在区域:{{item.stadium.region.name}}</text>
<text>上课场馆:{{item.stadium.name}}</text>
<text>上课时间:{{item.course_time.name}}</text>
</view>
</view>
<view class="tab_item1">
<view class="top">
<view class="class-close">篮球班</view>
<view class="close">已结课</view>
</view>
<view class="text column">
<text>所在区域:裕华区</text>
<text>上课场馆:新天际建华幼儿园</text>
<text>上课时间:周六 09:00~10:00</text>
</view>
</view>
</view>
<none wx:else></none>
</view>
</view>
\ No newline at end of file
......@@ -31,14 +31,14 @@
<view class="centerNav">
<view class="every flex-h flex-vc flex-hb" catchtap="goteachingArea">
<view class="row title">
<image src="../../../images/personal_icon_05.png"></image>
<image src="../../../images/my/per_icon_02.png"></image>
<view>教学区域</view>
</view>
<text class="iconfont icongengduo"></text>
</view>
<view class="every flex-h flex-vc flex-hb" catchtap="tcHold">
<view class="row title">
<image src="../../../images/personal_icon_02.png"></image>
<image src="../../../images/my/per_icon_03.png"></image>
<view>教学科目</view>
</view>
<view class="row">
......@@ -51,7 +51,7 @@
<view class="centerNav">
<view class="every flex-h flex-vc flex-hb" catchtap="goCall">
<view class="row title">
<image src="/images/my/per_icon_03.png"></image>
<image src="/images/my/per_icon_04.png"></image>
<view>联系客服</view>
</view>
<text class="iconfont icongengduo"></text>
......
......@@ -12,7 +12,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
},
goclassDetail:function(){
wx.navigateTo({
......
......@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"enhance": false,
"postcss": true,
......@@ -146,6 +146,13 @@
"id": -1,
"name": "个人中心",
"pathName": "pages/tabbar/personal/personal",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/tabbar/class/class",
"pathName": "pages/tabbar/class/class",
"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