Authored by htoooth

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

@@ -152,9 +152,22 @@ const getMessageList = (uid, params, limit) => { @@ -152,9 +152,22 @@ const getMessageList = (uid, params, limit) => {
152 152
153 let href = `/home/message/detail?id=${value.id}&page=${page}`; 153 let href = `/home/message/detail?id=${value.id}&page=${page}`;
154 154
  155 + href += type ? `&type=${type}` : '';
  156 + switch (value.type) {
  157 + case 'pullCoupon':
  158 + case 'button':
  159 + case 'pushCoupon':
  160 + break;
  161 + default:
  162 + if (value.pcLink) {
  163 + href = value.pcLink.replace('http:', '');
  164 + }
  165 + break;
  166 + }
  167 +
155 msg.push({ 168 msg.push({
156 id: value.id || 0, 169 id: value.id || 0,
157 - href: type ? href + `&type=${type}` : href, 170 + href: href,
158 title: value.title || '', 171 title: value.title || '',
159 content: _.get(value, 'body.content', ''), 172 content: _.get(value, 'body.content', ''),
160 sender: value.from || '', 173 sender: value.from || '',
@@ -207,6 +220,10 @@ const getMessageDetail = (uid, params, limit) => { @@ -207,6 +220,10 @@ const getMessageDetail = (uid, params, limit) => {
207 }; 220 };
208 let msg = _.find(_.get(result, '[1]data.list', []), {id: mid}); 221 let msg = _.find(_.get(result, '[1]data.list', []), {id: mid});
209 222
  223 + if (type) {
  224 + resData.backUrl += `&type=${type}`;
  225 + }
  226 +
210 if (!_.isEmpty(msg)) { 227 if (!_.isEmpty(msg)) {
211 resData.message = { 228 resData.message = {
212 sender: msg.from, // 消息发言人 229 sender: msg.from, // 消息发言人
@@ -265,7 +282,7 @@ const getMessageDetail = (uid, params, limit) => { @@ -265,7 +282,7 @@ const getMessageDetail = (uid, params, limit) => {
265 image: _.get(msg, 'body.image', ''), 282 image: _.get(msg, 'body.image', ''),
266 content: _.get(msg, 'body.text', ''), 283 content: _.get(msg, 'body.text', ''),
267 btnLink: _.get(msg, 'body.pc_link', ''), 284 btnLink: _.get(msg, 'body.pc_link', ''),
268 - btnName: _.get(msg, 'body.button_text', '') 285 + btnName: _.get(msg, 'body.button_text', '') || '查看详情'
269 }; 286 };
270 break; 287 break;
271 case 'pushCoupon': 288 case 'pushCoupon':
@@ -74,7 +74,9 @@ @@ -74,7 +74,9 @@
74 <img src="{{image2 image}}"> 74 <img src="{{image2 image}}">
75 </div> 75 </div>
76 <p>{{{content}}}</p> 76 <p>{{{content}}}</p>
77 - <a href="{{btnLink}}" class="sale-btn">{{btnName}}</a> 77 + {{#if btnLink}}
  78 + <a href="{{btnLink}}" class="sale-btn">{{btnName}}</a>
  79 + {{/if}}
78 {{/ sale}} 80 {{/ sale}}
79 </div> 81 </div>
80 {{/ message}} 82 {{/ message}}
@@ -26,9 +26,25 @@ exports.getKeyActivity = (query) => { @@ -26,9 +26,25 @@ exports.getKeyActivity = (query) => {
26 * @return {[type]} [description] 26 * @return {[type]} [description]
27 */ 27 */
28 exports.getSearchData = (params, channel) => { 28 exports.getSearchData = (params, channel) => {
29 -  
30 let searchParams = searchHandler.getSearchParams(params); 29 let searchParams = searchHandler.getSearchParams(params);
31 30
  31 + switch (channel) {
  32 + case 'boys':
  33 + searchParams.physical_channel = 1;
  34 + break;
  35 + case 'girls':
  36 + searchParams.physical_channel = 2;
  37 + break;
  38 + case 'kids':
  39 + searchParams.physical_channel = 3;
  40 + break;
  41 + case 'lifestyle':
  42 + searchParams.physical_channel = 4;
  43 + break;
  44 + default:
  45 + break;
  46 + }
  47 +
32 // 调用接口 48 // 调用接口
33 let apiMethod = [ 49 let apiMethod = [
34 headerModel.requestHeaderData(channel), 50 headerModel.requestHeaderData(channel),
1 { 1 {
2 "name": "yohobuy-node", 2 "name": "yohobuy-node",
3 - "version": "5.4.0", 3 + "version": "5.4.1",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -109,7 +109,7 @@ function getShoppingKey() { @@ -109,7 +109,7 @@ function getShoppingKey() {
109 a.src = j; 109 a.src = j;
110 m.parentNode.insertBefore(a, m); 110 m.parentNode.insertBefore(a, m);
111 }(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//' + // eslint-disable-line 111 }(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//' + // eslint-disable-line
112 - 'cdn.yoho.cn/yas-jssdk/2.1.2/yas.js', '_yas')); // eslint-disable-line 112 + 'cdn.yoho.cn/yas-jssdk/2.2.2/yas.js', '_yas')); // eslint-disable-line
113 113
114 (function() { 114 (function() {
115 var uid = getUid(); 115 var uid = getUid();
@@ -119,7 +119,7 @@ function getShoppingKey() { @@ -119,7 +119,7 @@ function getShoppingKey() {
119 window._ozuid = uid; // 暴露ozuid 119 window._ozuid = uid; // 暴露ozuid
120 120
121 if (window._yas) { 121 if (window._yas) {
122 - window._yas(1 * new Date(), '2.1.2', 'yohobuy_web', uid, '', ''); 122 + window._yas(1 * new Date(), '2.2.2', 'yohobuy_web', uid, '', '');
123 } 123 }
124 }()); 124 }());
125 125
@@ -96,6 +96,7 @@ @@ -96,6 +96,7 @@
96 overflow: hidden; 96 overflow: hidden;
97 97
98 img { 98 img {
  99 + max-width: 100%;
99 vertical-align: top; 100 vertical-align: top;
100 } 101 }
101 } 102 }
@@ -34,6 +34,10 @@ @@ -34,6 +34,10 @@
34 background-color: #fff; 34 background-color: #fff;
35 border-bottom-color: #fff; 35 border-bottom-color: #fff;
36 } 36 }
  37 +
  38 + > a {
  39 + display: block;
  40 + }
37 } 41 }
38 } 42 }
39 43