Authored by Rock Zhang

更新到201512080350静态资源

@@ -4828,19 +4828,28 @@ function hiddenTips($ele) { @@ -4828,19 +4828,28 @@ function hiddenTips($ele) {
4828 } 4828 }
4829 } 4829 }
4830 4830
4831 -function isFlexSupport() {  
4832 - var flex = document.createElement('p').style.flex,  
4833 - webkitFlex = document.createElement('p').style.webkitFlex,  
4834 - flexWrap = document.createElement('p').style.flexWrap;  
4835 -  
4836 - if ((flex === '' || webkitFlex === '') && flexWrap === '') {  
4837 - return true;  
4838 - } else {  
4839 - return false;  
4840 - } 4831 +//function isFlexSupport() {
  4832 +// var flex = document.createElement('p').style.flex,
  4833 +// webkitFlex = document.createElement('p').style.webkitFlex,
  4834 +// flexWrap = document.createElement('p').style.flexWrap;
  4835 +//
  4836 +// if ((flex === '' || webkitFlex === '') && flexWrap === '') {
  4837 +// return true;
  4838 +// } else {
  4839 +// return false;
  4840 +// }
  4841 +//}
  4842 +
  4843 +function wrapElements(selector, count) {
  4844 + $(selector).each(function(idx, el) {
  4845 + if (idx % count === 0) {
  4846 + $($(selector).slice(idx, idx + count)).wrapAll($('<div class="js-wraper"></div>'));
  4847 + }
  4848 + });
4841 } 4849 }
4842 4850
4843 4851
  4852 +
4844 function search() { 4853 function search() {
4845 if (searching || end) { 4854 if (searching || end) {
4846 return; 4855 return;
@@ -4875,9 +4884,10 @@ function search() { @@ -4875,9 +4884,10 @@ function search() {
4875 hiddenTips($('#size-swiper-container')); 4884 hiddenTips($('#size-swiper-container'));
4876 hiddenTips($('#reference-swiper-container')); 4885 hiddenTips($('#reference-swiper-container'));
4877 4886
4878 - if (!isFlexSupport()) {  
4879 - $('.detail .column').removeClass('column').addClass('oldbox');  
4880 - } 4887 + //if (!isFlexSupport()) {
  4888 + // $('.detail .column').removeClass('column').addClass('oldbox');
  4889 + //}
  4890 + wrapElements('.detail .column', 2);
4881 searching = false; 4891 searching = false;
4882 end = true; 4892 end = true;
4883 loading.hideLoadingMask(); 4893 loading.hideLoadingMask();
@@ -5778,9 +5788,6 @@ function loadData($parent, url, page) { @@ -5778,9 +5788,6 @@ function loadData($parent, url, page) {
5778 page: page 5788 page: page
5779 }, 5789 },
5780 success: function(data) { 5790 success: function(data) {
5781 -  
5782 - //setTimeout(function() { //模拟延时  
5783 -  
5784 if (url === 'favBrand') { 5791 if (url === 'favBrand') {
5785 $brandLoadMore.addClass('hide'); 5792 $brandLoadMore.addClass('hide');
5786 } else { 5793 } else {
@@ -5793,7 +5800,6 @@ function loadData($parent, url, page) { @@ -5793,7 +5800,6 @@ function loadData($parent, url, page) {
5793 } else if (data === 'end') { 5800 } else if (data === 'end') {
5794 $parent.closest('.fav-type').find('.fav-load-background') 5801 $parent.closest('.fav-type').find('.fav-load-background')
5795 .removeClass('fav-load-background').html('没有更多了'); 5802 .removeClass('fav-load-background').html('没有更多了');
5796 -  
5797 } else if (data.length > 10) { 5803 } else if (data.length > 10) {
5798 $parent.append(data); 5804 $parent.append(data);
5799 $parent.closest('.fav-type').find('.fav-content-loading').remove(); 5805 $parent.closest('.fav-type').find('.fav-content-loading').remove();
@@ -5804,14 +5810,8 @@ function loadData($parent, url, page) { @@ -5804,14 +5810,8 @@ function loadData($parent, url, page) {
5804 } else { 5810 } else {
5805 lockId = false;//请求成功后解锁商品收藏page++ 5811 lockId = false;//请求成功后解锁商品收藏page++
5806 } 5812 }
5807 -  
5808 - window.rePosFooter();  
5809 -  
5810 - } else {  
5811 - return;  
5812 } 5813 }
5813 -  
5814 - //},1000); 5814 + window.rePosFooter();
5815 } 5815 }
5816 }); 5816 });
5817 } 5817 }
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.