Commit d6a5718e by 谢中龙

首页招募榜加载样式

parent b315edf7
...@@ -12,7 +12,8 @@ wxService.page({ ...@@ -12,7 +12,8 @@ wxService.page({
store : [], store : [],
rankList:[], rankList:[],
storeList:[], storeList:[],
defaultAvatar: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_default_logo.png' defaultAvatar: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_default_logo.png',
loadingText : '数据加载中...'
}, },
/** /**
...@@ -35,6 +36,7 @@ wxService.page({ ...@@ -35,6 +36,7 @@ wxService.page({
onShow: function () { onShow: function () {
this.getRecruitRanking() // 招募榜 this.getRecruitRanking() // 招募榜
}, },
//获取排行榜
getRecruitRanking() { getRecruitRanking() {
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
...@@ -44,9 +46,15 @@ wxService.page({ ...@@ -44,9 +46,15 @@ wxService.page({
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
wx.hideLoading() wx.hideLoading()
let list = data ? data : [];
if(list.length == 0){
this.data.loadingText = '暂无榜单~';
}
this.setData({ this.setData({
rankList: data || [] rankList: list,
}) loadingText : this.data.loadingText
});
} }
} }
}) })
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</view> </view>
</block> </block>
</view> </view>
<view class="no-list" wx:else>暂无榜单</view> <view class="no-list" wx:else>{{loadingText}}</view>
</view> </view>
<!-- 门店榜单 --> <!-- 门店榜单 -->
<view class='list' wx:if="{{current == 2}}"> <view class='list' wx:if="{{current == 2}}">
......
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