Commit 46c757f6 by 李嘉林

资讯列表滚动数据处理

parent 653b8383
<!-- 活动列表item -->
<view
class="activityListItem"
wx:if="{{!datas.isEnd}}"
bindtap="toActivity"
>
<view class="activityListItem" bindtap="toActivity">
<view class="title">
{{datas.singleItemActivityName}}
</view>
......
......@@ -220,10 +220,10 @@ const componentOptions = {
new Date().getTime() <=
0
) {
item.isEnd = true;
// item.isEnd = true;
hideNum += 1;
} else {
item.isEnd = false;
// item.isEnd = false;
}
item.startTimeTimeStamp =
new Date(item.startTime.replace(/-/g, "/")).getTime() -
......@@ -239,9 +239,11 @@ const componentOptions = {
new Date().getTime()
? true
: false;
console.log(item.isEnd, "-----------------------213");
});
this.setData({ "datas.componentData.actList": list });
let newList = list.filter((item) => {
return new Date(item.endTime.replace(/-/g, "/")).getTime() - new Date().getTime() > 0;
})
this.setData({ "datas.componentData.actList": newList });
if (hideNum == actList.length) {
this.setData({ hideAll: true });
}
......
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