Authored by htoooth

Merge remote-tracking branch 'origin/gray' into gray

... ... @@ -152,9 +152,22 @@ const getMessageList = (uid, params, limit) => {
let href = `/home/message/detail?id=${value.id}&page=${page}`;
href += type ? `&type=${type}` : '';
switch (value.type) {
case 'pullCoupon':
case 'button':
case 'pushCoupon':
break;
default:
if (value.pcLink) {
href = value.pcLink.replace('http:', '');
}
break;
}
msg.push({
id: value.id || 0,
href: type ? href + `&type=${type}` : href,
href: href,
title: value.title || '',
content: _.get(value, 'body.content', ''),
sender: value.from || '',
... ... @@ -207,6 +220,10 @@ const getMessageDetail = (uid, params, limit) => {
};
let msg = _.find(_.get(result, '[1]data.list', []), {id: mid});
if (type) {
resData.backUrl += `&type=${type}`;
}
if (!_.isEmpty(msg)) {
resData.message = {
sender: msg.from, // 消息发言人
... ... @@ -265,7 +282,7 @@ const getMessageDetail = (uid, params, limit) => {
image: _.get(msg, 'body.image', ''),
content: _.get(msg, 'body.text', ''),
btnLink: _.get(msg, 'body.pc_link', ''),
btnName: _.get(msg, 'body.button_text', '')
btnName: _.get(msg, 'body.button_text', '') || '查看详情'
};
break;
case 'pushCoupon':
... ...
... ... @@ -74,7 +74,9 @@
<img src="{{image2 image}}">
</div>
<p>{{{content}}}</p>
<a href="{{btnLink}}" class="sale-btn">{{btnName}}</a>
{{#if btnLink}}
<a href="{{btnLink}}" class="sale-btn">{{btnName}}</a>
{{/if}}
{{/ sale}}
</div>
{{/ message}}
... ...
... ... @@ -26,9 +26,25 @@ exports.getKeyActivity = (query) => {
* @return {[type]} [description]
*/
exports.getSearchData = (params, channel) => {
let searchParams = searchHandler.getSearchParams(params);
switch (channel) {
case 'boys':
searchParams.physical_channel = 1;
break;
case 'girls':
searchParams.physical_channel = 2;
break;
case 'kids':
searchParams.physical_channel = 3;
break;
case 'lifestyle':
searchParams.physical_channel = 4;
break;
default:
break;
}
// 调用接口
let apiMethod = [
headerModel.requestHeaderData(channel),
... ...
{
"name": "yohobuy-node",
"version": "5.4.0",
"version": "5.4.1",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -109,7 +109,7 @@ function getShoppingKey() {
a.src = j;
m.parentNode.insertBefore(a, m);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//' + // eslint-disable-line
'cdn.yoho.cn/yas-jssdk/2.1.2/yas.js', '_yas')); // eslint-disable-line
'cdn.yoho.cn/yas-jssdk/2.2.2/yas.js', '_yas')); // eslint-disable-line
(function() {
var uid = getUid();
... ... @@ -119,7 +119,7 @@ function getShoppingKey() {
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '2.1.2', 'yohobuy_web', uid, '', '');
window._yas(1 * new Date(), '2.2.2', 'yohobuy_web', uid, '', '');
}
}());
... ...
... ... @@ -96,6 +96,7 @@
overflow: hidden;
img {
max-width: 100%;
vertical-align: top;
}
}
... ...
... ... @@ -34,6 +34,10 @@
background-color: #fff;
border-bottom-color: #fff;
}
> a {
display: block;
}
}
}
... ...