no message
Showing
17 changed files
with
362 additions
and
103 deletions
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | "pages/index/index", | ||
3 | "pages/user-center/user-center", | 4 | "pages/user-center/user-center", |
4 | "pages/gift-shop/gift-shop", | 5 | "pages/gift-shop/gift-shop", |
5 | "pages/index/index", | ||
6 | "pages/gift-detail/gift-detail", | 6 | "pages/gift-detail/gift-detail", |
7 | "pages/scan-result/scan-result", | 7 | "pages/scan-result/scan-result", |
8 | "pages/contact/contact", | 8 | "pages/contact/contact", | ... | ... |
... | @@ -6,7 +6,7 @@ Component({ | ... | @@ -6,7 +6,7 @@ Component({ |
6 | // 这里定义了innerText属性,属性值可以在组件使用时指定 | 6 | // 这里定义了innerText属性,属性值可以在组件使用时指定 |
7 | innerText: { | 7 | innerText: { |
8 | type: String, | 8 | type: String, |
9 | value: 'default value', | 9 | value: '这里空空如也~', |
10 | }, | 10 | }, |
11 | emptyVisible: { | 11 | emptyVisible: { |
12 | type: Boolean, | 12 | type: Boolean, | ... | ... |
1 | <view class="empty-tips" > | 1 | <view class="empty-tips" > |
2 | <view class="tips"> | 2 | <view class="tips"> |
3 | <span class="iconfont iconempty"></span> | 3 | <span class="iconfont iconempty"></span> |
4 | <view class="tips">这里空空如也~</view> | 4 | <view class="tips">{{innerText}}</view> |
5 | </view> | 5 | </view> |
6 | </view> | 6 | </view> | ... | ... |
... | @@ -2,16 +2,16 @@ | ... | @@ -2,16 +2,16 @@ |
2 | <view class="cspace"></view> | 2 | <view class="cspace"></view> |
3 | <view class="cont"> | 3 | <view class="cont"> |
4 | <view class="tit tit1">在190701-190714周期中</view> | 4 | <view class="tit tit1">在190701-190714周期中</view> |
5 | <view class="tit tit2">推广积分排行第一名</view> | 5 | <view class="tit tit2">{{item.activityName}}</view> |
6 | <view class="tit tit3">恭喜获得88元现金红包</view> | 6 | <view class="tit tit3">{{item.prizeName}}</view> |
7 | <!-- 红包 --> | 7 | <!-- 红包 --> |
8 | <!-- <block> | 8 | <block wx:if="{{item.prizeType == 'packet'}}"> |
9 | <image class="prize" mode="aspectFit" src="../../image/prize/prize-red-package.png" /> | 9 | <image class="prize" mode="aspectFit" src="../../image/prize/prize-red-package.png" /> |
10 | <view></view> | 10 | <view></view> |
11 | <text class="tips">经后台审核通过后,红包将通过公众号消息或微信服务消息发放,届时请及时领取!</text> | 11 | <text class="tips">经后台审核通过后,红包将通过公众号消息或微信服务消息发放,届时请及时领取!</text> |
12 | </block> --> | 12 | </block> |
13 | <!-- 积分 --> | 13 | <!-- 积分 --> |
14 | <block> | 14 | <block wx:else> |
15 | <image class="prize" mode="aspectFit" src="../../image/prize/prize-integral.png" /> | 15 | <image class="prize" mode="aspectFit" src="../../image/prize/prize-integral.png" /> |
16 | <view></view> | 16 | <view></view> |
17 | <text class="tips">后台审核通过后,积分将会直接派送到您的账户上,可在积分明细中查看!</text> | 17 | <text class="tips">后台审核通过后,积分将会直接派送到您的账户上,可在积分明细中查看!</text> | ... | ... |
... | @@ -43,7 +43,7 @@ | ... | @@ -43,7 +43,7 @@ |
43 | <view class="border focus"> | 43 | <view class="border focus"> |
44 | <image bindtap="onPreviewImageHandler" class="qrcode" mode="widthFix" src="{{qrcodeUrl}}" /> | 44 | <image bindtap="onPreviewImageHandler" class="qrcode" mode="widthFix" src="{{qrcodeUrl}}" /> |
45 | <view class="tips">更多讯息,欢迎关注我们的公众号</view> | 45 | <view class="tips">更多讯息,欢迎关注我们的公众号</view> |
46 | <view bindtap="onPreviewImageHandler" class="btn">一键关注</view> | 46 | <!-- <view bindtap="onPreviewImageHandler" class="btn">一键关注</view> --> |
47 | </view> | 47 | </view> |
48 | </view> | 48 | </view> |
49 | </view> | 49 | </view> |
... | @@ -51,3 +51,4 @@ | ... | @@ -51,3 +51,4 @@ |
51 | <van-popup show="{{ authorizeVisible }}"> | 51 | <van-popup show="{{ authorizeVisible }}"> |
52 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | 52 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> |
53 | </van-popup> | 53 | </van-popup> |
54 | ... | ... |
... | @@ -100,21 +100,24 @@ Page({ | ... | @@ -100,21 +100,24 @@ Page({ |
100 | success(res) { | 100 | success(res) { |
101 | // 扫码结果 | 101 | // 扫码结果 |
102 | let result = res.result; | 102 | let result = res.result; |
103 | console.log("res:", res); | 103 | let { |
104 | wx.showToast({ | 104 | qrCodeCode, |
105 | title: "res:" + res.result, | 105 | memberCode |
106 | icon: "none" | 106 | } = result; |
107 | }) | 107 | // wx.showToast({ |
108 | // title: "res:" + res.result, | ||
109 | // icon: "none" | ||
110 | // }) | ||
108 | }, | 111 | }, |
109 | fail(err) { | 112 | fail(err) { |
110 | console.log("err:", err); | 113 | console.log("err:", err); |
111 | wx.showToast({ | ||
112 | title: "err:" + res.result, | ||
113 | icon: "none" | ||
114 | }) | ||
115 | } | 114 | } |
116 | }) | 115 | }) |
117 | }, | 116 | }, |
117 | |||
118 | // | ||
119 | |||
120 | |||
118 | hideMask() { | 121 | hideMask() { |
119 | this.setData({ | 122 | this.setData({ |
120 | productDetailVisible: false | 123 | productDetailVisible: false | ... | ... |
... | @@ -95,6 +95,7 @@ | ... | @@ -95,6 +95,7 @@ |
95 | </view> | 95 | </view> |
96 | </view> | 96 | </view> |
97 | <empty-tips wx:if="{{dataList.length <= 0}}"></empty-tips> | 97 | <empty-tips wx:if="{{dataList.length <= 0}}"></empty-tips> |
98 | |||
98 | </view> | 99 | </view> |
99 | </view> | 100 | </view> |
100 | <van-popup show="{{ authorizeVisible }}"> | 101 | <van-popup show="{{ authorizeVisible }}"> | ... | ... |
... | @@ -18,6 +18,7 @@ Page({ | ... | @@ -18,6 +18,7 @@ Page({ |
18 | }, | 18 | }, |
19 | initData() { | 19 | initData() { |
20 | this.queryMember().then((result) => { | 20 | this.queryMember().then((result) => { |
21 | |||
21 | }); | 22 | }); |
22 | }, | 23 | }, |
23 | /** | 24 | /** |
... | @@ -29,13 +30,15 @@ Page({ | ... | @@ -29,13 +30,15 @@ Page({ |
29 | url: app.api.member, | 30 | url: app.api.member, |
30 | data: {} | 31 | data: {} |
31 | }).then((result) => { | 32 | }).then((result) => { |
33 | let userInfo = result | ||
32 | this.setData({ | 34 | this.setData({ |
33 | userInfo: result | 35 | userInfo |
34 | }) | 36 | }) |
35 | 37 | ||
38 | let tlMemberCode = userInfo.memberCode; | ||
36 | // 设置二维码 | 39 | // 设置二维码 |
37 | let qrSize = this.setCanvasSize(440); | 40 | let qrSize = this.setCanvasSize(440); |
38 | let codeContent = "xxx"; | 41 | let codeContent = `tlMemberCode=${tlMemberCode}` |
39 | this.createQrCode(codeContent, 'qrcanvas', qrSize.w, qrSize.h); | 42 | this.createQrCode(codeContent, 'qrcanvas', qrSize.w, qrSize.h); |
40 | 43 | ||
41 | resolve(); | 44 | resolve(); | ... | ... |
... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
9 | <view class="nickname">{{userInfo.nickname}}</view> | 9 | <view class="nickname">{{userInfo.nickname}}</view> |
10 | <!-- <image class="qrcode" mode="widthFix" src="../../image/icon/icon-default-qrcode.png" /> --> | 10 | <!-- <image class="qrcode" mode="widthFix" src="../../image/icon/icon-default-qrcode.png" /> --> |
11 | <image wx:if="{{qrImagePath}}" class="qrcode" mode="widthFix" src="{{qrImagePath}}" /> | 11 | <image wx:if="{{qrImagePath}}" class="qrcode" mode="widthFix" src="{{qrImagePath}}" /> |
12 | <canvas wx:else class="qrcode" canvas-id="qrcanvas" /> | 12 | <canvas wx:else class="qrcode" style="visibility: hidden;" canvas-id="qrcanvas" /> |
13 | <view class="t1">深士照明</view> | 13 | <view class="t1">深士照明</view> |
14 | <view class="t1 t2">扫码即获专属积分,兑换超值奖品</view> | 14 | <view class="t1 t2">扫码即获专属积分,兑换超值奖品</view> |
15 | </view> | 15 | </view> | ... | ... |
1 | import { | ||
2 | getBindtapData | ||
3 | } from '../../utils/util'; | ||
4 | |||
1 | let app = getApp(); | 5 | let app = getApp(); |
2 | Page({ | 6 | Page({ |
3 | data: { | 7 | data: { |
4 | authorizeVisible: false, | 8 | authorizeVisible: false, |
5 | giftRankTipsCompVisible: true, | 9 | giftRankTipsCompVisible: false, |
10 | total: 0, | ||
11 | page: 1, | ||
12 | size: 10, | ||
13 | dataList: [], | ||
14 | item: {} | ||
6 | }, | 15 | }, |
7 | onShareAppMessage() {}, | 16 | onShareAppMessage() {}, |
8 | showAuth() { | 17 | showAuth() { |
... | @@ -10,7 +19,78 @@ Page({ | ... | @@ -10,7 +19,78 @@ Page({ |
10 | authorizeVisible: true | 19 | authorizeVisible: true |
11 | }) | 20 | }) |
12 | }, | 21 | }, |
13 | onLoad(options) {}, | 22 | onLoad(options) { |
23 | this.initData(); | ||
24 | }, | ||
25 | |||
26 | initData() { | ||
27 | this.queryActivityPrize(); | ||
28 | }, | ||
29 | |||
30 | // 到达底部 | ||
31 | onReachBottom() { | ||
32 | if (this.data.dataList.length < this.data.total) { | ||
33 | this.setData({ | ||
34 | page: this.data.page + 1 | ||
35 | }); | ||
36 | this.queryOrder(); | ||
37 | } | ||
38 | }, | ||
39 | |||
40 | // 重置页面列表 点击搜索条件时需要 | ||
41 | resetPage() { | ||
42 | this.setData({ | ||
43 | page: 1, | ||
44 | dataList: [] | ||
45 | }) | ||
46 | }, | ||
47 | |||
48 | /** | ||
49 | * 排行奖励明细 | ||
50 | */ | ||
51 | queryActivityPrize() { | ||
52 | return new Promise((resolve, reject) => { | ||
53 | app.post({ | ||
54 | url: app.api.activityPrize, | ||
55 | data: { | ||
56 | page: this.data.page, | ||
57 | size: this.data.size, | ||
58 | } | ||
59 | }).then((result) => { | ||
60 | let dataList = result.list; | ||
61 | dataList = this.data.dataList.concat(dataList); | ||
62 | this.setData({ | ||
63 | dataList: dataList, | ||
64 | total: result.total | ||
65 | }) | ||
66 | resolve(); | ||
67 | }) | ||
68 | }); | ||
69 | }, | ||
70 | |||
71 | /** | ||
72 | * 领取奖励 | ||
73 | * @param {*} evt | ||
74 | */ | ||
75 | onReceiveHandler(evt) { | ||
76 | let curData = getBindtapData(evt); | ||
77 | let curIndex = getBindtapData(evt, "index"); | ||
78 | let dataList = this.data.dataList; | ||
79 | app.post({ | ||
80 | url: app.api.activityPrizeGet, | ||
81 | data: { | ||
82 | activityCode: curData.activityCode | ||
83 | } | ||
84 | }).then((result) => { | ||
85 | dataList[curIndex].acceptType = 1; | ||
86 | this.setData({ | ||
87 | dataList: dataList, | ||
88 | item: curData, | ||
89 | giftRankTipsCompVisible: true | ||
90 | }) | ||
91 | }) | ||
92 | }, | ||
93 | |||
14 | // 隐藏蒙层 | 94 | // 隐藏蒙层 |
15 | hideMask() { | 95 | hideMask() { |
16 | this.setData({ | 96 | this.setData({ | ... | ... |
... | @@ -5,7 +5,20 @@ | ... | @@ -5,7 +5,20 @@ |
5 | <view class="top-space"></view> | 5 | <view class="top-space"></view> |
6 | <view class="content"> | 6 | <view class="content"> |
7 | <view class="gift"> | 7 | <view class="gift"> |
8 | <view class="border gift-item"> | 8 | <view wx:for="{{dataList}}" wx:key="{{index}}" class="border gift-item"> |
9 | <view class="prize"> | ||
10 | <image wx:if="{{item.prizeType == 'packet'}}" class="image" mode="aspectFit" src="../../image/icon/icon-gift-red-package.png" /> | ||
11 | <image wx:else class="image" mode="aspectFit" src="../../image/icon/icon-gift-integral.png" /> | ||
12 | </view> | ||
13 | <view class="cont"> | ||
14 | <view class="t1">{{item.prizeName}}</view> | ||
15 | <view class="t1 t2">190701-190714</view> | ||
16 | <view class="t1 t3">{{item.activityName}}</view> | ||
17 | </view> | ||
18 | <view bindtap="onReceiveHandler" wx:if="{{item.acceptType == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn">领取</view> | ||
19 | <view wx:if="{{item.acceptType == 1}}" class="btn">已领取</view> | ||
20 | </view> | ||
21 | <!-- <view class="border gift-item"> | ||
9 | <view class="prize"> | 22 | <view class="prize"> |
10 | <image class="image" mode="aspectFit" src="../../image/icon/icon-gift-red-package.png" /> | 23 | <image class="image" mode="aspectFit" src="../../image/icon/icon-gift-red-package.png" /> |
11 | </view> | 24 | </view> |
... | @@ -25,15 +38,16 @@ | ... | @@ -25,15 +38,16 @@ |
25 | <view class="t1 t2">190701-190714</view> | 38 | <view class="t1 t2">190701-190714</view> |
26 | <view class="t1 t3">推广积分排行第一名</view> | 39 | <view class="t1 t3">推广积分排行第一名</view> |
27 | </view> | 40 | </view> |
28 | <view class="btn">领取</view> | 41 | <view class="btn disable">已领取</view> |
29 | </view> | 42 | </view> --> |
30 | </view> | 43 | </view> |
31 | </view> | 44 | </view> |
45 | <empty-tips inner-text="还没活动奖励哦~" wx:if="{{dataList.length <= 0}}"></empty-tips> | ||
32 | </view> | 46 | </view> |
33 | </view> | 47 | </view> |
34 | <van-popup show="{{ authorizeVisible }}"> | 48 | <van-popup show="{{ authorizeVisible }}"> |
35 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | 49 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> |
36 | </van-popup> | 50 | </van-popup> |
37 | <van-popup show="{{ giftRankTipsCompVisible }}"> | 51 | <van-popup show="{{ giftRankTipsCompVisible }}"> |
38 | <gift-rank-tips-comp bind:evtcomp="evtcomp"></gift-rank-tips-comp> | 52 | <gift-rank-tips-comp bind:evtcomp="evtcomp" item="{{item}}"></gift-rank-tips-comp> |
39 | </van-popup> | 53 | </van-popup> | ... | ... |
... | @@ -7,6 +7,12 @@ Page({ | ... | @@ -7,6 +7,12 @@ Page({ |
7 | data: { | 7 | data: { |
8 | authorizeVisible: false, | 8 | authorizeVisible: false, |
9 | navIndex: 0, | 9 | navIndex: 0, |
10 | status: "promotion", | ||
11 | turnsIndex: 0, //轮次 0:本轮 1:历史 | ||
12 | rankInfo: {}, | ||
13 | |||
14 | historyRankInfoList: [], | ||
15 | historyIndex: 0, | ||
10 | }, | 16 | }, |
11 | onShareAppMessage() {}, | 17 | onShareAppMessage() {}, |
12 | showAuth() { | 18 | showAuth() { |
... | @@ -14,9 +20,100 @@ Page({ | ... | @@ -14,9 +20,100 @@ Page({ |
14 | authorizeVisible: true | 20 | authorizeVisible: true |
15 | }) | 21 | }) |
16 | }, | 22 | }, |
17 | onLoad(options) {}, | 23 | onLoad(options) { |
24 | this.initData(); | ||
25 | }, | ||
18 | initData() { | 26 | initData() { |
27 | this.refreshStatus(); | ||
28 | }, | ||
29 | |||
30 | /** | ||
31 | * 推广积分排行 | ||
32 | */ | ||
33 | queryActivity() { | ||
34 | return new Promise((resolve, reject) => { | ||
35 | this.setData({ | ||
36 | rankInfo: {} | ||
37 | }) | ||
38 | let status = this.data.status; | ||
39 | app.post({ | ||
40 | url: app.api.activity, | ||
41 | data: { | ||
42 | key: status | ||
43 | } | ||
44 | }).then((result) => { | ||
45 | let rankInfo = this.formatRankInfo(result, status); | ||
46 | this.setData({ | ||
47 | rankInfo: rankInfo | ||
48 | }) | ||
49 | resolve(); | ||
50 | }) | ||
51 | }); | ||
52 | }, | ||
53 | |||
54 | /** | ||
55 | * 推广积分排行 | ||
56 | */ | ||
57 | queryActivityHistory() { | ||
58 | return new Promise((resolve, reject) => { | ||
59 | this.setData({ | ||
60 | rankInfo: {} | ||
61 | }) | ||
62 | let status = this.data.status; | ||
63 | app.post({ | ||
64 | url: app.api.activityHistory, | ||
65 | data: { | ||
66 | page: 1, | ||
67 | size: 999999, | ||
68 | key: this.data.status | ||
69 | } | ||
70 | }).then((result) => { | ||
71 | let historyRankInfoList = result.list; | ||
72 | this.setData({ | ||
73 | historyRankInfoList: historyRankInfoList | ||
74 | }) | ||
75 | console.log("historyRankInfoList:", historyRankInfoList); | ||
76 | this.setHistory(); | ||
77 | resolve(); | ||
78 | }) | ||
79 | }); | ||
80 | }, | ||
81 | |||
82 | /** | ||
83 | * 格式化 | ||
84 | */ | ||
85 | formatRankInfo(val, status) { | ||
86 | let rankInfo = val; | ||
87 | if (status == "promotion") { | ||
88 | rankInfo.myMember.rank = rankInfo.myMember.promotionNo; | ||
89 | rankInfo.myMember.points = rankInfo.myMember.promotionPoints; | ||
90 | rankInfo.memberList.forEach(element => { | ||
91 | element.rank = element.promotionNo; | ||
92 | element.points = element.promotionPoints; | ||
93 | }); | ||
94 | } else { | ||
95 | rankInfo.myMember.rank = rankInfo.myMember.rankNo; | ||
96 | rankInfo.myMember.points = rankInfo.myMember.rankPoints; | ||
97 | rankInfo.memberList.forEach(element => { | ||
98 | element.rank = element.rankNo; | ||
99 | element.points = element.rankPoints; | ||
100 | }); | ||
101 | } | ||
102 | return rankInfo; | ||
103 | }, | ||
19 | 104 | ||
105 | /** | ||
106 | * 设置 | ||
107 | */ | ||
108 | setHistory() { | ||
109 | let index = this.data.historyIndex; | ||
110 | let status = this.data.status; | ||
111 | let historyRankInfoList = this.data.historyRankInfoList | ||
112 | let rankInfo = this.formatRankInfo(historyRankInfoList[index], status); | ||
113 | this.setData({ | ||
114 | rankInfo | ||
115 | }) | ||
116 | console.log("rankInfo:", rankInfo); | ||
20 | }, | 117 | }, |
21 | 118 | ||
22 | /** | 119 | /** |
... | @@ -28,11 +125,66 @@ Page({ | ... | @@ -28,11 +125,66 @@ Page({ |
28 | let curIndex = getBindtapData(evt, "index"); | 125 | let curIndex = getBindtapData(evt, "index"); |
29 | if (navIndex != curIndex) { | 126 | if (navIndex != curIndex) { |
30 | this.setData({ | 127 | this.setData({ |
31 | navIndex: curIndex | 128 | navIndex: curIndex, |
129 | turnsIndex: 0, | ||
130 | historyIndex: 0, | ||
131 | }) | ||
132 | } | ||
133 | this.refreshStatus(); | ||
134 | }, | ||
135 | |||
136 | // 选择轮次 历史/本轮 | ||
137 | onChangeTurnsHandler(evt) { | ||
138 | let turnsIndex = this.data.turnsIndex; | ||
139 | let curIndex = getBindtapData(evt, "index"); | ||
140 | if (turnsIndex != curIndex) { | ||
141 | this.setData({ | ||
142 | turnsIndex: curIndex | ||
143 | }); | ||
144 | this.queryActivityHistory(); | ||
145 | } | ||
146 | |||
147 | }, | ||
148 | |||
149 | /** | ||
150 | * 拾取历史活动 | ||
151 | */ | ||
152 | bindHistoryChange(e) { | ||
153 | let index = e.detail.value; | ||
154 | this.setData({ | ||
155 | historyIndex: index, | ||
32 | }) | 156 | }) |
157 | this.setHistory() | ||
158 | }, | ||
159 | |||
160 | /** | ||
161 | * 刷新状态重新请求 | ||
162 | */ | ||
163 | refreshStatus() { | ||
164 | let status = ""; | ||
165 | let navIndex = this.data.navIndex + ""; | ||
166 | switch (navIndex) { | ||
167 | // 全部 | ||
168 | case "0": | ||
169 | status = "promotion"; | ||
170 | break; | ||
171 | |||
172 | // 购买积分 | ||
173 | case "1": | ||
174 | status = "rank"; | ||
175 | break; | ||
176 | |||
177 | default: | ||
178 | break; | ||
33 | } | 179 | } |
180 | this.setData({ | ||
181 | status: status | ||
182 | }) | ||
183 | // this.resetPage(); | ||
184 | this.queryActivity(); | ||
34 | }, | 185 | }, |
35 | 186 | ||
187 | |||
36 | /** | 188 | /** |
37 | * 排行榜奖励 | 189 | * 排行榜奖励 |
38 | * @param {*} evt | 190 | * @param {*} evt | ... | ... |
... | @@ -79,11 +79,35 @@ $contentWidth:690px; | ... | @@ -79,11 +79,35 @@ $contentWidth:690px; |
79 | &-item { | 79 | &-item { |
80 | width: 50%; | 80 | width: 50%; |
81 | 81 | ||
82 | // .pubish { | 82 | // 本轮排行 |
83 | .pubish { | ||
83 | display: flex; | 84 | display: flex; |
84 | align-items: center; | 85 | align-items: center; |
85 | flex-wrap: wrap; | 86 | flex-wrap: wrap; |
86 | 87 | ||
88 | .func { | ||
89 | @extend .fcc; | ||
90 | height: 80px; | ||
91 | font-size: 32px; | ||
92 | color: #3680EB; | ||
93 | background: #F5F8FE; | ||
94 | border-radius: 8px; | ||
95 | @extend .bb; | ||
96 | padding: 0 12px; | ||
97 | |||
98 | .icon { | ||
99 | width: 32px; | ||
100 | height: 32px; | ||
101 | margin: 0 8px; | ||
102 | } | ||
103 | |||
104 | .arrow { | ||
105 | width: 12px; | ||
106 | height: 8px; | ||
107 | margin: 0 8px; | ||
108 | } | ||
109 | } | ||
110 | |||
87 | .t1 { | 111 | .t1 { |
88 | color: #666666; | 112 | color: #666666; |
89 | font-size: 24px; | 113 | font-size: 24px; |
... | @@ -100,7 +124,7 @@ $contentWidth:690px; | ... | @@ -100,7 +124,7 @@ $contentWidth:690px; |
100 | color: #3680EB; | 124 | color: #3680EB; |
101 | } | 125 | } |
102 | 126 | ||
103 | // } | 127 | } |
104 | 128 | ||
105 | .mode { | 129 | .mode { |
106 | width: 220px; | 130 | width: 220px; |
... | @@ -136,7 +160,7 @@ $contentWidth:690px; | ... | @@ -136,7 +160,7 @@ $contentWidth:690px; |
136 | } | 160 | } |
137 | 161 | ||
138 | .t2 { | 162 | .t2 { |
139 | margin-left: 172px; | 163 | margin-left: 150px; |
140 | } | 164 | } |
141 | 165 | ||
142 | .t3 { | 166 | .t3 { |
... | @@ -178,7 +202,7 @@ $contentWidth:690px; | ... | @@ -178,7 +202,7 @@ $contentWidth:690px; |
178 | 202 | ||
179 | .no { | 203 | .no { |
180 | width: 72px; | 204 | width: 72px; |
181 | padding-right: 76px; | 205 | padding-right: 54px; |
182 | @extend .fcc; | 206 | @extend .fcc; |
183 | // text-align: center; | 207 | // text-align: center; |
184 | // height: $itemHeight; | 208 | // height: $itemHeight; |
... | @@ -191,15 +215,19 @@ $contentWidth:690px; | ... | @@ -191,15 +215,19 @@ $contentWidth:690px; |
191 | } | 215 | } |
192 | 216 | ||
193 | .user { | 217 | .user { |
194 | flex: 1; | ||
195 | display: flex; | 218 | display: flex; |
196 | align-items: center; | 219 | align-items: center; |
197 | font-size: 32px; | 220 | font-size: 32px; |
221 | width: 300px; | ||
222 | // background-color: wheat; | ||
223 | @include no-wrap(); | ||
224 | overflow-x: hidden; | ||
198 | 225 | ||
199 | .avatar { | 226 | .avatar { |
200 | width: 72px; | 227 | width: 72px; |
201 | height: 72px; | 228 | height: 72px; |
202 | margin-right: 12px; | 229 | margin-right: 12px; |
230 | border-radius: 36px; | ||
203 | } | 231 | } |
204 | } | 232 | } |
205 | 233 | ||
... | @@ -225,7 +253,7 @@ $contentWidth:690px; | ... | @@ -225,7 +253,7 @@ $contentWidth:690px; |
225 | // 按钮容器 | 253 | // 按钮容器 |
226 | .btn-wrap { | 254 | .btn-wrap { |
227 | position: relative; | 255 | position: relative; |
228 | margin: 20px auto 0; | 256 | margin: 36px auto 0; |
229 | 257 | ||
230 | .btn { | 258 | .btn { |
231 | position: relative; | 259 | position: relative; | ... | ... |
1 | <view class="page"> | 1 | <view class="page"> |
2 | <view class="app__bgc bgc"></view> | 2 | <view class="app__bgc bgc"></view> |
3 | <!-- <view class="app__bg bg"></view> --> | ||
4 | <image class="bg" mode="widthFix" src="../../image/rank/rank-c1.png" /> | 3 | <image class="bg" mode="widthFix" src="../../image/rank/rank-c1.png" /> |
5 | <view class="app__content main"> | 4 | <view class="app__content main"> |
6 | <view class="top-space"></view> | 5 | <view class="top-space"></view> |
... | @@ -21,24 +20,39 @@ | ... | @@ -21,24 +20,39 @@ |
21 | <!-- 功能区 --> | 20 | <!-- 功能区 --> |
22 | <view class="rank-func"> | 21 | <view class="rank-func"> |
23 | <view class="rank-func-item"> | 22 | <view class="rank-func-item"> |
24 | <view class="pubish"> | 23 | <view wx:if="{{turnsIndex == 0}}" class="pubish"> |
25 | <view class="t1"> | 24 | <view class="t1"> |
26 | 本轮周期: | 25 | 本轮周期: |
27 | <span>7.1-7.14</span> | 26 | <span>{{rankInfo.activityName}}</span> |
28 | </view> | 27 | </view> |
29 | <!-- <view class="t1 t2"> | 28 | <view wx:if="{{status == 'promotion'}}" class="t1 t2"> |
30 | 本轮奖品: | 29 | 本轮奖品: |
31 | <span class="c1">88元红包</span> | 30 | <span class="c1">{{rankInfo.prizeName}}</span> |
32 | </view> --> | 31 | </view> |
33 | <view class="t1 t2"> | 32 | <view wx:if="{{status == 'rank'}}" class="t1 t2"> |
34 | 我的名次: | 33 | 我的名次: |
35 | <span class="c2">12</span> | 34 | <span class="c2">{{rankInfo.myMember.rank || '-'}}</span> |
36 | 名 | 35 | 名 |
37 | </view> | 36 | </view> |
38 | </view> | 37 | </view> |
38 | <view wx:else class="pubish"> | ||
39 | <picker value="{{historyIndex}}" range="{{historyRankInfoList}}" range-key="activityName" bindchange="bindHistoryChange"> | ||
40 | <view class="func"> | ||
41 | <image class="icon" mode="aspectFit" src="../../image/icon/icon-sign-record.png" /> | ||
42 | {{rankInfo.activityName}} | ||
43 | <image class="arrow" mode="aspectFit" src="../../image/icon/icon-filter-down-on.png" /> | ||
44 | {{dateStart}} | ||
45 | </view> | ||
46 | </picker> | ||
47 | </view> | ||
39 | </view> | 48 | </view> |
40 | <view class="rank-func-item pubish fje"> | 49 | <view class="rank-func-item pubish fje"> |
41 | <view class="mode">查看历史排行</view> | 50 | <view wx:if="{{turnsIndex == 0}}" data-index="1" bindtap="onChangeTurnsHandler" class="mode"> |
51 | 查看历史排行 | ||
52 | </view> | ||
53 | <view wx:if="{{turnsIndex == 1}}" data-index="0" bindtap="onChangeTurnsHandler" class="mode"> | ||
54 | 返回本轮排行 | ||
55 | </view> | ||
42 | </view> | 56 | </view> |
43 | </view> | 57 | </view> |
44 | <!-- 标题 --> | 58 | <!-- 标题 --> |
... | @@ -49,63 +63,16 @@ | ... | @@ -49,63 +63,16 @@ |
49 | </view> | 63 | </view> |
50 | <!-- 排行item --> | 64 | <!-- 排行item --> |
51 | <scroll-view bindscrolltolower="onRankScrolltolower" scroll-y="{{true}}" class="item-wrap"> | 65 | <scroll-view bindscrolltolower="onRankScrolltolower" scroll-y="{{true}}" class="item-wrap"> |
52 | <view class="rank-item rank-item-first"> | 66 | <view wx:for="{{rankInfo.memberList}}" wx:key="{{index}}" class="rank-item {{item.rank == '1' ? 'rank-item-first':''}}"> |
53 | <view class="no"> | 67 | <view class="no"> |
54 | <image class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" /> | 68 | <image wx:if="{{item.rank == '1'}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" /> |
55 | </view> | 69 | <span wx:else>{{item.rank}}</span> |
56 | <view class="user"> | ||
57 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | ||
58 | nickname | ||
59 | </view> | ||
60 | <view class="integral">1000</view> | ||
61 | </view> | ||
62 | <view class="rank-item"> | ||
63 | <view class="no">2</view> | ||
64 | <view class="user"> | ||
65 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | ||
66 | nickname | ||
67 | </view> | ||
68 | <view class="integral">1000</view> | ||
69 | </view> | ||
70 | <view class="rank-item"> | ||
71 | <view class="no">2</view> | ||
72 | <view class="user"> | ||
73 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | ||
74 | nickname | ||
75 | </view> | 70 | </view> |
76 | <view class="integral">1000</view> | ||
77 | </view> | ||
78 | <view class="rank-item"> | ||
79 | <view class="no">2</view> | ||
80 | <view class="user"> | ||
81 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | ||
82 | nickname | ||
83 | </view> | ||
84 | <view class="integral">1000</view> | ||
85 | </view> | ||
86 | <view class="rank-item"> | ||
87 | <view class="no">2</view> | ||
88 | <view class="user"> | ||
89 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | ||
90 | nickname | ||
91 | </view> | ||
92 | <view class="integral">1000</view> | ||
93 | </view> | ||
94 | <view class="rank-item"> | ||
95 | <view class="no">2</view> | ||
96 | <view class="user"> | ||
97 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | ||
98 | nickname | ||
99 | </view> | ||
100 | <view class="integral">1000</view> | ||
101 | </view> | ||
102 | <view class="rank-item"> | ||
103 | <view class="no">2</view> | ||
104 | <view class="user"> | 71 | <view class="user"> |
105 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | 72 | <image class="avatar" mode="widthFix" src="{{item.avatar}}" /> |
106 | nickname | 73 | {{item.nickname}} |
107 | </view> | 74 | </view> |
108 | <view class="integral">1000</view> | 75 | <view class="integral">{{item.points}}</view> |
109 | </view> | 76 | </view> |
110 | </scroll-view> | 77 | </scroll-view> |
111 | <!-- 省略号 --> | 78 | <!-- 省略号 --> |
... | @@ -114,19 +81,19 @@ | ... | @@ -114,19 +81,19 @@ |
114 | <view class="my-rank"> | 81 | <view class="my-rank"> |
115 | <view class="rank-item"> | 82 | <view class="rank-item"> |
116 | <view class="no"> | 83 | <view class="no"> |
117 | 1 | 84 | <image wx:if="{{rankInfo.myMember.rank == 1}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" /> |
118 | <!-- <image class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" /> --> | 85 | <span wx:else>{{rankInfo.myMember.rank || '-'}}</span> |
119 | </view> | 86 | </view> |
120 | <view class="user"> | 87 | <view class="user"> |
121 | <image class="avatar" mode="widthFix" src="../../image/icon/icon-default-avatar.png" /> | 88 | <image class="avatar" mode="widthFix" src="{{rankInfo.myMember.avatar}}" /> |
122 | nickname | 89 | {{rankInfo.myMember.nickname}} |
123 | </view> | 90 | </view> |
124 | <view class="integral">300</view> | 91 | <view class="integral">{{rankInfo.myMember.points}}</view> |
125 | </view> | 92 | </view> |
126 | </view> | 93 | </view> |
127 | </view> | 94 | </view> |
128 | <!-- 我的奖励按钮 --> | 95 | <!-- 我的奖励按钮 --> |
129 | <view class="btn-wrap"> | 96 | <view wx:if="{{status == 'promotion'}}" class="btn-wrap"> |
130 | <view bindtap="onRankGiftHandler" class="btn"> | 97 | <view bindtap="onRankGiftHandler" class="btn"> |
131 | <image class="integral" mode="aspectFit" src="../../image/icon/icon-rank-rewrad.png" /> | 98 | <image class="integral" mode="aspectFit" src="../../image/icon/icon-rank-rewrad.png" /> |
132 | 我的奖励 | 99 | 我的奖励 | ... | ... |
... | @@ -45,6 +45,7 @@ Page({ | ... | @@ -45,6 +45,7 @@ Page({ |
45 | toast: false, | 45 | toast: false, |
46 | url: app.api.sign, | 46 | url: app.api.sign, |
47 | }).then((result) => { | 47 | }).then((result) => { |
48 | this.queryMember().then((result) => { | ||
48 | this.querySignInfo().then((result2) => { | 49 | this.querySignInfo().then((result2) => { |
49 | // 签到成功 | 50 | // 签到成功 |
50 | this.setData({ | 51 | this.setData({ |
... | @@ -52,6 +53,7 @@ Page({ | ... | @@ -52,6 +53,7 @@ Page({ |
52 | giftSignTipsCompVisible: true | 53 | giftSignTipsCompVisible: true |
53 | }) | 54 | }) |
54 | }) | 55 | }) |
56 | }) | ||
55 | }).catch((err) => { | 57 | }).catch((err) => { |
56 | let { | 58 | let { |
57 | code | 59 | code | ... | ... |
-
Please register or sign in to post a comment