Commit 49d50912 authored by sujie@126.com's avatar sujie@126.com

dd

parent b77d8c6e
......@@ -63,9 +63,14 @@ Page({
hasmore: true,
emptyPage: false,
listLoading: false,
schedulepage: 1,
scheduleHasmore: true,
scheduleEmptyPage: false,
scheduleListLoading: false,
studentpage: 1,
studentHasmore: true,
studentEmptyPage: false,
studentListLoading: false,
posterBoxShow: false,
canvasShow: false,
mylogo: 'clock-test/member/12186/2018-11-22/1003e9389385fea846ade074d6701974.png',
......@@ -144,7 +149,9 @@ Page({
this.getCircleDetail();
this.setData({
page: 1,
schedulepage:1,
hasmore: true,
scheduleHasmore: true,
mixedthemeList: [],
mixedthemeTotal: 0,
schedulesList:[],
......@@ -158,6 +165,8 @@ Page({
onPullDownRefresh: function () { // Do something when pull down.
this.setData({
page: 1,
schedulepage:1,
scheduleHasmore: true,
hasmore: true,
},()=>{
this.doInit('down')
......@@ -167,19 +176,19 @@ Page({
this.doInit('up')
},
doInit(type){
doInit(type,tab){
switch(this.data.bigTabStatus){
case 1:
this.scheduleListGet(type)
this.scheduleListGet(type,tab)
break;
case 2:
this.memberListGet(type);
this.memberListGet(type,tab);
break;
case 3:
this.themeListGet(type);
this.themeListGet(type,tab);
break;
default:
this.scheduleListGet(type)
this.scheduleListGet(type,tab)
break;
}
},
......@@ -206,16 +215,16 @@ Page({
const {bigtabtype} = e.currentTarget.dataset;
that.setData({
bigTabStatus: bigtabtype,
hasmore: true,
page: 1,
mixedthemeList: [],
mixedthemeTotal: 0,
schedulesList:[],
schedulesTotal: 0,
memberList: [],
memberTotal: 0,
// hasmore: true,
// page: 1,
// mixedthemeList: [],
// mixedthemeTotal: 0,
// schedulesList:[],
// schedulesTotal: 0,
// memberList: [],
// memberTotal: 0,
}, () => {
that.doInit('init');
that.doInit('init','tab');
})
},
// 班级课表tab切换
......@@ -228,7 +237,7 @@ Page({
that.setData({
scheduleType: scheduletype,
scheduleHasmore: true,
page: 1,
schedulepage: 1,
schedulesTotal: 0,
schedulesList: []
}, () => {
......@@ -328,19 +337,22 @@ Page({
// 班级课表
scheduleListGet(type) {
scheduleListGet(type,tab) {
if (!this.data.scheduleHasmore) {
return;
}
if (this.data.scheduleListLoading) {
return
}
if (type == 'init' && tab && !this.data.emptyPage){
return;
}
this.setData({
scheduleListLoading: true
})
erpSchedulesList({
page: this.data.page,
page: this.data.schedulepage,
perPage: this.data.perPage,
class_id: this.data.id,
school_id: this.data.sid,
......@@ -371,10 +383,7 @@ Page({
schedulesList: this.transformList(data.list)
}, () => {
if (this.data.schedulesTotal > this.data.schedulesListOrigin.length) {
let page = this.data.page + 1;
this.setData({
page,
})
this.data.schedulepage = this.data.schedulepage + 1;
} else { // 没有更多了
this.setData({
scheduleHasmore: false
......@@ -388,10 +397,7 @@ Page({
schedulesList: this.transformList(data.list)
}, () => {
if (this.data.schedulesTotal > this.data.schedulesListOrigin.length) {
let page = this.data.page + 1;
this.setData({
page,
})
this.data.schedulepage = this.data.schedulepage + 1;
} else { // 没有更多了
this.setData({
scheduleHasmore: false
......@@ -412,10 +418,7 @@ Page({
// [`schedulesList[${this.data.page - 1}]`]: data.list
}, () => {
if (this.data.schedulesTotal > this.data.schedulesListOrigin.length) {
let page = this.data.page + 1;
this.setData({
page,
})
this.data.schedulepage = this.data.schedulepage + 1;
} else { // 没有更多了
this.setData({
scheduleHasmore: false
......
......@@ -46,36 +46,6 @@
<view>{{circleInfo.school_teachers.length>0?circleInfo.school_teachers:'暂未分配老师'}}/{{circleInfo.class_room?circleInfo.class_room.title:'暂未分配教室'}}</view>
</view>
</view>
<!-- <view class="operate-btn-box">
<view class="operate-btn" bindtap="addTheme">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton"></button>
</form>
<image class="operate-icon" src="{{imageRoot}}2b/optimize/icon_zuoye.png?{{imageVersion}}"></image>
<view class="operate-title">发布作业</view>
</view>
<view class="operate-btn" bindtap="goCircleMember">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton"></button>
</form>
<image class="operate-icon" src="{{imageRoot}}2b/optimize/icon_student.png?{{imageVersion}}"></image>
<view class="operate-title">班级学员</view>
</view>
<view class="operate-btn" bindtap="goRankingList">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="operate-icon" src="{{imageRoot}}2b/optimize/icon_ranking.png?{{imageVersion}}"></image>
<view class="operate-title">排行榜</view>
</view>
<view class="operate-btn" bindtap="circleSetting">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="operate-icon" src="{{imageRoot}}2b/optimize/icon_setting.png?{{imageVersion}}"></image>
<view class="operate-title">设置</view>
</view>
</view> -->
</view>
<view class="bigtab-box {{curBigTab}}">
......
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