Authored by hf

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

@@ -24,14 +24,14 @@ class Yohobuy @@ -24,14 +24,14 @@ class Yohobuy
24 // const YOHOBUY_URL = 'http://www.yohobuy.com/'; 24 // const YOHOBUY_URL = 'http://www.yohobuy.com/';
25 25
26 //java API 26 //java API
27 - /**const API_URL = 'http://apih5.yoho.cn/';  
28 - const API_URL2 = 'http://apih5.yoho.cn/';  
29 - const SERVICE_URL = 'http://serviceh5.yoho.cn/';  
30 - const YOHOBUY_URL = 'http://www.yohobuy.com/';  
31 - const API_OLD = 'http://api2.open.yohobuy.com/';**/ 27 +// const API_URL = 'http://apih5.yoho.cn/';
  28 +// const API_URL2 = 'http://apih5.yoho.cn/';
  29 +// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
  30 +// const YOHOBUY_URL = 'http://www.yohobuy.com/';
  31 +// const API_OLD = 'http://api2.open.yohobuy.com/';
32 32
33 /* 测试环境 */ 33 /* 测试环境 */
34 - const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/' 34 + const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
35 const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; 35 const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
36 const YOHOBUY_URL = 'http://www.yohobuy.com/'; 36 const YOHOBUY_URL = 'http://www.yohobuy.com/';
37 const API_OLD = 'http://test2.open.yohobuy.com/'; 37 const API_OLD = 'http://test2.open.yohobuy.com/';
@@ -1708,6 +1708,7 @@ var start = 0, @@ -1708,6 +1708,7 @@ var start = 0,
1708 lazyLoad($('img.lazy')); 1708 lazyLoad($('img.lazy'));
1709 1709
1710 $('.nav-btn').on('touchstart', function(event) { 1710 $('.nav-btn').on('touchstart', function(event) {
  1711 + $sideNav.css('pointer-events', 'none');
1711 $mobileWrap.addClass('menu-open'); 1712 $mobileWrap.addClass('menu-open');
1712 $overlay.show().css('opacity', 0.3); 1713 $overlay.show().css('opacity', 0.3);
1713 $sideNav.addClass('on'); 1714 $sideNav.addClass('on');
@@ -1720,6 +1721,11 @@ $('.nav-btn').on('touchstart', function(event) { @@ -1720,6 +1721,11 @@ $('.nav-btn').on('touchstart', function(event) {
1720 height: $(window).height(), 1721 height: $(window).height(),
1721 overflow: 'hidden' 1722 overflow: 'hidden'
1722 }); 1723 });
  1724 +
  1725 + setTimeout(function() {
  1726 + $sideNav.css('pointer-events', 'auto');
  1727 + }, 400);
  1728 +
1723 return false; 1729 return false;
1724 }); 1730 });
1725 1731
@@ -6917,8 +6923,8 @@ function loadData($parent, url, page) { @@ -6917,8 +6923,8 @@ function loadData($parent, url, page) {
6917 page: page 6923 page: page
6918 }, 6924 },
6919 success: function(data) { 6925 success: function(data) {
6920 - var $loadingMask = $parent.closest('.fav-type').find('.fav-content-loading');  
6921 - 6926 + var $loadingMask = $parent.closest('.fav-type').find('.fav-content-loading');
  6927 +
6922 if (url === 'favBrand') { 6928 if (url === 'favBrand') {
6923 $brandLoadMore.addClass('hide'); 6929 $brandLoadMore.addClass('hide');
6924 } else { 6930 } else {
@@ -6929,23 +6935,23 @@ function loadData($parent, url, page) { @@ -6929,23 +6935,23 @@ function loadData($parent, url, page) {
6929 $loadingMask.addClass('hide'); 6935 $loadingMask.addClass('hide');
6930 $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); 6936 $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
6931 } else if (data === 'end') { 6937 } else if (data === 'end') {
6932 -  
6933 - //处理data等于end时如果loadingMask存在且没有hide样式的情况  
6934 - if ($loadingMask && !$loadingMask.hasClass('hide')) { 6938 +
  6939 + //处理data等于end时如果loadingMask存在且没有hide样式的情况
  6940 + if ($loadingMask && !$loadingMask.hasClass('hide')) {
6935 $loadingMask.addClass('hide'); 6941 $loadingMask.addClass('hide');
6936 - $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');  
6937 - }  
6938 - 6942 + //$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
  6943 + }
  6944 +
6939 $parent.closest('.fav-type').find('.fav-load-background') 6945 $parent.closest('.fav-type').find('.fav-load-background')
6940 - .removeClass('fav-load-background').html('没有更多了');  
6941 - 6946 + .removeClass('fav-load-background').html('没有更多了');
  6947 +
6942 // hf: fixes bug to 修改没有数据还调接口,加载错误页面问题 6948 // hf: fixes bug to 修改没有数据还调接口,加载错误页面问题
6943 brandLockId = true; 6949 brandLockId = true;
6944 lockId = true; 6950 lockId = true;
6945 } else if (data.length > 10) { 6951 } else if (data.length > 10) {
6946 $parent.append(data); 6952 $parent.append(data);
6947 -  
6948 - //如果有数据loadingMask会被remove掉 6953 +
  6954 + //如果有数据loadingMask会被remove掉
6949 $loadingMask.remove(); 6955 $loadingMask.remove();
6950 if (url === 'favBrand') { 6956 if (url === 'favBrand') {
6951 initSwiper(data);//如果是收藏品牌需要初始化swiper 6957 initSwiper(data);//如果是收藏品牌需要初始化swiper
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -66,7 +66,7 @@ $('.overlay').on('touchstart', function(e) { @@ -66,7 +66,7 @@ $('.overlay').on('touchstart', function(e) {
66 }); 66 });
67 67
68 //点击一级导航,弹出二级导航 68 //点击一级导航,弹出二级导航
69 -$sideNav.on('touchstart', 'li', function(e) { 69 +$sideNav.on('touchend', 'li', function(e) {
70 if ($(this).find('.sub-nav').size() > 0) { 70 if ($(this).find('.sub-nav').size() > 0) {
71 $('.sub-nav').removeClass('show'); 71 $('.sub-nav').removeClass('show');
72 $(this).find('.sub-nav').addClass('show'); 72 $(this).find('.sub-nav').addClass('show');