Commit ad3ed533 authored by lvtz's avatar lvtz

fix

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