Showing
6 changed files
with
66 additions
and
17 deletions
@@ -100,16 +100,18 @@ let _processComment = (data) => { | @@ -100,16 +100,18 @@ let _processComment = (data) => { | ||
100 | }; | 100 | }; |
101 | 101 | ||
102 | if (data && data.pageResponse) { | 102 | if (data && data.pageResponse) { |
103 | - let descColor; | 103 | + let color, size; |
104 | 104 | ||
105 | _.forEach(data.pageResponse.list, (item) => { | 105 | _.forEach(data.pageResponse.list, (item) => { |
106 | if (item.goods) { | 106 | if (item.goods) { |
107 | - descColor = item.goods.factory_goods_name ? `${item.goods.factory_goods_name}/${item.goods.size_name}` : `${item.goods.color_name}/${item.goods.size_name}`; | 107 | + color = item.goods.factory_goods_name ? item.goods.factory_goods_name : item.goods.color_name; |
108 | + size = item.goods.size_name; | ||
108 | }; | 109 | }; |
109 | 110 | ||
110 | result.comments.push({ | 111 | result.comments.push({ |
111 | userName: item.userInfo ? item.userInfo.nickName : '', | 112 | userName: item.userInfo ? item.userInfo.nickName : '', |
112 | - desc: descColor ? descColor : '', | 113 | + color: color || '', |
114 | + size: size || '', | ||
113 | content: item.content, | 115 | content: item.content, |
114 | time: helpers.dateFormat('YYYY-MM-DD HH:mm:ss', new Date(item.createTime * 1000)) | 116 | time: helpers.dateFormat('YYYY-MM-DD HH:mm:ss', new Date(item.createTime * 1000)) |
115 | }); | 117 | }); |
1 | <div class="goods-comments-page yoho-page"> | 1 | <div class="goods-comments-page yoho-page"> |
2 | <div class="goods-comments" id="goods-comments"> | 2 | <div class="goods-comments" id="goods-comments"> |
3 | {{# comments}} | 3 | {{# comments}} |
4 | - <div class="comment-item"> | ||
5 | - <span class="user-name">{{userName}}</span> | ||
6 | - <span class="goods-spec"> 购买了 {{desc}}</span> | 4 | + <div class="comment-item clearfix"> |
5 | + <div class="user-info clearfix"> | ||
6 | + <span class="user-name">{{userName}}</span> | ||
7 | + <span class="goods-spec"> | ||
8 | + 购买了<b>{{color}}</b> | ||
9 | + </span> | ||
10 | + <span class="goods-size">/{{size}}</span> | ||
11 | + </div> | ||
7 | <p class="detail-content">{{content}}</p> | 12 | <p class="detail-content">{{content}}</p> |
8 | <span class="comment-time">{{time}}</span> | 13 | <span class="comment-time">{{time}}</span> |
9 | </div> | 14 | </div> |
@@ -9,14 +9,14 @@ | @@ -9,14 +9,14 @@ | ||
9 | <div id="feedback-content" > | 9 | <div id="feedback-content" > |
10 | <div class="comment-content content "> | 10 | <div class="comment-content content "> |
11 | {{#if commentsNum}} | 11 | {{#if commentsNum}} |
12 | - <div class="comment-content-main content-main"> | 12 | + <div class="comment-content-main content-main clearfix"> |
13 | {{# comments}} | 13 | {{# comments}} |
14 | <span class="user-name"> | 14 | <span class="user-name"> |
15 | {{userName}} | 15 | {{userName}} |
16 | </span> | 16 | </span> |
17 | - <span class="goods-spec"> | ||
18 | - 购买了{{desc}} | ||
19 | - </span> | 17 | + <p class="goods-spec"> |
18 | + 购买了{{desc}} | ||
19 | + </> | ||
20 | <p class="detail-content"> | 20 | <p class="detail-content"> |
21 | {{content}} | 21 | {{content}} |
22 | </p> | 22 | </p> |
@@ -9,17 +9,20 @@ | @@ -9,17 +9,20 @@ | ||
9 | <div id="feedback-content" > | 9 | <div id="feedback-content" > |
10 | <div class="comment-content content "> | 10 | <div class="comment-content content "> |
11 | {{#if commentsNum}} | 11 | {{#if commentsNum}} |
12 | - <div class="comment-content-main content-main"> | 12 | + <div class="comment-content-main content-main clearfix"> |
13 | + <div class="user-info clearfix"> | ||
13 | {{# comments}} | 14 | {{# comments}} |
14 | <span class="user-name"> | 15 | <span class="user-name"> |
15 | {{userName}} | 16 | {{userName}} |
16 | </span> | 17 | </span> |
17 | - <span class="goods-spec"> | ||
18 | - 购买了{{desc}} | ||
19 | - </span> | ||
20 | - <p class="detail-content"> | ||
21 | - {{content}} | ||
22 | - </p> | 18 | + <span class="goods-spec"> |
19 | + 购买了<b>{{color}}</b> | ||
20 | + </span> | ||
21 | + <span class="goods-size">/{{size}}</span> | ||
22 | + </div> | ||
23 | + <p class="detail-content"> | ||
24 | + {{content}} | ||
25 | + </p> | ||
23 | <span class="comment-time"> | 26 | <span class="comment-time"> |
24 | {{time}} | 27 | {{time}} |
25 | </span> | 28 | </span> |
@@ -114,6 +114,25 @@ | @@ -114,6 +114,25 @@ | ||
114 | color: $mainFontC; | 114 | color: $mainFontC; |
115 | } | 115 | } |
116 | 116 | ||
117 | + .user-info { | ||
118 | + max-width: 100%; | ||
119 | + } | ||
120 | + | ||
121 | + .goods-spec { | ||
122 | + max-width: 45%; | ||
123 | + display: inline-block; | ||
124 | + overflow: hidden; | ||
125 | + height: 62px; | ||
126 | + float: left; | ||
127 | + white-space: nowrap; | ||
128 | + text-overflow: ellipsis; | ||
129 | + } | ||
130 | + | ||
131 | + .goods-size { | ||
132 | + float: left; | ||
133 | + line-height: 62px; | ||
134 | + } | ||
135 | + | ||
117 | .goods-spec, | 136 | .goods-spec, |
118 | .comment-time { | 137 | .comment-time { |
119 | font-size: 24px; | 138 | font-size: 24px; |
@@ -696,6 +696,26 @@ $basicBtnC: #eb0313; | @@ -696,6 +696,26 @@ $basicBtnC: #eb0313; | ||
696 | color: $mainFontC; | 696 | color: $mainFontC; |
697 | padding-left: 28px; | 697 | padding-left: 28px; |
698 | padding-right: 18px; | 698 | padding-right: 18px; |
699 | + float: left; | ||
700 | + } | ||
701 | + | ||
702 | + .user-info { | ||
703 | + max-width: 100%; | ||
704 | + } | ||
705 | + | ||
706 | + .goods-spec { | ||
707 | + max-width: 45%; | ||
708 | + display: inline-block; | ||
709 | + overflow: hidden; | ||
710 | + height: 62px; | ||
711 | + float: left; | ||
712 | + white-space: nowrap; | ||
713 | + text-overflow: ellipsis; | ||
714 | + } | ||
715 | + | ||
716 | + .goods-size { | ||
717 | + float: left; | ||
718 | + line-height: 62px; | ||
699 | } | 719 | } |
700 | 720 | ||
701 | .goods-spec, | 721 | .goods-spec, |
-
Please register or login to post a comment