Browse Source

no message

feature/v1.1.0
xpz2018 7 years ago
parent
commit
0812b2ea63
3 changed files with 29 additions and 4 deletions
  1. 10
      pages/activity_list/activity_list.js
  2. 7
      pages/activity_list/activity_list.wxml
  3. 16
      pages/activity_list/activity_list.wxss

10
pages/activity_list/activity_list.js

@ -6,6 +6,7 @@ Page({
* 页面的初始数据
*/
data: {
loading: true,
repos: [],
pageNum: 1,
pageSize: 10,
@ -54,12 +55,14 @@ Page({
//最后一页数据添加
that.setData({
repos: lists.concat(respList),
loading: false,
hasMoreData: false
});
} else {
that.setData({
repos: lists.concat(respList),
hasMoreData: true,
loading: false,
pageNum: that.data.pageNum + 1
});
}
@ -69,6 +72,9 @@ Page({
icon: 'none',
duration: 1000
});
that.setData({
loading: false,
});
}
},
fail: function (e) {
@ -78,9 +84,13 @@ Page({
icon: 'none',
duration: 1000
});
that.setData({
loading: false,
});
},
complete: function (res) {
// complete
that.data.loading = false
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},

7
pages/activity_list/activity_list.wxml

@ -1,6 +1,6 @@
<!--pages/activity_list/activity_list.wxml-->
<view wx:if="{{repos.length > 0}}">
<view wx:for="{{repos}}" wx:key="">
<view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active" bindtap="itemClick" data-activityNo="{{item.activityNo}}" data-groupNo="{{item.groupNo}}">
@ -29,8 +29,9 @@
</view>
</view>
<view wx:else>
<view wx:if="{{repos.length <= 0 && !loading}}">
<view class="empty-layout">
<text>亲,您还没有参加任何活动!</text>
<image class="icon-empty" src="../../images/空.png" />
<text class="text-empty">亲,您还没有参加任何活动!</text>
</view>
</view>

16
pages/activity_list/activity_list.wxss

@ -87,6 +87,8 @@
vertical-align: top;
}
.weui-media-box__type{
width: 90rpx;
height: 40rpx;
@ -136,9 +138,21 @@
.empty-layout {
width: 100%;
height: 100%;
padding-top: 65%;
padding-top: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.icon-empty {
width: 80px;
height: 80px;
vertical-align: top;
margin-bottom: 40px;
}
.text-empty {
font-size: 15px;
float: left;
}
Loading…
Cancel
Save