Merge branch 'feature/detail-comment-plus' into feature/recommend
Showing
8 changed files
with
33 additions
and
22 deletions
@@ -264,7 +264,7 @@ | @@ -264,7 +264,7 @@ | ||
264 | </span> | 264 | </span> |
265 | </p> | 265 | </p> |
266 | </div> | 266 | </div> |
267 | - <div data-comment-list="6"> | 267 | + <div data-comment-list="6" class="m-hide"> |
268 | <ul></ul> | 268 | <ul></ul> |
269 | <p class="more-wrap"> | 269 | <p class="more-wrap"> |
270 | <span class="load-more-comments load-more"> | 270 | <span class="load-more-comments load-more"> |
No preview for this file type
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata> | 4 | <metadata> |
5 | -Created by FontForge 20120731 at Fri Nov 4 10:22:25 2016 | 5 | +Created by FontForge 20120731 at Fri Nov 4 18:16:33 2016 |
6 | By admin | 6 | By admin |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
No preview for this file type
No preview for this file type
@@ -19,8 +19,8 @@ | @@ -19,8 +19,8 @@ | ||
19 | {{#if_cond comfort "===" "SMALL"}}偏小{{/if_cond}} | 19 | {{#if_cond comfort "===" "SMALL"}}偏小{{/if_cond}} |
20 | {{#if_cond comfort "===" "BIG"}}偏大{{/if_cond}} | 20 | {{#if_cond comfort "===" "BIG"}}偏大{{/if_cond}} |
21 | </dd> | 21 | </dd> |
22 | - {{#if height}}<dd>身高:{{height}} cm</dd>{{/if}} | ||
23 | - {{#if weight}}<dd>体重:{{weight}} kg</dd>{{/if}} | 22 | + <dd>{{#if height}}身高:{{height}} 厘米{{/if}}</dd> |
23 | + <dd>{{#if weight}}体重:{{weight}} 公斤{{/if}}</dd> | ||
24 | </dl> | 24 | </dl> |
25 | </div> | 25 | </div> |
26 | 26 | ||
@@ -33,12 +33,12 @@ | @@ -33,12 +33,12 @@ | ||
33 | </a> | 33 | </a> |
34 | <div class="img-detail"> | 34 | <div class="img-detail"> |
35 | <dl class="toolbar"> | 35 | <dl class="toolbar"> |
36 | - <dd data-role="preview-close"><i class="iconfong"></i>收起</dd> | ||
37 | - <dd data-role="preview-left"><i class="iconfong"></i>向左旋转</dd> | ||
38 | - <dd data-role="preview-right"><i class="iconfong"></i>向右旋转</dd> | 36 | + <dd data-role="preview-close"><i class="iconfont"></i>收起</dd> |
37 | + <dd data-role="preview-left"><i class="iconfont"></i>向左旋转</dd> | ||
38 | + <dd data-role="preview-right"><i class="iconfont"></i>向右旋转</dd> | ||
39 | </dl> | 39 | </dl> |
40 | <div class="img-wrap"> | 40 | <div class="img-wrap"> |
41 | - <img src="{{image url 400 400}}" /> | 41 | + <img src="{{image url 345 345}}" /> |
42 | </div> | 42 | </div> |
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
@@ -738,7 +738,8 @@ lazyLoad($('#details-html img')); | @@ -738,7 +738,8 @@ lazyLoad($('#details-html img')); | ||
738 | function fetchComment() { | 738 | function fetchComment() { |
739 | var commentPage = {}, // 每个类型的分页页码 | 739 | var commentPage = {}, // 每个类型的分页页码 |
740 | currentType = '7', // 当前评论展示的类型 | 740 | currentType = '7', // 当前评论展示的类型 |
741 | - consultPage = 1; | 741 | + consultPage = 1, |
742 | + cNumReady = false; // 只第一次请求后更新数量 | ||
742 | 743 | ||
743 | var commentsTpl = require('hbs/product/comment-item.hbs'), | 744 | var commentsTpl = require('hbs/product/comment-item.hbs'), |
744 | consultsTpl = require('hbs/product/consult-item.hbs'), | 745 | consultsTpl = require('hbs/product/consult-item.hbs'), |
@@ -783,15 +784,19 @@ function fetchComment() { | @@ -783,15 +784,19 @@ function fetchComment() { | ||
783 | 784 | ||
784 | // 更新总数显示 | 785 | // 更新总数显示 |
785 | // $commentNum.text(res[0].total); | 786 | // $commentNum.text(res[0].total); |
786 | - $(filter).each(function(idx, fit) { | ||
787 | - if (fit.num) { | ||
788 | - $('.comments [data-comment-type=' + fit.filterId + '] em').text(fit.num); | ||
789 | 787 | ||
790 | - if (fit.filterId === '7') { // 全部数量 | ||
791 | - $('.consult-comment .block-title .comment-num').text(fit.num); | 788 | + if (filter && filter.length && !cNumReady) { |
789 | + cNumReady = true; | ||
790 | + $(filter).each(function(idx, fit) { | ||
791 | + if (fit.num) { | ||
792 | + $('.comments [data-comment-type=' + fit.filterId + '] em').text(fit.num); | ||
793 | + | ||
794 | + if (fit.filterId === '7') { // 全部数量 | ||
795 | + $('.consult-comment .block-title .comment-num').text(fit.num); | ||
796 | + } | ||
792 | } | 797 | } |
793 | - } | ||
794 | - }); | 798 | + }); |
799 | + } | ||
795 | 800 | ||
796 | $ul.append(commentsTpl({ | 801 | $ul.append(commentsTpl({ |
797 | comments: res | 802 | comments: res |
1 | .product-detail-page { | 1 | .product-detail-page { |
2 | + .m-hide{ | ||
3 | + display:none; | ||
4 | + } | ||
2 | .brand-banner { | 5 | .brand-banner { |
3 | height: 45px; | 6 | height: 45px; |
4 | width: 100%; | 7 | width: 100%; |
@@ -877,7 +880,7 @@ | @@ -877,7 +880,7 @@ | ||
877 | height:20px; | 880 | height:20px; |
878 | width:90px; | 881 | width:90px; |
879 | cursor:pointer; | 882 | cursor:pointer; |
880 | - background: resolve(img/home/star.png) 0 -20px repeat-x; | 883 | + background: resolve("home/star.png") 0 -20px repeat-x; |
881 | 884 | ||
882 | .star-1, .star-2, .star-3, .star-4, .star-5{ | 885 | .star-1, .star-2, .star-3, .star-4, .star-5{ |
883 | position: absolute; | 886 | position: absolute; |
@@ -888,7 +891,7 @@ | @@ -888,7 +891,7 @@ | ||
888 | width: 18px; | 891 | width: 18px; |
889 | 892 | ||
890 | &.active { | 893 | &.active { |
891 | - background: resolve(img/home/star.png) repeat-x; | 894 | + background: resolve("home/star.png") repeat-x; |
892 | } | 895 | } |
893 | } | 896 | } |
894 | .star-2{ | 897 | .star-2{ |
@@ -906,7 +909,7 @@ | @@ -906,7 +909,7 @@ | ||
906 | 909 | ||
907 | &.editable > span{ | 910 | &.editable > span{ |
908 | &:hover{ | 911 | &:hover{ |
909 | - background: resolve(img/home/star.png) repeat-x; | 912 | + background: resolve("home/star.png") repeat-x; |
910 | } | 913 | } |
911 | } | 914 | } |
912 | } | 915 | } |
@@ -990,9 +993,9 @@ | @@ -990,9 +993,9 @@ | ||
990 | } | 993 | } |
991 | 994 | ||
992 | .img-wrap{ | 995 | .img-wrap{ |
993 | - width:400px; | ||
994 | - height:400px; | ||
995 | - | 996 | + width:345px; |
997 | + height:345px; | ||
998 | + overflow:hidden; | ||
996 | } | 999 | } |
997 | } | 1000 | } |
998 | 1001 | ||
@@ -1012,6 +1015,8 @@ | @@ -1012,6 +1015,8 @@ | ||
1012 | &.horizontal-list{ | 1015 | &.horizontal-list{ |
1013 | dd { | 1016 | dd { |
1014 | float:left; | 1017 | float:left; |
1018 | + width: 100px; | ||
1019 | + text-align: center; | ||
1015 | } | 1020 | } |
1016 | } | 1021 | } |
1017 | } | 1022 | } |
@@ -1073,6 +1078,7 @@ | @@ -1073,6 +1078,7 @@ | ||
1073 | float:left; | 1078 | float:left; |
1074 | margin-right:30px; | 1079 | margin-right:30px; |
1075 | cursor: pointer; | 1080 | cursor: pointer; |
1081 | + margin-bottom:0; | ||
1076 | 1082 | ||
1077 | &.active{ | 1083 | &.active{ |
1078 | font-weight:bold; | 1084 | font-weight:bold; |
-
Please register or login to post a comment