Authored by 张孝茹

默认头像

'use strict';
const moment = require('moment');
const _ = require('lodash');
class grouthNewModel extends global.yoho.BaseModel {
constructor(ctx) {
... ... @@ -22,21 +21,20 @@ class grouthNewModel extends global.yoho.BaseModel {
return this.get(option).then((result => {
if (result && result.code && result.code === 200 && result.data) {
let calculateData = result.data;
let privilegeList = [];
calculateData.expireTime = (calculateData.expireTime && parseInt(calculateData.expireTime, 10) !== 0) ?
moment.unix(calculateData.expireTime).format('YYYY/MM/DD') : '';
if (_.get(calculateData, 'levelInfo.privilege', '')) {
_.forEach(calculateData.levelInfo.privilege, val => {
// if (_.get(calculateData, 'levelInfo.privilege', '')) {
// _.forEach(calculateData.levelInfo.privilege, val => {
if (val.light === 'Y') {
privilegeList.push(val);
}
});
}
// if (val.light === 'Y') {
// privilegeList.push(val);
// }
// });
// }
calculateData.privilegeList = privilegeList;
// calculateData.privilegeList = privilegeList;
return calculateData;
}
... ...
... ... @@ -54,7 +54,7 @@
已为您解锁如下会员权益
</p>
<div class="equities-list">
{{#privilegeList}}
{{#levelInfo.privilege}}
<div class="list-item">
<div class="item-ico">
<img src="{{pic_big}}">
... ... @@ -62,7 +62,7 @@
<p class="text">{{title}}</p>
<p class="discount">{{#if discount}}-{{discount}}-{{/if}}</p>
</div>
{{/privilegeList}}
{{/levelInfo.privilege}}
</div>
</div>
{{/if}}
... ...
... ... @@ -54,6 +54,9 @@ body {
border: 4px solid #fff;
margin: 0 auto;
overflow: hidden;
background-image: resolve("activity/grouth-new/user.png");
background-size: cover;
background-repeat: no-repeat;
}
.nick-name {
... ... @@ -156,15 +159,15 @@ body {
.list-item {
color: #fff;
margin-right: 66px;
margin-right: 30px;
margin-top: 44px;
display: inline-block;
height: 100%;
vertical-align: top;
.item-ico {
width: 60px;
height: 60px;
width: 100px;
height: 100px;
margin: 0 auto;
margin-bottom: 30px;
}
... ...