Authored by 姜枫

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

@@ -53,8 +53,6 @@ const _processListData = (list) => { @@ -53,8 +53,6 @@ const _processListData = (list) => {
53 return listData; 53 return listData;
54 }; 54 };
55 55
56 -  
57 -  
58 /** 56 /**
59 * 首页、列表页列表相关 57 * 首页、列表页列表相关
60 * @param type 58 * @param type
@@ -121,7 +119,7 @@ const getListData = (appType, pageNum, limit, udid, gender, tag, authorId) => { @@ -121,7 +119,7 @@ const getListData = (appType, pageNum, limit, udid, gender, tag, authorId) => {
121 */ 119 */
122 const _getAuthorData = (id) => { 120 const _getAuthorData = (id) => {
123 121
124 - return serviceAPI.get('/guang/service/*/author/getAuthor', { 122 + return serviceAPI.get('guang/service/*/author/getAuthor', {
125 author_id: id 123 author_id: id
126 }).then((result) => { 124 }).then((result) => {
127 if (result && result.code === 200) { 125 if (result && result.code === 200) {
@@ -182,7 +180,6 @@ const _processHeadData = (list) => { @@ -182,7 +180,6 @@ const _processHeadData = (list) => {
182 180
183 } 181 }
184 182
185 -  
186 if (index === 2) { 183 if (index === 2) {
187 newData.headData = _.assign(newData.headData, { 184 newData.headData = _.assign(newData.headData, {
188 commentNum: data.total 185 commentNum: data.total
@@ -358,7 +355,7 @@ const _getHeadData = (id, appType, uid, udid) => { @@ -358,7 +355,7 @@ const _getHeadData = (id, appType, uid, udid) => {
358 par.udid = udid; 355 par.udid = udid;
359 } 356 }
360 357
361 - return serviceAPI.get('/guang/api/*/article/getArticleBaseInfo', par).then((result) => { 358 + return serviceAPI.get('guang/api/*/article/getArticleBaseInfo', par).then((result) => {
362 if (result && result.code === 200) { 359 if (result && result.code === 200) {
363 return result.data; 360 return result.data;
364 } else { 361 } else {
@@ -374,7 +371,7 @@ const _getHeadData = (id, appType, uid, udid) => { @@ -374,7 +371,7 @@ const _getHeadData = (id, appType, uid, udid) => {
374 * @returns {*} 371 * @returns {*}
375 */ 372 */
376 const _getContentData = (id) => { 373 const _getContentData = (id) => {
377 - return serviceAPI.get('/guang/service/*/article/getArticleContent', { 374 + return serviceAPI.get('guang/service/*/article/getArticleContent', {
378 article_id: id 375 article_id: id
379 }).then((result) => { 376 }).then((result) => {
380 if (result && result.code === 200) { 377 if (result && result.code === 200) {
@@ -392,7 +389,7 @@ const _getContentData = (id) => { @@ -392,7 +389,7 @@ const _getContentData = (id) => {
392 * @returns {*} 389 * @returns {*}
393 */ 390 */
394 const _getArticleData = (id) => { 391 const _getArticleData = (id) => {
395 - return serviceAPI.get('/guang/service/v2/article/getArticle', { 392 + return serviceAPI.get('guang/service/v2/article/getArticle', {
396 article_id: id 393 article_id: id
397 }).then((result) => { 394 }).then((result) => {
398 if (result && result.code === 200) { 395 if (result && result.code === 200) {
@@ -410,7 +407,7 @@ const _getArticleData = (id) => { @@ -410,7 +407,7 @@ const _getArticleData = (id) => {
410 * @returns {*} 407 * @returns {*}
411 */ 408 */
412 const _getCommentsData = (id) => { 409 const _getCommentsData = (id) => {
413 - return serviceAPI.get('/guang/api/*/comments/getList', { 410 + return serviceAPI.get('guang/api/*/comments/getList', {
414 article_id: id 411 article_id: id
415 }).then((result) => { 412 }).then((result) => {
416 if (result && result.code === 200) { 413 if (result && result.code === 200) {
@@ -457,7 +454,7 @@ const _getRelateBrand = (id) => { @@ -457,7 +454,7 @@ const _getRelateBrand = (id) => {
457 * @returns {*} 454 * @returns {*}
458 */ 455 */
459 const _getArticlePre = (id, appType) => { 456 const _getArticlePre = (id, appType) => {
460 - return serviceAPI.get('/guang/api/*/article/getArticlePre', { 457 + return serviceAPI.get('guang/api/*/article/getArticlePre', {
461 id: id, 458 id: id,
462 app_type: appType 459 app_type: appType
463 }).then((result) => { 460 }).then((result) => {
@@ -491,7 +488,7 @@ const _getArticlePre = (id, appType) => { @@ -491,7 +488,7 @@ const _getArticlePre = (id, appType) => {
491 * @returns {*} 488 * @returns {*}
492 */ 489 */
493 const _getArticleNext = (id, appType) => { 490 const _getArticleNext = (id, appType) => {
494 - return serviceAPI.get('/guang/api/*/article/getArticleNext', { 491 + return serviceAPI.get('guang/api/*/article/getArticleNext', {
495 id: id, 492 id: id,
496 app_type: appType 493 app_type: appType
497 }).then((result) => { 494 }).then((result) => {
@@ -534,7 +531,7 @@ const setCollect = (id, uid, appType) => { @@ -534,7 +531,7 @@ const setCollect = (id, uid, appType) => {
534 message: '未登录' 531 message: '未登录'
535 }); 532 });
536 } 533 }
537 - return serviceAPI.get('/guang/api/*/favorite/setFavorite', { 534 + return serviceAPI.get('guang/api/*/favorite/setFavorite', {
538 article_id: id, 535 article_id: id,
539 uid: uid, 536 uid: uid,
540 app_type: appType 537 app_type: appType
@@ -554,7 +551,7 @@ const cancelCollect = (id, uid, appType) => { @@ -554,7 +551,7 @@ const cancelCollect = (id, uid, appType) => {
554 message: '未登录' 551 message: '未登录'
555 }); 552 });
556 } 553 }
557 - return serviceAPI.get('/guang/api/*/favorite/cancelFavorite', { 554 + return serviceAPI.get('guang/api/*/favorite/cancelFavorite', {
558 article_id: id, 555 article_id: id,
559 uid: uid, 556 uid: uid,
560 app_type: appType 557 app_type: appType
@@ -569,7 +566,7 @@ const cancelCollect = (id, uid, appType) => { @@ -569,7 +566,7 @@ const cancelCollect = (id, uid, appType) => {
569 */ 566 */
570 const setPraise = (id, udid, appType) => { 567 const setPraise = (id, udid, appType) => {
571 568
572 - return serviceAPI.get('/guang/api/v2/praise/setPraise', { 569 + return serviceAPI.get('guang/api/v2/praise/setPraise', {
573 article_id: id, 570 article_id: id,
574 udid: udid, 571 udid: udid,
575 app_type: appType 572 app_type: appType
@@ -584,7 +581,7 @@ const setPraise = (id, udid, appType) => { @@ -584,7 +581,7 @@ const setPraise = (id, udid, appType) => {
584 */ 581 */
585 const cancelPraise = (id, udid, appType) => { 582 const cancelPraise = (id, udid, appType) => {
586 583
587 - return serviceAPI.get('/guang/api/v2/praise/cancel', { 584 + return serviceAPI.get('guang/api/v2/praise/cancel', {
588 article_id: id, 585 article_id: id,
589 udid: udid, 586 udid: udid,
590 app_type: appType 587 app_type: appType
@@ -605,7 +602,7 @@ const addComment = (id, uid, comment) => { @@ -605,7 +602,7 @@ const addComment = (id, uid, comment) => {
605 message: '未登录' 602 message: '未登录'
606 }); 603 });
607 } 604 }
608 - return serviceAPI.get('/guang/api/*/comments/add', { 605 + return serviceAPI.get('guang/api/*/comments/add', {
609 article_id: id, 606 article_id: id,
610 uid: uid, 607 uid: uid,
611 content: comment 608 content: comment
@@ -613,7 +610,7 @@ const addComment = (id, uid, comment) => { @@ -613,7 +610,7 @@ const addComment = (id, uid, comment) => {
613 }; 610 };
614 611
615 const shareData = () => { 612 const shareData = () => {
616 - return serviceAPI.get('/guang/api/*/share/guang', {}).then((result) => { 613 + return serviceAPI.get('guang/api/*/share/guang', {}).then((result) => {
617 if (result && result.code === 200) { 614 if (result && result.code === 200) {
618 return camelCase(result.data); 615 return camelCase(result.data);
619 } else { 616 } else {
@@ -18,9 +18,9 @@ @@ -18,9 +18,9 @@
18 <a class="author-name" href="{{authorUrl}}">{{name}}</a> 18 <a class="author-name" href="{{authorUrl}}">{{name}}</a>
19 </div> 19 </div>
20 <div class="article-status"> 20 <div class="article-status">
21 - <span class="article-time font">{{time}}</span>  
22 - <span class="article-browse font">浏览:{{click}}</span>  
23 - <span class="article-comments font">评论:{{commentNum}}</span> 21 + <span class="article-time brown-light">{{time}}</span>
  22 + <span class="article-browse">浏览:<b class=" brown-light">{{click}}</b></span>
  23 + <span class="article-comments">评论:<b class="brown-light">{{commentNum}}</b></span>
24 </div> 24 </div>
25 </div> 25 </div>
26 {{/ header}} 26 {{/ header}}
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 </div> 15 </div>
16 <div class="comment-info"> 16 <div class="comment-info">
17 <p class="comment-content">{{content}}</p> 17 <p class="comment-content">{{content}}</p>
18 - <p class="comment-time font">{{createTime}}</p> 18 + <p class="comment-time brown-light">{{createTime}}</p>
19 </div> 19 </div>
20 </li> 20 </li>
21 {{/ list}} 21 {{/ list}}
1 <div class="content-msg clearfix" data-id="{{id}}"> 1 <div class="content-msg clearfix" data-id="{{id}}">
2 - <div class="msg-left"><i class="iconfont">&#xe606;</i> <span class="time-word font">{{publishTime}}</span></div> 2 + <div class="msg-left"><i class="iconfont">&#xe606;</i> <span class="time-word font brown-light">{{publishTime}}</span></div>
3 <div class="msg-right"> 3 <div class="msg-right">
4 <a class="msg-title" href="/editorial/{{id}}.html" target="_blank">{{title}}</a> 4 <a class="msg-title" href="/editorial/{{id}}.html" target="_blank">{{title}}</a>
5 <a href="/editorial/{{id}}.html" target="_blank"> 5 <a href="/editorial/{{id}}.html" target="_blank">
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <div class="msg-app"> 9 <div class="msg-app">
10 <span class="like-comment"> 10 <span class="like-comment">
11 <i class="iconfont like-icon {{#if isPraise}}liked{{/if}}">&#xe60e;</i> 11 <i class="iconfont like-icon {{#if isPraise}}liked{{/if}}">&#xe60e;</i>
12 - <b class="like-num font">{{praiseNum}}</b> 12 + <b class="like-num brown-light font">{{praiseNum}}</b>
13 </span> 13 </span>
14 </div> 14 </div>
15 </div> 15 </div>
@@ -196,6 +196,12 @@ const favorite = { @@ -196,6 +196,12 @@ const favorite = {
196 editorialList: data.data 196 editorialList: data.data
197 }; 197 };
198 198
  199 + _.forEach(retData.editorialList, function(val){
  200 + val.publishTime = val.publishTime.replace(/年|月/g, '/');
  201 + val.publishTime = val.publishTime.replace(/日/g, '');
  202 + })
  203 +
  204 +
199 retData.total = data.total; 205 retData.total = data.total;
200 retData.paginationData = { 206 retData.paginationData = {
201 page: page, 207 page: page,
@@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
23 </div> 23 </div>
24 <div class="editorial-some"> 24 <div class="editorial-some">
25 <span class="author">{{author.name}}</span> 25 <span class="author">{{author.name}}</span>
26 - <span class="time">{{publishTime}}</span>  
27 - <span>浏览: {{viewsNum}}</span>  
28 - <span>评论: {{praiseNum}}</span> 26 + <span class="time brown-light">{{publishTime}}</span>
  27 + <span>浏览: <b class="brown-light">{{viewsNum}}</b></span>
  28 + <span>评论: <b class="brown-light">{{praiseNum}}</b></span>
29 </div> 29 </div>
30 <p class="summer"> 30 <p class="summer">
31 {{intro}} 31 {{intro}}
@@ -121,7 +121,7 @@ function comment() { @@ -121,7 +121,7 @@ function comment() {
121 var commentInfo = $('#comment-info').val(); 121 var commentInfo = $('#comment-info').val();
122 122
123 if (commentInfo === '') { 123 if (commentInfo === '') {
124 - new _alert('评论不能为空').show(); 124 + // new _alert('评论不能为空').show();
125 return false; 125 return false;
126 } 126 }
127 commenting = true; 127 commenting = true;
@@ -20,10 +20,6 @@ @@ -20,10 +20,6 @@
20 height: 40px; 20 height: 40px;
21 } 21 }
22 22
23 - .font {  
24 - font-family: '黑体';  
25 - }  
26 -  
27 .paging { 23 .paging {
28 margin-top: 40px; 24 margin-top: 40px;
29 margin-bottom: 80px; 25 margin-bottom: 80px;
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 line-height: 30px; 11 line-height: 30px;
12 text-align: center; 12 text-align: center;
13 border-bottom: 1px solid #bbb; 13 border-bottom: 1px solid #bbb;
14 - color: #a0a0a0; 14 + color: #999;
15 } 15 }
16 16
17 .msg-right { 17 .msg-right {
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 30
31 .msg-title { 31 .msg-title {
32 font-size: 20px; 32 font-size: 20px;
33 - color: #333; 33 + color: #1b1b1b;
34 line-height: 30px; 34 line-height: 30px;
35 max-height: 64px; 35 max-height: 64px;
36 overflow: hidden; 36 overflow: hidden;
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 } 42 }
43 43
44 .msg-title:hover { 44 .msg-title:hover {
45 - color: #ff1414; 45 + color: #379ed6;
46 } 46 }
47 47
48 .lazy { 48 .lazy {
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 } 86 }
87 87
88 .like-comment { 88 .like-comment {
89 - color: #a6a6a6; 89 + color: #999;
90 cursor: pointer; 90 cursor: pointer;
91 font-size: 14px; 91 font-size: 14px;
92 92