fbda758c by simon

默认提交

1 parent 8fa3e323
......@@ -36,9 +36,6 @@ Page({
isInit: false
})
return new Promise((resolve, reject) => {
this.setData({
rankInfo: {}
})
let status = this.data.status;
app.post({
url: app.api.activity,
......@@ -46,17 +43,11 @@ Page({
key: status
}
}).then((result) => {
// console.log("result:", result)
let rankInfo = this.formatRankInfo(result, status);
// console.log("rankInfo:", rankInfo)
this.setData({
isInit: true
})
if (rankInfo) {
this.setData({
isInit: true,
rankInfo: rankInfo
})
}
});
console.log("rankInfo 1:", rankInfo);
resolve();
})
......@@ -64,16 +55,13 @@ Page({
},
/**
* 推广积分排行
* 历史积分排行
*/
queryActivityHistory() {
this.setData({
isInit: false
})
return new Promise((resolve, reject) => {
this.setData({
rankInfo: {}
})
let status = this.data.status;
app.post({
url: app.api.activityHistory,
......@@ -88,7 +76,7 @@ Page({
isInit: true,
historyRankInfoList: historyRankInfoList
})
console.log("rankInfo 2:", historyRankInfoList);
console.log("rankInfo 2 history:", historyRankInfoList);
this.setHistory();
resolve();
})
......
......@@ -112,6 +112,7 @@ $contentWidth:690px;
color: #666666;
font-size: 24px;
padding: 5px 0;
width: 100%;
}
.t2 {}
......
......@@ -17,18 +17,19 @@
</view>
<!-- 排行 -->
<view class="border rank">
<block wx:if="{{rankInfo && rankInfo.memberList.length > 0}}">
<!-- <block wx:if="{{rankInfo && rankInfo.memberList.length > 0}}"> -->
<!-- 功能区 -->
<view class="rank-func">
<view class="rank-func-item">
<!-- 本轮 -->
<view wx:if="{{turnsIndex == 0}}" class="pubish">
<view class="t1">
本轮周期:
<span>{{rankInfo.activityName}}</span>
<span>{{rankInfo.activityName || '-' }}</span>
</view>
<view wx:if="{{status == 'promotion'}}" class="t1 t2">
本轮奖品:
<span class="c1">{{rankInfo.prizeName}}</span>
<span class="c1">{{rankInfo.prizeName || '-'}}</span>
</view>
<view wx:if="{{status == 'rank'}}" class="t1 t2">
我的名次:
......@@ -36,11 +37,12 @@
</view>
</view>
<!-- 历史 -->
<view wx:else class="pubish">
<picker value="{{historyIndex}}" range="{{historyRankInfoList}}" range-key="activityName" bindchange="bindHistoryChange">
<view class="func">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-sign-record.png" />
{{rankInfo.activityName}}
{{rankInfo.activityName || '-'}}
<image class="arrow" mode="aspectFit" src="../../image/icon/icon-filter-down-on.png" />
{{dateStart}}
</view>
......@@ -56,6 +58,7 @@
</view>
</view>
</view>
<block wx:if="{{rankInfo}}">
<!-- 标题 -->
<view class="tit">
<view class="tt t1">名次</view>
......@@ -95,7 +98,6 @@
</block>
<block wx:else>
<view class="empty-tips" wx:if="{{isInit}}">
<!-- <span class="iconfont iconempty"></span> -->
<view class="tips">暂未开启积分排行,敬请期待</view>
</view>
</block>
......