Commit 46a2b4c1 authored by sujie@126.com's avatar sujie@126.com

dd

parent 9c846bcb
......@@ -31,12 +31,12 @@ Page({
},
onLoad: function (options) {
const {sid,student_ids,id,courseid} = options;
this.setData({
sid,
student_ids,
Object.assign(this.data, {
sid: sid || 0,
student_ids: student_ids || 0,
id: id || 0,
courseid: courseid || 0
});
})
},
onShow: function () {
this.setData({
......@@ -102,11 +102,7 @@ Page({
classList: [data.list]
}, () => {
if (data.total > this.caculateArrLength(this.data.classList)) {
let page = this.data.page + 1;
this.setData({
page,
})
this.data.page = this.data.page + 1;
} else { // 没有更多了
this.setData({
hasmore: false
......@@ -119,10 +115,7 @@ Page({
classList: [data.list]
}, () => {
if (data.total > this.caculateArrLength(this.data.classList)) {
let page = this.data.page + 1;
this.setData({
page,
})
this.data.page = this.data.page + 1;
} else { // 没有更多了
this.setData({
hasmore: false
......@@ -137,10 +130,7 @@ Page({
[`classList[${this.data.page - 1}]`]: data.list
}, () => {
if (this.data.classTatol > this.caculateArrLength(this.data.classList)) {
let page = this.data.page + 1;
this.setData({
page,
})
this.data.page = this.data.page + 1;
} else { // 没有更多了
this.setData({
hasmore: false
......
This diff is collapsed.
......@@ -123,25 +123,27 @@
</view>
</view>
</view>
<view class="userlist-box" style="border-top: 1px solid rgba(0,0,0,.05)" wx:if="{{memberTotal>0}}">
<view class="list-item" wx:for="{{memberList}}" wx:key="index" data-item="{{item}}" bindtap="">
<image class="avatar" src="{{filter.imagify(item.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="item-content">
<view class="nickname">{{item.name}}</view>
<view class="info-box">
<view class="info-label">剩余课时:</view>
<view class="num">{{item.surplus?item.surplus:0}}</view>
<view class="userlist-box" style="border-top: 1px solid rgba(0,0,0,.05)" wx:if="{{!studentEmptyPage}}">
<view class="" wx:for="{{memberList}}" wx:for-index="idx" wx:for-item="listItem" wx:key="idx">
<view class="list-item" wx:for="{{listItem}}" wx:key="index" data-item="{{item}}" bindtap="">
<image class="avatar" src="{{filter.imagify(item.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{item.avatar}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="item-content">
<view class="nickname">{{item.name}}</view>
<view class="info-box">
<view class="info-label">剩余课时:</view>
<view class="num">{{item.surplus?item.surplus:0}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="empty-content" wx:if="{{memberTotal==0}}">
<view class="empty-content" wx:if="{{studentEmptyPage}}">
<image class='empty-img' src='{{imageRoot}}2b/potentialcustomer/emptyimg.png?{{imageVersion}}'></image>
<view class="empty-text">暂无学员数据~</view>
</view>
<list-loading loading="{{listLoading}}"></list-loading>
<view class="has-nomore" wx:if="{{!hasmore && memberTotal>0}}">没有更多了</view>
<list-loading loading="{{studentListLoading}}"></list-loading>
<view class="has-nomore" wx:if="{{!studentHasmore && memberTotal>0}}">没有更多了</view>
</block>
<block wx:if="{{bigTabStatus==3}}">
<view class="content-topbox">
......@@ -151,9 +153,9 @@
</view>
</view>
</view>
<view class="circlelist-content" wx:if="{{mixedthemeTotal>0}}">
<!-- <block wx:for="{{mixedthemeList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex"> -->
<view class="circle-item mb24 {{item.subject_type==2?'rili':''}}" wx:for="{{mixedthemeList}}" wx:for-item="item" data-theme="{{item}}" wx:key="{{index}}" catchtap="goThemeIndex">
<view class="circlelist-content" wx:if="{{!emptyPage}}">
<view class="" wx:for="{{mixedthemeList}}" wx:for-item="listItem" wx:for-index="listIndex" wx:key="{{listIndex}}">
<view class="circle-item mb24 {{item.subject_type==2?'rili':''}}" wx:for="{{listItem}}" wx:for-item="item" data-theme="{{item}}" wx:key="{{index}}" catchtap="goThemeIndex">
<block wx:if="{{item.subject_type == 1}}">
<image class="taskbg assignmentbg" src="{{imageRoot}}2b/circleindex/assignment.png?{{imageVersion}}"></image>
<view class="circlename">
......@@ -179,7 +181,7 @@
<text class="clockstatic" style="opacity: 0">占位,无意义</text>
</view>
</block>
<view class="operatebox" data-theme="{{item}}" catchtap="copytheme" data-btn="copybtn" data-index="{{index}}">
<view class="operatebox" data-theme="{{item}}" catchtap="copytheme" data-btn="copybtn" data-index="{{index}}" data-listIndex="{{listIndex}}">
<image class="icon_copy" src="{{imageRoot}}2b/circleindex/icon_copy.png?{{imageVersion}}"></image>
</view>
<view class="notpublishstatus" wx:if="{{item.subject_status == 1}}">
......@@ -205,7 +207,7 @@
<image class="dianpinicon" wx:if="{{item.subject_status != 1}}" src="{{imageRoot}}2b/circleindex/right.png?{{imageVersion}}"></image>
<text class="clockstatic" wx:if="{{item.subject_status != 1}}" selectable="false" space="false" decode="false">已全部点评</text>
</view>
<view class="operatebox" data-theme="{{item}}" catchtap="copytheme" data-btn="copybtn" data-index="{{index}}">
<view class="operatebox" data-theme="{{item}}" catchtap="copytheme" data-btn="copybtn" data-index="{{index}}" data-listIndex="{{listIndex}}">
<image class="icon_copy" src="{{imageRoot}}2b/circleindex/icon_copy.png?{{imageVersion}}"></image>
</view>
<block wx:if="{{item.subject_status != 1}}">
......@@ -234,7 +236,7 @@
<text class="" selectable="false" space="false" decode="false">{{item.clock_people}}人参与</text>
<text class="" selectable="false" space="false" decode="false">已闯{{item.unlock_clock_count}}关</text>
</view>
<view class="operatebox" data-theme="{{item}}" catchtap="copytheme" data-btn="copybtn" data-id="{{item.id}}" data-status="{{item.status}}" data-index="{{index}}">
<view class="operatebox" data-theme="{{item}}" catchtap="copytheme" data-btn="copybtn" data-id="{{item.id}}" data-status="{{item.status}}" data-index="{{index}}" data-listIndex="{{listIndex}}">
<image class="icon_copy" src="{{imageRoot}}2b/circleindex/icon_copy.png?{{imageVersion}}"></image>
</view>
<block wx:if="{{item.status == 2}}">
......@@ -258,7 +260,7 @@
</view>
</block>
</view>
<!-- </block> -->
</view>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="" wx:else>
......
......@@ -164,7 +164,6 @@ Page({
wx.stopPullDownRefresh();
break;
case 'up': // 页面上拉刷新
let list = this.data.classList;
this.setData({
[`classList[${this.data.page - 1}]`]: data.list
}, () => {
......
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