Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
zhiliang-light-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fbda758c
authored
2019-10-22 15:24:12 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
8fa3e323
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
21 deletions
src/pages/rank/rank.js
src/pages/rank/rank.scss
src/pages/rank/rank.wxml
src/pages/rank/rank.js
View file @
fbda758
...
...
@@ -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
();
})
...
...
src/pages/rank/rank.scss
View file @
fbda758
...
...
@@ -112,6 +112,7 @@ $contentWidth:690px;
color
:
#666666
;
font-size
:
24px
;
padding
:
5px
0
;
width
:
100%
;
}
.t2
{}
...
...
src/pages/rank/rank.wxml
View file @
fbda758
...
...
@@ -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>
...
...
Please
register
or
sign in
to post a comment