Authored by 张孝茹

默认头像

1 'use strict'; 1 'use strict';
2 const moment = require('moment'); 2 const moment = require('moment');
3 -const _ = require('lodash');  
4 3
5 class grouthNewModel extends global.yoho.BaseModel { 4 class grouthNewModel extends global.yoho.BaseModel {
6 constructor(ctx) { 5 constructor(ctx) {
@@ -22,21 +21,20 @@ class grouthNewModel extends global.yoho.BaseModel { @@ -22,21 +21,20 @@ class grouthNewModel extends global.yoho.BaseModel {
22 return this.get(option).then((result => { 21 return this.get(option).then((result => {
23 if (result && result.code && result.code === 200 && result.data) { 22 if (result && result.code && result.code === 200 && result.data) {
24 let calculateData = result.data; 23 let calculateData = result.data;
25 - let privilegeList = [];  
26 24
27 calculateData.expireTime = (calculateData.expireTime && parseInt(calculateData.expireTime, 10) !== 0) ? 25 calculateData.expireTime = (calculateData.expireTime && parseInt(calculateData.expireTime, 10) !== 0) ?
28 moment.unix(calculateData.expireTime).format('YYYY/MM/DD') : ''; 26 moment.unix(calculateData.expireTime).format('YYYY/MM/DD') : '';
29 27
30 - if (_.get(calculateData, 'levelInfo.privilege', '')) {  
31 - _.forEach(calculateData.levelInfo.privilege, val => { 28 + // if (_.get(calculateData, 'levelInfo.privilege', '')) {
  29 + // _.forEach(calculateData.levelInfo.privilege, val => {
32 30
33 - if (val.light === 'Y') {  
34 - privilegeList.push(val);  
35 - }  
36 - });  
37 - } 31 + // if (val.light === 'Y') {
  32 + // privilegeList.push(val);
  33 + // }
  34 + // });
  35 + // }
38 36
39 - calculateData.privilegeList = privilegeList; 37 + // calculateData.privilegeList = privilegeList;
40 38
41 return calculateData; 39 return calculateData;
42 } 40 }
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 已为您解锁如下会员权益 54 已为您解锁如下会员权益
55 </p> 55 </p>
56 <div class="equities-list"> 56 <div class="equities-list">
57 - {{#privilegeList}} 57 + {{#levelInfo.privilege}}
58 <div class="list-item"> 58 <div class="list-item">
59 <div class="item-ico"> 59 <div class="item-ico">
60 <img src="{{pic_big}}"> 60 <img src="{{pic_big}}">
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <p class="text">{{title}}</p> 62 <p class="text">{{title}}</p>
63 <p class="discount">{{#if discount}}-{{discount}}-{{/if}}</p> 63 <p class="discount">{{#if discount}}-{{discount}}-{{/if}}</p>
64 </div> 64 </div>
65 - {{/privilegeList}} 65 + {{/levelInfo.privilege}}
66 </div> 66 </div>
67 </div> 67 </div>
68 {{/if}} 68 {{/if}}
@@ -54,6 +54,9 @@ body { @@ -54,6 +54,9 @@ body {
54 border: 4px solid #fff; 54 border: 4px solid #fff;
55 margin: 0 auto; 55 margin: 0 auto;
56 overflow: hidden; 56 overflow: hidden;
  57 + background-image: resolve("activity/grouth-new/user.png");
  58 + background-size: cover;
  59 + background-repeat: no-repeat;
57 } 60 }
58 61
59 .nick-name { 62 .nick-name {
@@ -156,15 +159,15 @@ body { @@ -156,15 +159,15 @@ body {
156 159
157 .list-item { 160 .list-item {
158 color: #fff; 161 color: #fff;
159 - margin-right: 66px; 162 + margin-right: 30px;
160 margin-top: 44px; 163 margin-top: 44px;
161 display: inline-block; 164 display: inline-block;
162 height: 100%; 165 height: 100%;
163 vertical-align: top; 166 vertical-align: top;
164 167
165 .item-ico { 168 .item-ico {
166 - width: 60px;  
167 - height: 60px; 169 + width: 100px;
  170 + height: 100px;
168 margin: 0 auto; 171 margin: 0 auto;
169 margin-bottom: 30px; 172 margin-bottom: 30px;
170 } 173 }