Authored by 肖亚东

选中的活动 刷新问题修改

... ... @@ -35,17 +35,16 @@ Page({
let data = json.data;
let days = data.days;
let list = data.list;
let select = 0;
let select = that.data.select;
let curActivityList = [];
let curActivityList = []
if (days.length > 0) {
let selectDay = days[0];
if (select < days.length) {
let selectDay = days[select];
curActivityList = list[selectDay]
}
that.setData({
days,
list,
select,
curActivityList
})
}
... ... @@ -71,7 +70,7 @@ Page({
url: '/pages/activity/activityDetail?id=' + articleId
});
},
applyAction(e) {
let activityId = e.detail.activityId;
let curActivityList = this.data.curActivityList;
... ...
... ... @@ -39,31 +39,33 @@
</block>
<!-- 我的活动 -->
<view class="space-view"></view>
<section-header title="我的活动" more-title="更多活动" has-more="{{onActivityList.length || offActivityList.length}}" bind:tapMore="jumpMoreActivity"></section-header>
<block wx:if="{{myActivityList.length == 0}}">
<undone-view undone-data="{{notJionActivity}}" bind:tapButton="tapButton"></undone-view>
</block>
<block wx:else>
<scroll-view scroll-y class="activity-list">
<!-- 正在进行的活动 -->
<block wx:for="{{onActivityList}}" wx:key="index">
<activity-item data="{{item}}" bind:jumpActivityetail="jumpActivityetail"></activity-item>
<view wx:if="{{index!=onActivityList.length-1}}" class="space-view40"></view>
</block>
<view class="end-space-view" wx:if="{{offActivityList.length}}">
<view class="left-line"></view>
<view class="end">已结束</view>
<view class="right-line"></view>
</view>
<!-- 已结束的活动 -->
<block wx:for="{{offActivityList}}" wx:key="index">
<activity-item data="{{item}}" bind:jumpActivityetail="jumpActivityetail"></activity-item>
<view wx:if="{{index!=offActivityList.length-1}}" class="space-view40"></view>
</block>
</scroll-view>
<block wx:if="{{onActivityList.length || offActivityList.length}}">
<view class="space-view"></view>
<section-header title="我的活动" more-title="更多活动" has-more="{{onActivityList.length || offActivityList.length}}" bind:tapMore="jumpMoreActivity"></section-header>
<block wx:if="{{myActivityList.length == 0}}">
<undone-view undone-data="{{notJionActivity}}" bind:tapButton="tapButton"></undone-view>
</block>
<block wx:else>
<scroll-view scroll-y class="activity-list">
<!-- 正在进行的活动 -->
<block wx:for="{{onActivityList}}" wx:key="index">
<activity-item data="{{item}}" bind:jumpActivityetail="jumpActivityetail"></activity-item>
<view wx:if="{{index!=onActivityList.length-1}}" class="space-view40"></view>
</block>
<view class="end-space-view" wx:if="{{offActivityList.length}}">
<view class="left-line"></view>
<view class="end">已结束</view>
<view class="right-line"></view>
</view>
<!-- 已结束的活动 -->
<block wx:for="{{offActivityList}}" wx:key="index">
<activity-item data="{{item}}" bind:jumpActivityetail="jumpActivityetail"></activity-item>
<view wx:if="{{index!=offActivityList.length-1}}" class="space-view40"></view>
</block>
</scroll-view>
</block>
</block>
</block>
... ...