Authored by htoooth

Merge branch 'develop' of http://git.yoho.cn/fe/yoho-limited-sell-miniapp into develop

@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 } 12 }
13 ], 13 ],
14 "indentation": null, 14 "indentation": null,
15 - "selector-type-no-unknown": null 15 + "selector-type-no-unknown": null,
  16 + "selector-class-pattern": null
16 } 17 }
17 } 18 }
@@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@
49 49
50 50
51 <!--悬浮按钮--> 51 <!--悬浮按钮-->
52 - <block wx:if="{{userInfo.isDrawline && !activityInfo.isEnd}}"> 52 + <block wx:if="{{userInfo.isDrawline && (!activityInfo.isEnd || !activityInfo.isDrawEnd)}}">
53 <view class='user-container' bindtap='navigateToMyList'> 53 <view class='user-container' bindtap='navigateToMyList'>
54 <view class='userrank' hidden='{{hidePopup}}'> 54 <view class='userrank' hidden='{{hidePopup}}'>
55 <view class='rank-text'> 55 <view class='rank-text'>
@@ -125,15 +125,6 @@ Page(Object.assign({ @@ -125,15 +125,6 @@ Page(Object.assign({
125 }, 125 },
126 126
127 /** 127 /**
128 - * 页面相关事件处理函数--监听用户下拉动作  
129 - */  
130 - onPullDownRefresh: function() {  
131 - let actId = this.data.activityInfo.activityId;  
132 -  
133 - wx.stopPullDownRefresh();  
134 - },  
135 -  
136 - /**  
137 * 页面上拉触底事件的处理函数 128 * 页面上拉触底事件的处理函数
138 */ 129 */
139 onReachBottom: function() { 130 onReachBottom: function() {
@@ -222,6 +213,17 @@ Page(Object.assign({ @@ -222,6 +213,17 @@ Page(Object.assign({
222 console.log(res); 213 console.log(res);
223 if (res.data && res.data.length > 0) { 214 if (res.data && res.data.length > 0) {
224 let result = []; 215 let result = [];
  216 + let helpIndex = 0;
  217 +
  218 + if (res.data[0].helpName && res.data[0].helpheadIco) {
  219 + result.push({
  220 + helpInfo: '好友"' + res.data[0].helpName + '"已为你助力',
  221 + background: helper.imgView(this.data.bgStyle[0], 340, 162, 1),
  222 + helpName: res.data[0].helpName,
  223 + helpheadIco: res.data[0].helpheadIco
  224 + });
  225 + helpIndex = 1;
  226 + }
225 227
226 res.data.forEach((item, index) => { 228 res.data.forEach((item, index) => {
227 if (!item.headIco) { 229 if (!item.headIco) {
@@ -235,7 +237,7 @@ Page(Object.assign({ @@ -235,7 +237,7 @@ Page(Object.assign({
235 item.vipLevel = item.vipLevel || 0; 237 item.vipLevel = item.vipLevel || 0;
236 item.vipImage = this.data.vipImage[item.vipLevel]; 238 item.vipImage = this.data.vipImage[item.vipLevel];
237 let bgStyle = this.data.bgStyle; 239 let bgStyle = this.data.bgStyle;
238 - let bgIndex = index % bgStyle.length; 240 + let bgIndex = (index + helpIndex) % bgStyle.length;
239 241
240 item.background = helper.imgView(bgStyle[bgIndex], 340, 162, 1); 242 item.background = helper.imgView(bgStyle[bgIndex], 340, 162, 1);
241 result.push(item); 243 result.push(item);
1 { 1 {
2 "navigationBarTitleText": "我的排队号", 2 "navigationBarTitleText": "我的排队号",
3 - "enablePullDownRefresh": true, 3 + "enablePullDownRefresh": false,
4 "backgroundColor": "#222", 4 "backgroundColor": "#222",
5 "backgroundTextStyle": "light" 5 "backgroundTextStyle": "light"
6 } 6 }
@@ -3,7 +3,16 @@ @@ -3,7 +3,16 @@
3 <view class='container'> 3 <view class='container'>
4 <!--排队列表--> 4 <!--排队列表-->
5 <block class='queue-list' wx:for='{{queueList}}' wx:key='{{item.id}}'> 5 <block class='queue-list' wx:for='{{queueList}}' wx:key='{{item.id}}'>
6 - <view id='item_{{item.uid}}' class='queue-item {{item.uid === userInfo.uid ? "active" : ""}}'> 6 + <view id='item_{{item.uid || 0}}' class='queue-item'>
  7 + <block wx:if="{{item.helpInfo}}">
  8 + <view class='item-helpinfo-container'>
  9 + <view class='item-helpinfo'>
  10 + <image src='{{item.helpheadIco}}'></image>
  11 + <text>{{item.helpInfo}}</text>
  12 + </view>
  13 + </view>
  14 + </block>
  15 + <block wx:else>
7 <view class='item-head-container'> 16 <view class='item-head-container'>
8 <!--headImage--> 17 <!--headImage-->
9 <image class='item-head' src='{{item.headIco}}'></image> 18 <image class='item-head' src='{{item.headIco}}'></image>
@@ -15,22 +24,25 @@ @@ -15,22 +24,25 @@
15 </view> 24 </view>
16 <view class='item-info-container'> 25 <view class='item-info-container'>
17 <!--itemInfo--> 26 <!--itemInfo-->
18 - <view class='item-user-rank'>  
19 - <text>{{item.sort}}</text>  
20 - <view wx:if="{{item.helpName}}" class='item-user-assist'>  
21 - <image src='{{item.helpheadIco}}'></image>  
22 - <text>好友助力</text> 27 +
  28 + <view class='item-user-rank'>
  29 + <text>{{item.sort}}</text>
  30 + <view wx:if="{{item.helpName}}" class='item-user-assist'>
  31 + <image src='{{item.helpheadIco}}'></image>
  32 + <text>好友助力</text>
  33 + </view>
23 </view> 34 </view>
24 - </view>  
25 - <view class='item-user-name'>{{item.nickName}}</view>  
26 - <view class='item-user-time'>  
27 - <view class='item-user-time-icon'></view>  
28 - <view class='item-user-time-text'>{{item.queueTime}}</view>  
29 - <view class='item-user-vip-level' wx:if='{{item.vipLevel}}'>  
30 - <image src='{{item.vipImage}}'></image> 35 + <view class='item-user-name'>{{item.nickName}}</view>
  36 + <view class='item-user-time'>
  37 + <view class='item-user-time-icon'></view>
  38 + <view class='item-user-time-text'>{{item.queueTime}}</view>
  39 + <view class='item-user-vip-level' wx:if='{{item.vipLevel}}'>
  40 + <image src='{{item.vipImage}}'></image>
  41 + </view>
31 </view> 42 </view>
32 - </view> 43 +
33 </view> 44 </view>
  45 + </block>
34 <view class='item-bg'> 46 <view class='item-bg'>
35 <image src='{{item.background}}'></image> 47 <image src='{{item.background}}'></image>
36 </view> 48 </view>
@@ -262,6 +262,10 @@ image { @@ -262,6 +262,10 @@ image {
262 z-index: 5; 262 z-index: 5;
263 } 263 }
264 264
  265 +.item-helpinfo-container {
  266 + width: 410rpx;
  267 +}
  268 +
265 .item-info-container { /* item用户相关信息 */ 269 .item-info-container { /* item用户相关信息 */
266 display: flex; 270 display: flex;
267 flex-flow: column; 271 flex-flow: column;
@@ -272,6 +276,27 @@ image { @@ -272,6 +276,27 @@ image {
272 box-sizing: border-box; 276 box-sizing: border-box;
273 } 277 }
274 278
  279 +.item-helpinfo {
  280 + display: flex;
  281 + flex-direction: row;
  282 + align-items: center;
  283 + height: 60rpx;
  284 + margin: 0 30rpx;
  285 + background-color: rgba(0, 0, 0, 0.3);
  286 + font-size: 20rpx;
  287 + font-weight: lighter;
  288 + color: #fff;
  289 + border-radius: 30rpx;
  290 + overflow: hidden;
  291 +}
  292 +
  293 +.item-helpinfo image {
  294 + width: 42rpx;
  295 + height: 42rpx;
  296 + margin: 0 8rpx;
  297 + border-radius: 42rpx;
  298 +}
  299 +
275 .item-user-rank { /* item 用户排名 */ 300 .item-user-rank { /* item 用户排名 */
276 display: flex; 301 display: flex;
277 flex-direction: row; 302 flex-direction: row;
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 "list": [] 33 "list": []
34 }, 34 },
35 "miniprogram": { 35 "miniprogram": {
36 - "current": 0, 36 + "current": 4,
37 "list": [ 37 "list": [
38 { 38 {
39 "id": 0, 39 "id": 0,
@@ -114,6 +114,12 @@ @@ -114,6 +114,12 @@
114 "appId": "wx084ab813d88c594b", 114 "appId": "wx084ab813d88c594b",
115 "extraData": "{}" 115 "extraData": "{}"
116 } 116 }
  117 + },
  118 + {
  119 + "id": -1,
  120 + "name": "我的排队列表",
  121 + "pathName": "pages/queue/myList",
  122 + "query": "actId=362"
117 } 123 }
118 ] 124 ]
119 } 125 }