Commit ad3ed533 authored by lvtz's avatar lvtz

fix

parent 5d1eb6ff
...@@ -128,6 +128,7 @@ Page({ ...@@ -128,6 +128,7 @@ Page({
page:1, page:1,
noUserinfo: false, noUserinfo: false,
isQrcodeIn:false, isQrcodeIn:false,
hasmore: true,
}, },
/** /**
...@@ -1147,9 +1148,12 @@ Page({ ...@@ -1147,9 +1148,12 @@ Page({
this.setData({ this.setData({
listLoading: true listLoading: true
}) })
wx.showLoading({
title: '加载中',
})
commonclock({ commonclock({
page: this.data.page, page: this.data.page,
perPage: 99, perPage: 3,
school_id: this.data.sid, school_id: this.data.sid,
sort_type: 2, sort_type: 2,
extra: 'website_read', extra: 'website_read',
...@@ -1164,8 +1168,11 @@ Page({ ...@@ -1164,8 +1168,11 @@ Page({
data data
} = res; } = res;
if (code != 200) { // 失败的处理 if (code != 200) { // 失败的处理
wx.hideLoading()
} else { } else {
if (data) { if (data) {
const { clockList, page } = this.data;
let _clockList = [];
data.list.map((ele) => { data.list.map((ele) => {
ele.video_parse = JSON.parse(ele.video); ele.video_parse = JSON.parse(ele.video);
ele.audio_parse = JSON.parse(ele.audio); ele.audio_parse = JSON.parse(ele.audio);
...@@ -1178,11 +1185,17 @@ Page({ ...@@ -1178,11 +1185,17 @@ Page({
ele.contentexpand = false; ele.contentexpand = false;
return ele; return ele;
}) })
if(page == 1){
_clockList = data.list
}else{
_clockList = clockList.concat(data.list)
}
this.setData({ this.setData({
clockList: data.list || [], clockList: _clockList,
clockTotal: data.total_count clockTotal: data.total_count
}) })
} }
wx.hideLoading()
} }
let clockRecordIds = data.list.map((ele) => { let clockRecordIds = data.list.map((ele) => {
return ele.id return ele.id
...@@ -1220,6 +1233,7 @@ Page({ ...@@ -1220,6 +1233,7 @@ Page({
this.setData({ this.setData({
listLoading: false listLoading: false
}) })
wx.hideLoading()
}) })
}, },
newLikeIndex1(clockRecordIds, callback) { newLikeIndex1(clockRecordIds, callback) {
...@@ -1361,6 +1375,7 @@ Page({ ...@@ -1361,6 +1375,7 @@ Page({
}, },
nextClockList(){ nextClockList(){
const visitor = LocalStorage.getItem('visitor'); const visitor = LocalStorage.getItem('visitor');
const { page } = this.data;
activityLog({ activityLog({
type: 34, type: 34,
open_id: visitor && visitor.openid, open_id: visitor && visitor.openid,
...@@ -1368,9 +1383,14 @@ Page({ ...@@ -1368,9 +1383,14 @@ Page({
remark: '', remark: '',
class_id: this.data.id class_id: this.data.id
}) })
this.setData({ clearTimeout(this.settimer);
maxShowClock:this.data.maxShowClock<this.data.clockTotal?this.data.maxShowClock+=3:this.data.maxShowClock this.settimer = setTimeout(()=>{
}) this.setData({
page: page+1
})
this.clockListGet()
},500)
}, },
clickVideo(e){ clickVideo(e){
const id = e.currentTarget.dataset.id; const id = e.currentTarget.dataset.id;
...@@ -1653,6 +1673,7 @@ Page({ ...@@ -1653,6 +1673,7 @@ Page({
} }
if (code == 200) { if (code == 200) {
if (data) { if (data) {
this.clockListGet();
this.setData({ this.setData({
// userInfo: data, // userInfo: data,
noUserinfo: false, noUserinfo: false,
......
...@@ -114,12 +114,12 @@ ...@@ -114,12 +114,12 @@
<!-- <view class="line-20" wx:if="{{noUserinfo}}"> <!-- <view class="line-20" wx:if="{{noUserinfo}}">
</view> --> </view> -->
<view class="introduce" wx:if="{{clockList.length>0}}"> <view class="introduce" wx:if="{{clockList.length>0}}" style="{{clockList.length<clockTotal ? 'padding-bottom: 44rpx' : ''}}">
<view class="title">为你推荐更多优秀作品</view> <view class="title">为你推荐更多优秀作品</view>
<!-- <view class="line-16"></view> --> <!-- <view class="line-16"></view> -->
<view class="content"> <view class="content">
<view class="clock-box" wx:for="{{clockList}}" <view class="clock-box" wx:for="{{clockList}}"
wx:key="index" data-item="{{item}}" wx:if="{{maxShowClock>index}}"> wx:key="index" data-item="{{item}}">
<clock-item clock="{{item}}" <clock-item clock="{{item}}"
bind:delClock="delClock1" bind:delClock="delClock1"
bind:expandAccessment="expandAccessment1" bind:expandAccessment="expandAccessment1"
...@@ -142,12 +142,12 @@ ...@@ -142,12 +142,12 @@
bind:delEvaluate="delEvaluate1" bind:delEvaluate="delEvaluate1"
bind:showcommenteditor="showcommenteditor1" bind:showcommenteditor="showcommenteditor1"
bind:playvideo="playvideo" bind:playvideo="playvideo"
> >
</clock-item> </clock-item>
</view> </view>
</view> </view>
<view class="more-btn-click" bindtap="nextClockList" wx:if="{{maxShowClock<=clockTotal}}"> <view class="more-btn-click" bindtap="nextClockList" wx:if="{{clockList.length<clockTotal}}">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform"> <form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button> <button form-type="submit" class="createidbutton">生成form</button>
</form> </form>
......
...@@ -366,7 +366,6 @@ ...@@ -366,7 +366,6 @@
bottom: 0; bottom: 0;
} }
.introduce{ .introduce{
padding:0 0 44rpx 0;
background: #fff; background: #fff;
} }
.introduce .title{ .introduce .title{
...@@ -582,13 +581,8 @@ ...@@ -582,13 +581,8 @@
padding:20rpx 0 0 0; padding:20rpx 0 0 0;
} }
.content .clock-box{
border-bottom: 15rpx solid #F7F7F9;
}
.content .clock-box:last-of-type{
border-bottom: 0;
}
.goWebsiteindex-box{ .goWebsiteindex-box{
margin-top: 44rpx;
padding: 37rpx 0 40rpx 0; padding: 37rpx 0 40rpx 0;
background: #fff; background: #fff;
} }
......
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