Authored by Lynnic

fixed bugs in goods detail page

@@ -1243,6 +1243,6 @@ @@ -1243,6 +1243,6 @@
1243 'cartInfo' : { 1243 'cartInfo' : {
1244 'numInCart' : 3, 1244 'numInCart' : 3,
1245 'goodsInstore' : 0, 1245 'goodsInstore' : 0,
1246 - 'isCollect':true 1246 + 'isCollect':true//
1247 } 1247 }
1248 } 1248 }
1 .goods-comments-page { 1 .goods-comments-page {
2 .goods-comments { 2 .goods-comments {
3 .comment-item { 3 .comment-item {
4 - border: 1px solid $borderC; 4 + border-bottom: 1px solid $borderC;
5 padding: 0 pxToRem(28px); 5 padding: 0 pxToRem(28px);
6 .user-name { 6 .user-name {
7 font-size: pxToRem(24px); 7 font-size: pxToRem(24px);
@@ -44,7 +44,8 @@ @@ -44,7 +44,8 @@
44 height: pxToRem(120px); 44 height: pxToRem(120px);
45 background-color: #ffffff; 45 background-color: #ffffff;
46 i, 46 i,
47 - span { 47 + span,
  48 + a {
48 line-height: pxToRem(120px); 49 line-height: pxToRem(120px);
49 font-size: pxToRem(28px); 50 font-size: pxToRem(28px);
50 color: $mainFontC; 51 color: $mainFontC;
@@ -30,50 +30,52 @@ $basicBtnC:#eb0313; @@ -30,50 +30,52 @@ $basicBtnC:#eb0313;
30 left: pxToRem(30px); 30 left: pxToRem(30px);
31 right: auto; 31 right: auto;
32 } 32 }
33 -.tag-container{ 33 +
  34 +.tag-container {
34 position: absolute; 35 position: absolute;
35 left: pxToRem(108px); 36 left: pxToRem(108px);
36 top: pxToRem(40px); 37 top: pxToRem(40px);
37 height: pxToRem(35px); 38 height: pxToRem(35px);
38 - // width: pxToRem(70px);  
39 - color: #fff;  
40 - font-size: pxToRem(20px);  
41 - line-height: pxToRem(35px);  
42 - z-index: 2;  
43 - .good-tag{  
44 - display: inline-block;  
45 - box-sizing: border-box;  
46 - margin-left: .5px;  
47 - font-size: pxToRem(23px);  
48 - text-align: center;  
49 - line-height: pxToRem(35px);  
50 - padding:0 8px;  
51 - }  
52 - .new-tag {  
53 - background-color: #78dc7e;  
54 - color: #fff;  
55 - }  
56 - .renew-tag {  
57 - background-color: #78dc7e;  
58 - color: #fff;  
59 - }  
60 - .sale-tag {  
61 - background-color: #ff575c;  
62 - color: #fff;  
63 - }  
64 - .new-festival-tag {  
65 - background-color: #000;  
66 - color: #fff;  
67 - }  
68 - .limit-tag {  
69 - border: 1px solid #000;  
70 - color: #000;  
71 - }  
72 - .soonSoldOut-tag{  
73 - background-color:#ffac5b;  
74 - color:#fff;  
75 - } 39 + // width: pxToRem(70px);
  40 + color: #fff;
  41 + font-size: pxToRem(20px);
  42 + line-height: pxToRem(35px);
  43 + z-index: 2;
  44 + .good-tag {
  45 + display: inline-block;
  46 + box-sizing: border-box;
  47 + margin-left: .5px;
  48 + font-size: pxToRem(23px);
  49 + text-align: center;
  50 + line-height: pxToRem(35px);
  51 + padding: 0 8px;
  52 + }
  53 + .new-tag {
  54 + background-color: #78dc7e;
  55 + color: #fff;
  56 + }
  57 + .renew-tag {
  58 + background-color: #78dc7e;
  59 + color: #fff;
  60 + }
  61 + .sale-tag {
  62 + background-color: #ff575c;
  63 + color: #fff;
  64 + }
  65 + .new-festival-tag {
  66 + background-color: #000;
  67 + color: #fff;
  68 + }
  69 + .limit-tag {
  70 + border: 1px solid #000;
  71 + color: #000;
  72 + }
  73 + .soonSoldOut-tag {
  74 + background-color: #ffac5b;
  75 + color: #fff;
  76 + }
76 } 77 }
  78 +
77 .good-detail-page { 79 .good-detail-page {
78 overflow: hidden; 80 overflow: hidden;
79 background-color: #f0f0f0; 81 background-color: #f0f0f0;
@@ -104,16 +106,16 @@ $basicBtnC:#eb0313; @@ -104,16 +106,16 @@ $basicBtnC:#eb0313;
104 width: 100%; 106 width: 100%;
105 // .row { 107 // .row {
106 // display: table-row; 108 // display: table-row;
107 - .column {  
108 - box-sizing:border-box;  
109 - display: table-cell;  
110 - padding: pxToRem(16px) pxToRem(12px);  
111 - width: 50%;  
112 - border: 1px solid #fff;  
113 - font-size: pxToRem(24px);  
114 - background-color: $tableCellC;  
115 - float:left;  
116 - } 109 + .column {
  110 + box-sizing: border-box;
  111 + display: table-cell;
  112 + padding: pxToRem(16px) pxToRem(12px);
  113 + width: 50%;
  114 + border: 1px solid #fff;
  115 + font-size: pxToRem(24px);
  116 + background-color: $tableCellC;
  117 + float: left;
  118 + }
117 // } 119 // }
118 } 120 }
119 } 121 }
@@ -136,15 +138,15 @@ $basicBtnC:#eb0313; @@ -136,15 +138,15 @@ $basicBtnC:#eb0313;
136 position: absolute; 138 position: absolute;
137 z-index: 2; 139 z-index: 2;
138 bottom: pxToRem(40px); 140 bottom: pxToRem(40px);
139 - .pagination-inner{  
140 - span{ 141 + .pagination-inner {
  142 + span {
141 background-color: #b0b0b0; 143 background-color: #b0b0b0;
142 } 144 }
143 .swiper-pagination-bullet { 145 .swiper-pagination-bullet {
144 margin-right: 2px; 146 margin-right: 2px;
145 } 147 }
146 .swiper-pagination-bullet-active { 148 .swiper-pagination-bullet-active {
147 - background-color: #000 ; 149 + background-color: #000;
148 } 150 }
149 } 151 }
150 } 152 }
@@ -227,8 +229,45 @@ $basicBtnC:#eb0313; @@ -227,8 +229,45 @@ $basicBtnC:#eb0313;
227 vertical-align: middle; 229 vertical-align: middle;
228 } 230 }
229 } 231 }
  232 + .vip-level {
  233 + box-sizing: box-border;
  234 + padding-left: pxToRem(28px);
  235 + padding-right: pxToRem(28px);
  236 + min-height: pxToRem(88px);
  237 + background-color: #fff;
  238 + .icons-item {
  239 + float: left;
  240 + width: 33.3%;
  241 + height: pxToRem(88px);
  242 + span {
  243 + display: inline-block;
  244 + line-height: pxToRem(88px);
  245 + }
  246 + .vip-img {
  247 + padding-right: pxToRem(22px);
  248 + .img {
  249 + width: pxToRem(53px);
  250 + height: pxToRem(32px);
  251 + }
  252 + &:nth-child(3n-3) .img {
  253 + background: image-url('product/silver.png') no-repeat;
  254 + }
  255 + &:nth-child(3n-2) .img {
  256 + background: image-url('product/golden.png') no-repeat;
  257 + }
  258 + &:nth-child(3n-1) .img {
  259 + background: image-url('product/platinum.png') no-repeat;
  260 + }
  261 + }
  262 + &:first-child {
  263 + float: left;
  264 + }
  265 + &:last-child {
  266 + float: right;
  267 + }
  268 + }
  269 + }
230 .vipLevel { 270 .vipLevel {
231 - width: 100%;  
232 box-sizing: border-box; 271 box-sizing: border-box;
233 background-color: #fff; 272 background-color: #fff;
234 display: table; 273 display: table;
@@ -242,25 +281,24 @@ $basicBtnC:#eb0313; @@ -242,25 +281,24 @@ $basicBtnC:#eb0313;
242 display: table-cell; 281 display: table-cell;
243 vertical-align: middle; 282 vertical-align: middle;
244 } 283 }
245 - .vip-img{ 284 + .vip-img {
246 padding-right: pxToRem(22px); 285 padding-right: pxToRem(22px);
247 - .img{  
248 - width: pxToRem(52px);  
249 - height: pxToRem(32px); 286 + .img {
  287 + width: pxToRem(53px);
  288 + height: pxToRem(33px);
250 } 289 }
251 - &:nth-child(3n-3) .img{ 290 + &:nth-child(3n-3) .img {
252 background: image-url('product/silver.png') no-repeat; 291 background: image-url('product/silver.png') no-repeat;
253 } 292 }
254 - &:nth-child(3n-2) .img{ 293 + &:nth-child(3n-2) .img {
255 background: image-url('product/golden.png') no-repeat; 294 background: image-url('product/golden.png') no-repeat;
256 } 295 }
257 - &:nth-child(3n-1) .img{ 296 + &:nth-child(3n-1) .img {
258 background: image-url('product/platinum.png') no-repeat; 297 background: image-url('product/platinum.png') no-repeat;
259 } 298 }
260 -  
261 } 299 }
262 .vip-price { 300 .vip-price {
263 - padding-right: pxToRem(55px); 301 + padding-right: pxToRem(52px);
264 } 302 }
265 .vip-price:last-child { 303 .vip-price:last-child {
266 padding-right: 0; 304 padding-right: 0;
@@ -295,7 +333,6 @@ $basicBtnC:#eb0313; @@ -295,7 +333,6 @@ $basicBtnC:#eb0313;
295 .goodsDiscount { 333 .goodsDiscount {
296 text-indent: pxToRem(-14px); 334 text-indent: pxToRem(-14px);
297 } 335 }
298 -  
299 .enter-store { 336 .enter-store {
300 min-height: pxToRem(100px); 337 min-height: pxToRem(100px);
301 display: table; 338 display: table;
@@ -327,7 +364,6 @@ $basicBtnC:#eb0313; @@ -327,7 +364,6 @@ $basicBtnC:#eb0313;
327 } 364 }
328 } 365 }
329 } 366 }
330 -  
331 //底部固定栏 367 //底部固定栏
332 .cart-bar { 368 .cart-bar {
333 position: relative; 369 position: relative;
@@ -350,10 +386,10 @@ $basicBtnC:#eb0313; @@ -350,10 +386,10 @@ $basicBtnC:#eb0313;
350 font-size: pxToRem(34px); 386 font-size: pxToRem(34px);
351 color: #ccc 387 color: #ccc
352 } 388 }
353 - &.favorite.liked{  
354 - color:$basicBtnC;; 389 + &.favorite.liked {
  390 + color: $basicBtnC;
  391 + ;
355 } 392 }
356 -  
357 &.addto-cart, 393 &.addto-cart,
358 &.sold-out { 394 &.sold-out {
359 height: pxToRem(80px); 395 height: pxToRem(80px);
@@ -382,11 +418,10 @@ $basicBtnC:#eb0313; @@ -382,11 +418,10 @@ $basicBtnC:#eb0313;
382 font-size: pxToRem(24px); 418 font-size: pxToRem(24px);
383 } 419 }
384 } 420 }
385 -  
386 - .recommend-for-you{ 421 + .recommend-for-you {
387 margin-bottom: pxToRem(120px); 422 margin-bottom: pxToRem(120px);
388 } 423 }
389 } 424 }
  425 +
390 @import "comments-consults"; 426 @import "comments-consults";
391 @import "product-description"; 427 @import "product-description";
392 -  
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <div class="goto-consult"> 3 <div class="goto-consult">
4 <i class="iconfont consult-logo">&#xe639;</i> 4 <i class="iconfont consult-logo">&#xe639;</i>
5 <span>我要咨询</span> 5 <span>我要咨询</span>
6 - <i class="iconfont enter-consult-page">&#xe604;</i> 6 + <a href="/product/detail/consultform" class="iconfont enter-consult-page">&#xe604;</a>
7 </div> 7 </div>
8 {{# consults}} 8 {{# consults}}
9 <div class="goods-consults"> 9 <div class="goods-consults">
@@ -52,6 +52,19 @@ @@ -52,6 +52,19 @@
52 {{/ periodOfMarket}} 52 {{/ periodOfMarket}}
53 </div> 53 </div>
54 54
  55 + <!-- {{# vipLevel}}
  56 + <ul class="vip-level clearfix">
  57 + {{# list}}
  58 + <li class="icons-item">
  59 + <span class="vip-img">
  60 + <div class="img" alt="" style="background-size:cover;"></div>
  61 + </span>
  62 + <span class="vip-price">{{text}}</span>
  63 + </li>
  64 + {{/ list}}
  65 + </ul>
  66 + {{/vipLevel}} -->
  67 +
55 {{# vipLevel}} 68 {{# vipLevel}}
56 <div class="vipLevel"> 69 <div class="vipLevel">
57 {{# list}} 70 {{# list}}
@@ -118,11 +131,8 @@ @@ -118,11 +131,8 @@
118 {{else}} 131 {{else}}
119 <a href="" class="sold-out">已售罄</a> 132 <a href="" class="sold-out">已售罄</a>
120 {{/if}} 133 {{/if}}
121 - {{#if isCollect}}  
122 - <a href="#" id="likeBtn" class="favorite iconfont liked">&#xe605;</a>  
123 - {{else}}  
124 - <a href="" id="likeBtn" class="favorite iconfont">&#xe605;</a>  
125 - {{/if}} 134 +
  135 + <a href="#" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
126 </div> 136 </div>
127 {{/cartInfo}} 137 {{/cartInfo}}
128 138
@@ -166,7 +166,13 @@ @@ -166,7 +166,13 @@
166 {{!-- 商品详情评论 --}} 166 {{!-- 商品详情评论 --}}
167 {{#if goodsCommentsPage}} 167 {{#if goodsCommentsPage}}
168 <script> 168 <script>
169 - seajs.use('js/product/detail/comments-consults'); 169 + seajs.use('js/product/detail/loadmore');
  170 +</script>
  171 +{{/if}}
  172 +{{!-- 商品详情咨询 --}}
  173 +{{#if goodsConsultsPage}}
  174 +<script>
  175 + seajs.use('js/product/detail/loadmore');
170 </script> 176 </script>
171 {{/if}} 177 {{/if}}
172 {{!-- 品类 --}} 178 {{!-- 品类 --}}
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 <span class="iconfont">&#xe63c;</span>暂无咨询 59 <span class="iconfont">&#xe63c;</span>暂无咨询
60 </div> 60 </div>
61 <div class="consult-content-footer"> 61 <div class="consult-content-footer">
62 - <a href="{{link}}"> 62 + <a href="/consultform">
63 我要咨询 63 我要咨询
64 <span class="iconfont">&#xe604;</span></a> 64 <span class="iconfont">&#xe604;</span></a>
65 </div> 65 </div>