Authored by whb

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

@@ -150,8 +150,22 @@ function changeSizeChosed(newSizeIndex) { @@ -150,8 +150,22 @@ function changeSizeChosed(newSizeIndex) {
150 return $curSizeBlock.data('num'); 150 return $curSizeBlock.data('num');
151 } 151 }
152 } 152 }
  153 +
  154 + //老的选中尺码在新选中的颜色对应尺码中不存在,需要下述1,2,3,4
  155 + // 1.重置尺码选择的标志变量.
153 $curSizeBlock = null; 156 $curSizeBlock = null;
154 - return 0; 157 + hasChooseSize = false;
  158 +
  159 + // 2.当前颜色行隐藏
  160 + $colorRowList.eq(curColorIndex).addClass('hide');
  161 +
  162 + // 3.目标颜色行第一行显示
  163 + $colorRowList.eq(0).removeClass('hide');
  164 +
  165 + // 4.老的选中颜色去掉勾选,新的选中颜色加上勾选
  166 + //changeColorChosed(0);
  167 +
  168 + return -1;
155 } 169 }
156 return 0; 170 return 0;
157 } 171 }
@@ -221,6 +235,14 @@ $yohoPage.on('touchstart', '.color-list .block', function() { @@ -221,6 +235,14 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
221 $sizeRowList.eq(index + 1).removeClass('hide'); 235 $sizeRowList.eq(index + 1).removeClass('hide');
222 236
223 curSizeIndex = index + 1; 237 curSizeIndex = index + 1;
  238 +
  239 + // 特殊处理
  240 + //if (-1 === curGoodNum) {
  241 + //
  242 + // //index = $this.data('index') - 1;
  243 + //
  244 + //}
  245 +
224 $curColorBlock = $this; 246 $curColorBlock = $this;
225 247
226 // 修改颜色时修改商品图片 248 // 修改颜色时修改商品图片
@@ -35,13 +35,18 @@ module.exports = function(specificGender) { @@ -35,13 +35,18 @@ module.exports = function(specificGender) {
35 } else if (lifestyleType) { 35 } else if (lifestyleType) {
36 36
37 //有货币页面加载男生首页的数据 37 //有货币页面加载男生首页的数据
38 - url = specificGender ? '/product/recom/maylike?gender=1,3' : '/product/recom/maylikelife'; 38 + url = specificGender === 'lifestyle' ? '/product/recom/maylike?gender=1,3' : '/product/recom/maylikelife';
39 } else { 39 } else {
40 gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ? 40 gender = (specificGender === 'boys' || $('.mobile-wrap').hasClass('boys-wrap')) ?
41 '1,3' : '2,3', 41 '1,3' : '2,3',
42 url = '/product/recom/maylike?gender=' + gender; 42 url = '/product/recom/maylike?gender=' + gender;
43 } 43 }
44 44
  45 + //以防cookie异常,强制加载男首
  46 + if (specificGender === 'boys') {
  47 + url = '/product/recom/maylike?gender=1,3';
  48 + }
  49 +
45 $curNav = $navList.children('.focus'); 50 $curNav = $navList.children('.focus');
46 51
47 if (lifestyleType) { 52 if (lifestyleType) {
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 */ 5 */
6 6
7 function getGender() { 7 function getGender() {
8 - return window.cookie('_Channel'); 8 + return window.cookie('_Channel') || 'boys';
9 } 9 }
10 10
11 require('../home/maybe-like')(getGender()); 11 require('../home/maybe-like')(getGender());