Authored by 2586703@qq.com

swipe 调用js修改

@@ -161,9 +161,10 @@ define('yohood', function(require, exports) { @@ -161,9 +161,10 @@ define('yohood', function(require, exports) {
161 } 161 }
162 //首页 162 //首页
163 exports.index = function() { 163 exports.index = function() {
164 - var cooperateSwiper; 164 + var cooperateSwiper,
  165 + bannerSwipe;
165 //大banner滑动 166 //大banner滑动
166 - swipe.init({ 167 + bannerSwipe = swipe.init({
167 slideBox: '.slide-box', 168 slideBox: '.slide-box',
168 prev: '.slide-prev', 169 prev: '.slide-prev',
169 next: '.slide-next', 170 next: '.slide-next',
@@ -177,6 +178,10 @@ define('yohood', function(require, exports) { @@ -177,6 +178,10 @@ define('yohood', function(require, exports) {
177 } 178 }
178 }); 179 });
179 180
  181 + $('.dib').on('click', 'a', function() {
  182 + bannerSwipe.slide($(this).index());
  183 + })
  184 +
180 if ($('.slide-box').find('.box').size() <= 1) { 185 if ($('.slide-box').find('.box').size() <= 1) {
181 $('.slide-navigator').hide(); 186 $('.slide-navigator').hide();
182 $('.slide-control').hide(); 187 $('.slide-control').hide();
@@ -314,8 +319,9 @@ define('yohood', function(require, exports) { @@ -314,8 +319,9 @@ define('yohood', function(require, exports) {
314 319
315 //品牌 320 //品牌
316 exports.brand = function() { 321 exports.brand = function() {
  322 + var bannerSwipe;
317 //banner滑动 323 //banner滑动
318 - swipe.init({ 324 + bannerSwipe = swipe.init({
319 slideBox: '.slide-box', 325 slideBox: '.slide-box',
320 prev: '.slide-prev', 326 prev: '.slide-prev',
321 next: '.slide-next', 327 next: '.slide-next',
@@ -329,6 +335,10 @@ define('yohood', function(require, exports) { @@ -329,6 +335,10 @@ define('yohood', function(require, exports) {
329 } 335 }
330 }); 336 });
331 337
  338 + $('.dib').on('click', 'a', function() {
  339 + bannerSwipe.slide($(this).index());
  340 + })
  341 +
332 if ($('.slide-box').find('.box').size() <= 1) { 342 if ($('.slide-box').find('.box').size() <= 1) {
333 $('.slide-navigator').hide(); 343 $('.slide-navigator').hide();
334 $('.slide-control').hide(); 344 $('.slide-control').hide();
@@ -711,4 +721,4 @@ define('yohood', function(require, exports) { @@ -711,4 +721,4 @@ define('yohood', function(require, exports) {
711 //图片转换 721 //图片转换
712 imgTransform($(".image-box img")); 722 imgTransform($(".image-box img"));
713 } 723 }
714 -}); 724 +});