Commit bcabebbb authored by wangxuelai's avatar wangxuelai

''

parent 0c0c6b58
......@@ -31,7 +31,8 @@ Page({
page: 1,
perPage: 10,
hasmore: true,
emptyPage: false,
taskemptyPage: false,
clockemptyPage: false,
listLoading: false,
taskTotal: 0,
taskList: [],
......@@ -48,7 +49,9 @@ Page({
clockList: [],
clockhasmore: true,
audioStorage: {},
commenteditor: false
commenteditor: false,
queryCustomerId: '',
selfSelected: 1, // 1查看全部 2 查看自己
},
/**
......@@ -104,7 +107,11 @@ Page({
this.setData({
page: 1,
hasmore: true,
clockhasmore: true,
clockGetting: false,
clockPage: 1,
})
this.clockListGet('down');
this.getStudentTasks('down');
},
......@@ -112,7 +119,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
// this.getStudentTasks('up')
this.clockListGet('up');
},
/**
......@@ -150,7 +157,7 @@ Page({
clockPage: 1,
})
this.getStudentTasks('init');
this.clockListGet('init')
this.clockListGet('init');
}
}
}).catch((e) => {
......@@ -250,11 +257,11 @@ Page({
}
if (this.data.taskList.length == 0) {
this.setData({
emptyPage: true
taskemptyPage: true
})
} else {
this.setData({
emptyPage: false
taskemptyPage: false
})
}
}
......@@ -301,9 +308,13 @@ Page({
taskList: [],
id: classitem.id,
classesShow: false,
selectedClass: classitem
selectedClass: classitem,
clockhasmore: true,
clockGetting: false,
clockPage: 1,
}, () => {
this.getStudentTasks('init');
this.clockListGet('init');
})
},
newLikeIndex(clockRecordIds, callback) {
......@@ -337,15 +348,15 @@ Page({
if (this.data.clockGetting) {
return;
}
this.data.clockGetting = true;
// wx.showLoading({
// title: '数据加载中'
// })
this.setData({
clockGetting: true
})
clockList({
page: this.data.clockPage,
perPage: this.data.clockPerPage,
class_id: this.data.id,
// exclude_self: true
// exclude_self: true,
consumer_id: that.data.queryCustomerId,
now_consumer_id: visitor && visitor.id
}).then((res) => {
const {
......@@ -388,7 +399,9 @@ Page({
let clockPage = that.data.clockPage + 1;
this.data.clockPage = clockPage;
} else { // 没有更多了
this.data.clockhasmore = false;
this.setData({
clockhasmore: false
})
}
})
break;
......@@ -400,7 +413,9 @@ Page({
let clockPage = that.data.clockPage + 1;
this.data.clockPage = clockPage
} else { // 没有更多了
this.data.clockhasmore = false;
this.setData({
clockhasmore: false
})
}
})
wx.stopPullDownRefresh();
......@@ -415,7 +430,9 @@ Page({
let clockPage = that.data.clockPage + 1;
this.data.clockPage = clockPage;
} else { // 没有更多了
this.data.clockhasmore = false;
this.setData({
clockhasmore: false
})
}
})
break;
......@@ -424,11 +441,11 @@ Page({
}
if (that.data.clockList.length == 0) {
that.setData({
emptyPage: true
clockemptyPage: true
})
} else {
that.setData({
emptyPage: false
clockemptyPage: false
})
}
this.newLikeIndex(clockRecordIds, function (likeRes) {
......@@ -761,4 +778,25 @@ Page({
clockList: _clockList,
})
},
statusChoose () {
const visitor = LocalStorage.getItem('visitor');
if (this.data.selfSelected == 1) {
this.setData({
selfSelected: 2,
queryCustomerId: visitor.id,
clockhasmore: true,
clockGetting: false,
clockPage: 1,
})
} else if (this.data.selfSelected == 2) {
this.setData({
selfSelected: 1,
queryCustomerId: '',
clockhasmore: true,
clockGetting: false,
clockPage: 1,
})
}
this.clockListGet('init');
}
})
\ No newline at end of file
......@@ -14,7 +14,7 @@
</view>
</view>
</view>
<view class="taskbox" hover-class="none" hover-stop-propagation="false" wx:if="{{!emptyPage}}">
<view class="taskbox" hover-class="none" hover-stop-propagation="false" wx:if="{{!taskemptyPage}}">
<view class="" hover-class="none" hover-stop-propagation="false" wx:for="{{taskList}}" wx:key="{{index}}" data-task="{{item}}" bindtap="goClock">
<view class="circle-item rili mb24" hover-class="none" hover-stop-propagation="false" wx:if="{{item.subject_type == 2}}">
<image class="rilibg" src="{{localImageRoot}}2c/circleindex/rili.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
......@@ -58,8 +58,15 @@
</view>
<list-loading loading="{{listLoading}}"></list-loading>
</view>
<view class="divide" hover-class="none" hover-stop-propagation="false"></view>
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{!emptyPage}}">
<view class="divide" hover-class="none" hover-stop-propagation="false" wx:if="{{!clockemptyPage}}"></view>
<view class="" hover-class="none" hover-stop-propagation="false" wx:if="{{!clockemptyPage}}">
<view class="toptitle" hover-class="none" hover-stop-propagation="false">
<view class="title" hover-class="none" hover-stop-propagation="false">精选打卡</view>
<view class="self-radio-box" hover-class="none" hover-stop-propagation="false">
<view class="{{selfSelected == 1 ? 'self-radio not-selected' : 'self-radio selected'}}" hover-class="none" data-status="1" bindtap="statusChoose" hover-stop-propagation="false"></view>
<text class="radio-name" selectable="false" space="false" decode="false" data-status="1" bindtap="statusChoose">只看自己</text>
</view>
</view>
<view class="" hover-class="none" hover-stop-propagation="false" wx:for="{{clockList}}"
wx:key="index" wx:if="{{clockList.length > 0}}">
<clock-item clock="{{item}}" bind:delClock="delClock" bind:expandAccessment="expandAccessment"
......@@ -72,8 +79,16 @@
</clock-item>
</view>
<list-loading loading="{{clockGetting}}"></list-loading>
<view class="tech-support clearfix" hover-class="none" hover-stop-propagation="false" wx:if="{{!clockhasmore}}">
<view class="short-line short-line-left" hover-class="none" hover-stop-propagation="false"></view>
<view class="tech-text" hover-class="none" hover-stop-propagation="false" bindtap="goBusinessClock">
<text class="action" selectable="false" space="false" decode="false">技术支持</text>
<text class="company-name" selectable="false" space="false" decode="false">商家岛</text>
</view>
<view class="short-line short-line-right" hover-class="none" hover-stop-propagation="false"></view>
</view>
</view>
<view class="empty-box" hover-class="none" hover-stop-propagation="false" wx:if="{{emptyPage}}">
<view class="empty-box" hover-class="none" hover-stop-propagation="false" wx:if="{{taskemptyPage}}">
<view class="icon-box" hover-class="none" hover-stop-propagation="false">
<image class="empty-icon" src="{{imageRoot}}2b/organizationalmgt/empty-icon.png?{{imageVersion}}" lazy-load="false" binderror="" bindload=""></image>
</view>
......
......@@ -260,4 +260,31 @@ text-align: center;
.divide {
height: 24rpx;
background-color: #F7F7F9;
}
.toptitle {
display: flex;
align-items: center;
justify-content: space-between;
padding: 50rpx 24rpx 20rpx;
}
.self-radio-box {
display: flex;
align-items: center;
}
.self-radio {
margin-right: 16rpx;
}
.self-radio.selected {
border-color: #FFD146;
}
.self-radio.selected::after {
background-color: #FFD146;
}
.self-radio-box text {
color: rgba(0,0,0,0.6);
}
.toptitle .title {
font-size: 32rpx;
font-weight: 700;
color: #000;
}
\ 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