bug fix : http://jira.yoho.cn:8888/browse/YH-2646 review by 阿瑟
Showing
3 changed files
with
12 additions
and
3 deletions
@@ -376,7 +376,10 @@ function parseRecommendation(json) { | @@ -376,7 +376,10 @@ function parseRecommendation(json) { | ||
376 | let timeagoStr = timeago(createTime); | 376 | let timeagoStr = timeago(createTime); |
377 | let isLike = item.hasPraise === 'Y' ? true : false; | 377 | let isLike = item.hasPraise === 'Y' ? true : false; |
378 | let title = item.postsTitle ? decodeURI(item.postsTitle) : ''; | 378 | let title = item.postsTitle ? decodeURI(item.postsTitle) : ''; |
379 | - title = title === '' ? desc : title; | 379 | + if (title === '') { |
380 | + title = desc; | ||
381 | + desc = ''; | ||
382 | + } | ||
380 | let id = item.id ? item.id : 0; | 383 | let id = item.id ? item.id : 0; |
381 | 384 | ||
382 | let post = { | 385 | let post = { |
@@ -309,7 +309,10 @@ function parseNewPost(json) { | @@ -309,7 +309,10 @@ function parseNewPost(json) { | ||
309 | let timeagoStr = timeago(createTime); | 309 | let timeagoStr = timeago(createTime); |
310 | let isLike = item.hasPraise === 'Y' ? true : false; | 310 | let isLike = item.hasPraise === 'Y' ? true : false; |
311 | let title = item.postsTitle ? decodeURI(item.postsTitle) : ''; | 311 | let title = item.postsTitle ? decodeURI(item.postsTitle) : ''; |
312 | - title = title === '' ? desc : title; | 312 | + if (title === '') { |
313 | + title = desc; | ||
314 | + desc = ''; | ||
315 | + } | ||
313 | let id = item.id ? item.id : 0; | 316 | let id = item.id ? item.id : 0; |
314 | 317 | ||
315 | let post = { | 318 | let post = { |
@@ -644,7 +644,10 @@ function parseJson(json) { | @@ -644,7 +644,10 @@ function parseJson(json) { | ||
644 | let timeagoStr = timeago(createTime); | 644 | let timeagoStr = timeago(createTime); |
645 | let isLike = item.hasPraise === 'Y' ? true : false; | 645 | let isLike = item.hasPraise === 'Y' ? true : false; |
646 | let title = item.postsTitle ? decodeURI(item.postsTitle) : ''; | 646 | let title = item.postsTitle ? decodeURI(item.postsTitle) : ''; |
647 | - title = title === '' ? desc : title; | 647 | + if (title === '') { |
648 | + title = desc; | ||
649 | + desc = ''; | ||
650 | + } | ||
648 | let id = item.id ? item.id : 0; | 651 | let id = item.id ? item.id : 0; |
649 | 652 | ||
650 | let post = { | 653 | let post = { |
-
Please register or login to post a comment