Authored by 郭成尧

message-birthday

// 消息 by acgpiano
'use strict';
const _ = require('lodash');
const moment = require('moment');
const helpers = global.yoho.helpers;
... ... @@ -40,7 +41,7 @@ class messageModel extends global.yoho.BaseModel {
// name: item.body.name,
// collarTime: item.body.collar_time,
// useTime: item.body.use_time,
content: _.get(item, 'body.content', ''),
isCollar: item.body.is_collar === 'Y' ? true : false,
isOverTime: item.body.is_over_time === 'Y' ? true : false
});
... ...
<div class="massage-page yoho-page">
{{log .}}
{{#if list}}
{{#list}}
<div class="massage-list" data-id="{{id}}">
... ... @@ -7,7 +8,7 @@
{{/if}}
<p>
{{#if birthType}}
<a>亲爱的,这是我给您的生日专属礼</a>
<a>{{title}}</a>
{{else}}
<a href="//m.yohobuy.com/home/messageDetail?id={{id}}">{{title}}</a>
{{/if}}
... ... @@ -15,19 +16,7 @@
{{#if birthType}}
<div class="ticket-pic">
<img src="{{imgSrc 'img/home/employ/birth-card.png'}}" />
</div>
<div class="ticket-btn">
<div class="ticket-btn-c">
<div>
{{#if isOverTime}}
<a class="disable">已过期</a>
{{else if isCollar}}
<a class="disable">已领取</a>
{{else}}
<a href="//m.yohobuy.com/home/birthCoupon">立即领取</a>
{{/if}}
</div>
</div>
<div class="content">{{content}}</div>
</div>
{{/if}}
<span>{{time}}</span>
... ...