商品详情页 评价列表页面修改 -- code reviewed LiangZhifeng
Showing
6 changed files
with
37 additions
and
25 deletions
@@ -1113,7 +1113,8 @@ | @@ -1113,7 +1113,8 @@ | ||
1113 | 'feedbacks' : { | 1113 | 'feedbacks' : { |
1114 | 'commentsNum' : 0, | 1114 | 'commentsNum' : 0, |
1115 | 'consultsNum' : 1, | 1115 | 'consultsNum' : 1, |
1116 | - 'link' : '', | 1116 | + 'commentsUrl' : '', |
1117 | + 'consultsUrl' : '', | ||
1117 | 'comments' : [ | 1118 | 'comments' : [ |
1118 | { | 1119 | { |
1119 | 'userName' : 'Lynnic', | 1120 | 'userName' : 'Lynnic', |
@@ -1243,6 +1244,20 @@ | @@ -1243,6 +1244,20 @@ | ||
1243 | 'id' : '', | 1244 | 'id' : '', |
1244 | 'preferenceUrl' :'' | 1245 | 'preferenceUrl' :'' |
1245 | } | 1246 | } |
1247 | +### 评价列表页面 | ||
1248 | + { | ||
1249 | + 'comments':{ | ||
1250 | + 'list' : [ | ||
1251 | + { | ||
1252 | + 'userName':'', | ||
1253 | + 'desc':'', | ||
1254 | + 'content':'', | ||
1255 | + 'time':'' | ||
1256 | + } | ||
1257 | + ... | ||
1258 | + ] | ||
1259 | + } | ||
1260 | + } | ||
1246 | ### 咨询列表页面 | 1261 | ### 咨询列表页面 |
1247 | { | 1262 | { |
1248 | 'link' : '咨询表单跳转url', | 1263 | 'link' : '咨询表单跳转url', |
@@ -9,10 +9,7 @@ var $ = require('jquery'), | @@ -9,10 +9,7 @@ var $ = require('jquery'), | ||
9 | 9 | ||
10 | var commentsNum,consultsNum; | 10 | var commentsNum,consultsNum; |
11 | 11 | ||
12 | -var consultFooterEle = $('.consult-content-footer')[0], | ||
13 | - consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle), | ||
14 | - | ||
15 | - navtabEle = document.getElementById('nav-tab'), | 12 | +var navtabEle = document.getElementById('nav-tab'), |
16 | navtabHammer = navtabEle && new Hammer(navtabEle), | 13 | navtabHammer = navtabEle && new Hammer(navtabEle), |
17 | 14 | ||
18 | gotoConsultEle = document.getElementById('goto-consult'), | 15 | gotoConsultEle = document.getElementById('goto-consult'), |
@@ -66,12 +63,6 @@ if (navtabHammer) { | @@ -66,12 +63,6 @@ if (navtabHammer) { | ||
66 | }); | 63 | }); |
67 | } | 64 | } |
68 | 65 | ||
69 | -if (consultFooterHammer) { | ||
70 | - consultFooterHammer.on('tap', function() { | ||
71 | - location.href = $(consultFooterEle).data('href'); | ||
72 | - }); | ||
73 | -} | ||
74 | - | ||
75 | if (gotoConsultHammer) { | 66 | if (gotoConsultHammer) { |
76 | gotoConsultHammer.on('tap', function() { | 67 | gotoConsultHammer.on('tap', function() { |
77 | location.href = $(gotoConsultEle).data('href'); | 68 | location.href = $(gotoConsultEle).data('href'); |
@@ -168,9 +168,6 @@ | @@ -168,9 +168,6 @@ | ||
168 | &.focus { | 168 | &.focus { |
169 | color: #000; | 169 | color: #000; |
170 | } | 170 | } |
171 | - .comments-num { | ||
172 | - display: none; | ||
173 | - } | ||
174 | } | 171 | } |
175 | .comment-nav { | 172 | .comment-nav { |
176 | border-right: 1px solid #ccc; | 173 | border-right: 1px solid #ccc; |
@@ -286,19 +283,18 @@ | @@ -286,19 +283,18 @@ | ||
286 | 283 | ||
287 | .comment-content-footer, | 284 | .comment-content-footer, |
288 | .consult-content-footer { | 285 | .consult-content-footer { |
286 | + display: block; | ||
289 | min-height: pxToRem(88px); | 287 | min-height: pxToRem(88px); |
290 | text-align: center; | 288 | text-align: center; |
291 | background-color: #fff; | 289 | background-color: #fff; |
292 | border-bottom: 1px solid $borderC; | 290 | border-bottom: 1px solid $borderC; |
293 | line-height: pxToRem(88px); | 291 | line-height: pxToRem(88px); |
294 | font-size: pxToRem(28px); | 292 | font-size: pxToRem(28px); |
295 | - a { | ||
296 | color: #b0b0b0; | 293 | color: #b0b0b0; |
297 | .iconfont { | 294 | .iconfont { |
298 | font-size: inherit; | 295 | font-size: inherit; |
299 | } | 296 | } |
300 | } | 297 | } |
301 | - } | ||
302 | 298 | ||
303 | .content.hide { | 299 | .content.hide { |
304 | display: none; | 300 | display: none; |
@@ -250,8 +250,15 @@ $basicBtnC:#eb0313; | @@ -250,8 +250,15 @@ $basicBtnC:#eb0313; | ||
250 | padding-right: pxToRem(28px); | 250 | padding-right: pxToRem(28px); |
251 | border-bottom: 1px solid $borderC; | 251 | border-bottom: 1px solid $borderC; |
252 | background-color: $pageBgC; | 252 | background-color: $pageBgC; |
253 | - display: flex; | ||
254 | - align-items: center; | 253 | + @include flexbox(( |
254 | + box-flex: 1.0, | ||
255 | + display: box, | ||
256 | + box-align: center | ||
257 | + ), $version: 1); | ||
258 | + @include flexbox(( | ||
259 | + display: flex, | ||
260 | + align-items: center | ||
261 | + )); | ||
255 | span{ | 262 | span{ |
256 | // display: table-cell; | 263 | // display: table-cell; |
257 | display: -webkit-box; | 264 | display: -webkit-box; |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | {{userName}} | 8 | {{userName}} |
9 | </span> | 9 | </span> |
10 | <span class="goods-spec"> | 10 | <span class="goods-spec"> |
11 | - {{desc}} | 11 | + 购买了 {{desc}} |
12 | </span> | 12 | </span> |
13 | <p class="detail-content"> | 13 | <p class="detail-content"> |
14 | {{content}} | 14 | {{content}} |
1 | <ul id="nav-tab" class="nav-tab clearfix"> | 1 | <ul id="nav-tab" class="nav-tab clearfix"> |
2 | - <li class="comment-nav tap-hightlight">商品评价<span class="comments-num">{{commentsNum}}</span></li> | 2 | + <li class="comment-nav tap-hightlight">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li> |
3 | <li class="consult-nav tap-hightlight">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li> | 3 | <li class="consult-nav tap-hightlight">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li> |
4 | </ul> | 4 | </ul> |
5 | <div id="feedback-content" > | 5 | <div id="feedback-content" > |
@@ -21,6 +21,10 @@ | @@ -21,6 +21,10 @@ | ||
21 | </span> | 21 | </span> |
22 | {{/ comments}} | 22 | {{/ comments}} |
23 | </div> | 23 | </div> |
24 | + <a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}"> | ||
25 | + 查看更多 | ||
26 | + <span class="iconfont"></span> | ||
27 | + </a> | ||
24 | {{^}} | 28 | {{^}} |
25 | <div class="comment-content-main content-main no-item"> | 29 | <div class="comment-content-main content-main no-item"> |
26 | <span class="iconfont"></span>暂无评论 | 30 | <span class="iconfont"></span>暂无评论 |
@@ -46,17 +50,16 @@ | @@ -46,17 +50,16 @@ | ||
46 | </div> | 50 | </div> |
47 | {{/ consults}} | 51 | {{/ consults}} |
48 | </div> | 52 | </div> |
49 | - <div class="consult-content-footer tap-hightlight" data-href="{{link}}"> | ||
50 | - <a href="javascript:;"> | 53 | + <a class="consult-content-footer tap-hightlight" href="{{consultsUrl}}"> |
51 | 查看更多 | 54 | 查看更多 |
52 | - <span class="iconfont"></span></a> | ||
53 | - </div> | 55 | + <span class="iconfont"></span> |
56 | + </a> | ||
54 | {{else}} | 57 | {{else}} |
55 | <div class="consult-content-main content-main no-item"> | 58 | <div class="consult-content-main content-main no-item"> |
56 | <span class="iconfont"></span>暂无咨询 | 59 | <span class="iconfont"></span>暂无咨询 |
57 | </div> | 60 | </div> |
58 | 61 | ||
59 | - <div class="consult-content-footer tap-hightlight" data-href="{{link}}"> | 62 | + <div class="consult-content-footer tap-hightlight" data-href="{{commentsLink}}"> |
60 | <a href="javascript:;"> | 63 | <a href="javascript:;"> |
61 | 我要咨询 | 64 | 我要咨询 |
62 | <span class="iconfont"></span></a> | 65 | <span class="iconfont"></span></a> |
-
Please register or login to post a comment