Authored by Lynnic

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/detailFix

Conflicts:
	template/m.yohobuy.com/actions/product/detail/index.phtml
	template/m.yohobuy.com/partials/product/feedback-tab.phtml
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 Mon Nov 23 16:04:11 2015 5 +Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015 @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015
19 bbox="-0.75 -224 3943 833" 19 bbox="-0.75 -224 3943 833"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 - unicode-range="U+0078-E63E" 22 + unicode-range="U+0078-E63F"
23 /> 23 />
24 <missing-glyph horiz-adv-x="374" 24 <missing-glyph horiz-adv-x="374"
25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> 25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
@@ -252,5 +252,10 @@ t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5 @@ -252,5 +252,10 @@ t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5
252 l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4 252 l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4
253 q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5 253 q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5
254 q-6 -21 -34 -21z" /> 254 q-6 -21 -34 -21z" />
  255 + <glyph glyph-name="uniE63F" unicode="&#xe63f;" horiz-adv-x="1025"
  256 +d="M512 -66q-10 0 -24.5 -0.5t-25 -1t-24 0t-24.5 1.5l-222 -146q0 227 5 243q-164 117 -192 282q-5 30 -5 60q0 122 68.5 223t186 158.5t257.5 57.5q104 0 199 -34t163.5 -92.5t109 -140t40.5 -172.5q0 -167 -126 -290q-124 -121 -312 -144q-37 -5 -74 -5zM512 763
  257 +q-91 0 -176.5 -31.5t-148.5 -83.5t-100.5 -124.5t-37.5 -150.5q0 -95 53 -179t142 -138v-170l146 97q16 -3 35.5 -4t49 0t37.5 1q41 0 81 6.5t77 18.5t72 29.5t65 39.5t56.5 47.5t47 55t35 61t22 66t7.5 69.5q0 104 -63.5 194.5t-170.5 143t-229 52.5zM768 300
  258 +q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM512 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM256 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5
  259 +t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5z" />
255 </font> 260 </font>
256 </defs></svg> 261 </defs></svg>
No preview for this file type
No preview for this file type
@@ -114,7 +114,7 @@ $page.on('touchstart', '.del-icon', function() { @@ -114,7 +114,7 @@ $page.on('touchstart', '.del-icon', function() {
114 }); 114 });
115 setTimeout(function() { 115 setTimeout(function() {
116 window.history.go(0); 116 window.history.go(0);
117 - }, 1000); 117 + }, 2500);
118 } 118 }
119 }, 119 },
120 complete: function() { 120 complete: function() {
1 var $ = require('jquery'), 1 var $ = require('jquery'),
2 - Hammer = require('yoho.hammer'),  
3 Swiper = require('yoho.iswiper'), 2 Swiper = require('yoho.iswiper'),
4 lazyLoad = require('yoho.lazyload'), 3 lazyLoad = require('yoho.lazyload'),
5 loading = require('../../plugin/loading'); 4 loading = require('../../plugin/loading');
6 5
7 var page = 1, 6 var page = 1,
8 winH, 7 winH,
9 - hotnav,  
10 listTop, 8 listTop,
11 navSwiper, 9 navSwiper,
12 notab = 0, 10 notab = 0,
@@ -15,42 +13,6 @@ var page = 1, @@ -15,42 +13,6 @@ var page = 1,
15 hotrankNav, 13 hotrankNav,
16 noResult = '<p class="no-result">未找到相关搜索结果</p>'; 14 noResult = '<p class="no-result">未找到相关搜索结果</p>';
17 15
18 -// var renderRank = {  
19 -// errMsg: '<p class="no-result">未找到相关搜索结果</p>',  
20 -// navSelector: '.goods-nav',  
21 -// rankSelector: '#hotRank',  
22 -// navHTML: null,  
23 -// data: null,  
24 -// inited: 0,  
25 -// setData: function(data) {  
26 -// this.data = data;  
27 -// },  
28 -// showDataEmptyMsg: function() {  
29 -// $(this.rankSelector).append(this.errMsg);  
30 -// },  
31 -// isDataEmpty: function() {  
32 -// if (this.data.indexOf('>') === -1) {  
33 -// return true;  
34 -// } else {  
35 -// return false;  
36 -// }  
37 -// },  
38 -// appendData: function() {  
39 -// if (!this.inited) {  
40 -// this.inited = 1;  
41 -// }  
42 -// $(this.rankSelector).append(this.data);  
43 -// },  
44 -// render: function(data) {  
45 -// this.setData(data);  
46 -// if (!this.isDataEmpty()) {  
47 -// this.appendData();  
48 -// } else {  
49 -// this.showDataEmptyMsg();  
50 -// }  
51 -// }  
52 -  
53 -// };  
54 16
55 function hotrank(page, sort, tabId, notab) { 17 function hotrank(page, sort, tabId, notab) {
56 loading.showLoadingMask(); 18 loading.showLoadingMask();
@@ -64,27 +26,6 @@ function hotrank(page, sort, tabId, notab) { @@ -64,27 +26,6 @@ function hotrank(page, sort, tabId, notab) {
64 notab: notab 26 notab: notab
65 }, 27 },
66 success: function(data) { 28 success: function(data) {
67 -  
68 - // if (page === 1) {  
69 - // $('.no-result').remove();  
70 - // $('.rank-main').remove();  
71 - // }  
72 -  
73 - // if (notab === 1) {  
74 - // if (data === ' ' && $('.rank-main').length < 1) {  
75 - // var hotrankNav = $('.goods-nav').prop("outerHTML");  
76 -  
77 - // $('#hotRank').html(hotrankNav + noResult);  
78 - // } else {  
79 - // $('#hotRank').append(data);  
80 - // }  
81 - // } else {  
82 - // if (data === ' ') {  
83 - // $('#hotRank').html(noResult);  
84 - // } else {  
85 - // $('#hotRank').append(data);  
86 - // }  
87 - // }  
88 if (data === ' ') { 29 if (data === ' ') {
89 if ($('.rank-main').length < 1 && $('.goods-nav').length < 1) { 30 if ($('.rank-main').length < 1 && $('.goods-nav').length < 1) {
90 $('#hotRank').html(noResult); 31 $('#hotRank').html(noResult);
@@ -100,11 +41,6 @@ function hotrank(page, sort, tabId, notab) { @@ -100,11 +41,6 @@ function hotrank(page, sort, tabId, notab) {
100 $('.rank-main').remove(); 41 $('.rank-main').remove();
101 $('#hotRank').append(data); 42 $('#hotRank').append(data);
102 } 43 }
103 -  
104 - // renderRank.render(data);  
105 -  
106 -  
107 -  
108 lazyLoad($('img.lazy')); 44 lazyLoad($('img.lazy'));
109 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top'); 45 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
110 winH = $(window).height(); 46 winH = $(window).height();
@@ -136,28 +72,35 @@ function scrollHandler() { @@ -136,28 +72,35 @@ function scrollHandler() {
136 hotrank(page, sort, id, notab); 72 hotrank(page, sort, id, notab);
137 } 73 }
138 74
139 -//srcoll to load more  
140 $(window).scroll(function() { 75 $(window).scroll(function() {
141 window.requestAnimationFrame(scrollHandler); 76 window.requestAnimationFrame(scrollHandler);
142 }); 77 });
143 78
144 hotrank(page, sort, id, notab); 79 hotrank(page, sort, id, notab);
145 -hotnav = new Hammer(document.getElementById('hotRank'));  
146 -hotnav.on('tap', function(e) { 80 +$('#hotRank').on('touchend touchcancel', function(e) {
147 var ev = ev || window.event; 81 var ev = ev || window.event;
148 var target = ev.target || ev.srcElement; 82 var target = ev.target || ev.srcElement;
149 83
150 if (target.nodeName.toLowerCase() === 'span') { 84 if (target.nodeName.toLowerCase() === 'span') {
151 - $('.s-goods-nav .nav-item').removeClass('active');  
152 target.parentNode.className = 'active ' + target.parentNode.className; 85 target.parentNode.className = 'active ' + target.parentNode.className;
153 id = target.getAttribute('data-id') ? target.getAttribute('data-id') : ''; 86 id = target.getAttribute('data-id') ? target.getAttribute('data-id') : '';
154 sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : ''; 87 sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : '';
155 page = 1; 88 page = 1;
156 -  
157 - // notab = renderRank.inited;  
158 notab = 1; 89 notab = 1;
159 -  
160 -  
161 hotrank(page, sort, id, notab); 90 hotrank(page, sort, id, notab);
162 } 91 }
163 }); 92 });
  93 +$('#hotRank').bind('contextmenu', function(e) {
  94 + return false;
  95 +});
  96 +$('#hotRank').on('touchstart', function(e) {
  97 + var ev = ev || window.event;
  98 + var target = ev.target || ev.srcElement;
  99 +
  100 + if (target.nodeName.toLowerCase() === 'span') {
  101 + target.parentNode.className = 'active ' + target.parentNode.className;
  102 + }
  103 +}).on('touchend touchcancel', function() {
  104 + $('.s-goods-nav .nav-item').removeClass('active');
  105 +});
  106 +
@@ -37,14 +37,14 @@ $basicBtnC:#eb0313; @@ -37,14 +37,14 @@ $basicBtnC:#eb0313;
37 .column { 37 .column {
38 box-sizing: border-box; 38 box-sizing: border-box;
39 padding: pxToRem(20px) pxToRem(12px); 39 padding: pxToRem(20px) pxToRem(12px);
40 - width: 50%;  
41 - border-bottom: 1px solid #fff;  
42 - border-right: 1px solid #fff; 40 + //width: 50%;
  41 + border-bottom: pxToRem(4px) solid #fff;
  42 + border-right: pxToRem(4px) solid #fff;
43 font-size: pxToRem(24px); 43 font-size: pxToRem(24px);
44 background-color: $tableCellC; 44 background-color: $tableCellC;
45 - float: left;  
46 display: flex; 45 display: flex;
47 align-items: center; 46 align-items: center;
  47 + flex-basis: 49.9%;
48 } 48 }
49 } 49 }
50 } 50 }
@@ -131,13 +131,14 @@ @@ -131,13 +131,14 @@
131 overflow: hidden; 131 overflow: hidden;
132 132
133 li { 133 li {
134 - margin: 0 0 0 (50rem / $pxConvertRem); 134 + margin: 0 (10rem / $pxConvertRem);
  135 + padding:0 (15rem / $pxConvertRem);
135 width: auto; 136 width: auto;
136 - height: 95%; 137 + height: 100%;
137 color: #999; 138 color: #999;
138 &.active{ 139 &.active{
139 color: #000; 140 color: #000;
140 - border-bottom:2px solid #000; 141 + background-color:#e0e0e0;
141 } 142 }
142 a { 143 a {
143 padding: 0; 144 padding: 0;
@@ -46,39 +46,34 @@ @@ -46,39 +46,34 @@
46 } 46 }
47 .detail { 47 .detail {
48 .material-item{ 48 .material-item{
49 - position: relative;  
50 - min-height: pxToRem(136px);  
51 margin: pxToRem(10px) 0; 49 margin: pxToRem(10px) 0;
52 - text-align: center;  
53 - display: flex;  
54 - align-items: center; 50 + @include flexbox((
  51 + display: flex,
  52 + align-items: center
  53 + ));
55 54
56 - // width: 100%;  
57 - // border-bottom:1px solid $borderC;  
58 img { 55 img {
59 - //position:absolute;  
60 - //top:0;  
61 - //bottom:0;  
62 - //left:0;  
63 - //margin:auto;  
64 - //width: pxToRem(90px);  
65 - //height: auto;  
66 - //padding-right: pxToRem(20px); 56 + margin: 0;
67 } 57 }
68 .material-image { 58 .material-image {
69 - display: inline-block;  
70 - width: 23%; 59 + @include flexbox((
  60 + display: flex,
  61 + flex-basis: 23%,
  62 + justify-content: center
  63 + ));
71 } 64 }
72 .material-desc { 65 .material-desc {
73 - //padding-left:pxToRem(120px);  
74 font-size: pxToRem(24px); 66 font-size: pxToRem(24px);
  67 + box-sizing: border-box;
75 text-align: left; 68 text-align: left;
76 - display: inline-block;  
77 - width: 75%;  
78 padding-left: 2%; 69 padding-left: 2%;
79 height: auto; 70 height: auto;
80 - line-height: pxToRem(40px); 71 + line-height: pxToRem(38px);
81 color: #4b4b4b; 72 color: #4b4b4b;
  73 + @include flexbox((
  74 + display: flex,
  75 + flex-basis: 76.9%
  76 + ));
82 } 77 }
83 &:last-child{ 78 &:last-child{
84 border-bottom: none; 79 border-bottom: none;
@@ -152,7 +147,7 @@ @@ -152,7 +147,7 @@
152 width: pxToRem(70px); 147 width: pxToRem(70px);
153 margin-top: pxToRem(55px); 148 margin-top: pxToRem(55px);
154 div{ 149 div{
155 - height: pxToRem(55px); 150 + height: pxToRem(55px);
156 .avatar { 151 .avatar {
157 display: inline-block; 152 display: inline-block;
158 width: pxToRem(40px); 153 width: pxToRem(40px);
@@ -12,9 +12,9 @@ @@ -12,9 +12,9 @@
12 {{# is_discount}} 12 {{# is_discount}}
13 <p class="good-tag sale-tag">SALE</p> 13 <p class="good-tag sale-tag">SALE</p>
14 {{/ is_discount}} 14 {{/ is_discount}}
15 - {{# is_yohoood}}  
16 - <p class="good-tag yohood-tag">新品节</p>  
17 - {{/ is_yohoood}} 15 + {{# is_yohood}}
  16 + <div class="good-tag yohood-tag">新品节</div>
  17 + {{/ is_yohood}}
18 {{# is_limited}} 18 {{# is_limited}}
19 <p class="good-tag limit-tag">限量商品</p> 19 <p class="good-tag limit-tag">限量商品</p>
20 {{/ is_limited}} 20 {{/ is_limited}}
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <ul class="swiper-wrapper clearfix"> 3 <ul class="swiper-wrapper clearfix">
4 {{# tabs}} 4 {{# tabs}}
5 {{# title}} 5 {{# title}}
6 - <li class="swiper-slide nav-item {{#if @first}} active{{/if}}"> 6 + <li class="swiper-slide nav-item">
7 <span data-sort="{{ params}}" data-id="{{ id}}" >{{ name}}</span> 7 <span data-sort="{{ params}}" data-id="{{ id}}" >{{ name}}</span>
8 </li> 8 </li>
9 {{/ title}} 9 {{/ title}}
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 </div> 44 </div>
45 45
46 <div class="answer"> 46 <div class="answer">
47 - <span class="iconfont comment">&#xe63d;</span> 47 + <span class="iconfont">&#xe63f;</span>
48 <p>{{answer}}</p> 48 <p>{{answer}}</p>
49 </div> 49 </div>
50 {{/ consults}} 50 {{/ consults}}
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 </div> 56 </div>
57 {{else}} 57 {{else}}
58 <div class="consult-content-main content-main no-item"> 58 <div class="consult-content-main content-main no-item">
59 - <span class="iconfont comment">&#xe63d;</span>暂无咨询 59 + <span class="iconfont">&#xe63f;</span>暂无咨询
60 </div> 60 </div>
61 <div class="consult-content-footer"> 61 <div class="consult-content-footer">
62 <a href="{{link}}"> 62 <a href="{{link}}">