Authored by yyqing

修复焦点图重复初始化问题

@@ -79,9 +79,8 @@ $nav.on('touchend touchcancel', function(e) { @@ -79,9 +79,8 @@ $nav.on('touchend touchcancel', function(e) {
79 $loading.addClass('hide'); 79 $loading.addClass('hide');
80 $noMore.addClass('hide'); 80 $noMore.addClass('hide');
81 81
82 - loadMore($content, $.extend({  
83 - isTab: true  
84 - }, state[curType])); 82 + state[curType].isTab = true;
  83 + loadMore($content, state[curType]);
85 } else { 84 } else {
86 85
87 //重置当前Tab的load-more 86 //重置当前Tab的load-more
@@ -30,7 +30,6 @@ if ($loadMoreInfo.length > 0) { @@ -30,7 +30,6 @@ if ($loadMoreInfo.length > 0) {
30 30
31 //初始化swiper 31 //初始化swiper
32 function initSwiper(typeId) { 32 function initSwiper(typeId) {
33 - console.log(typeId);  
34 if (typeof typeId === undefined) { 33 if (typeof typeId === undefined) {
35 return; 34 return;
36 } 35 }
@@ -219,10 +218,12 @@ function loadMore($container, opt, url) { @@ -219,10 +218,12 @@ function loadMore($container, opt, url) {
219 opt.page++; 218 opt.page++;
220 219
221 searching = false; 220 searching = false;
  221 + delete opt.isTab;
222 }, 222 },
223 error: function() { 223 error: function() {
224 tip.show('网络断开连接了~'); 224 tip.show('网络断开连接了~');
225 searching = false; 225 searching = false;
  226 + delete opt.isTab;
226 } 227 }
227 }); 228 });
228 } 229 }