Showing
2 changed files
with
14 additions
and
14 deletions
@@ -23,6 +23,18 @@ require('activity/trend/trend.page.css'); | @@ -23,6 +23,18 @@ require('activity/trend/trend.page.css'); | ||
23 | require('activity/trend/share'); | 23 | require('activity/trend/share'); |
24 | require('activity/trend/map'); | 24 | require('activity/trend/map'); |
25 | 25 | ||
26 | + | ||
27 | +function autoScroll(thisPo) { | ||
28 | + $navUl.find('.nav-item:eq(' + thisPo + ')').addClass('active').siblings('li').removeClass('active'); | ||
29 | + if (thisPo >= 2) { | ||
30 | + | ||
31 | + // 倒数三个不触发效果 | ||
32 | + if ((sNum - thisPo) >= 3) { | ||
33 | + myScroll.scrollTo((0 - (thisPo - 2) * sWidth), 0, 400); | ||
34 | + } | ||
35 | + } | ||
36 | +} | ||
37 | + | ||
26 | $( | 38 | $( |
27 | function() { | 39 | function() { |
28 | 40 | ||
@@ -519,7 +531,7 @@ $( | @@ -519,7 +531,7 @@ $( | ||
519 | $navUl.removeClass('srolling'); | 531 | $navUl.removeClass('srolling'); |
520 | var thisPo = Math.ceil((0 - myScroll.x) / sWidth + 1.5); | 532 | var thisPo = Math.ceil((0 - myScroll.x) / sWidth + 1.5); |
521 | 533 | ||
522 | - indexAct.autoScroll(thisPo); | 534 | + autoScroll(thisPo); |
523 | indexAct.getTimeList(); | 535 | indexAct.getTimeList(); |
524 | } | 536 | } |
525 | }); | 537 | }); |
@@ -530,7 +542,7 @@ $( | @@ -530,7 +542,7 @@ $( | ||
530 | if (!$(this).hasClass('disable')) { | 542 | if (!$(this).hasClass('disable')) { |
531 | var thisPo = $(this).index(); | 543 | var thisPo = $(this).index(); |
532 | 544 | ||
533 | - indexAct.autoScroll(thisPo); | 545 | + autoScroll(thisPo); |
534 | indexAct.getTimeList(); | 546 | indexAct.getTimeList(); |
535 | } | 547 | } |
536 | }); | 548 | }); |
@@ -244,17 +244,6 @@ function checkSubmit() { | @@ -244,17 +244,6 @@ function checkSubmit() { | ||
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
247 | -function autoScroll(thisPo) { | ||
248 | - $navUl.find('.nav-item:eq(' + thisPo + ')').addClass('active').siblings('li').removeClass('active'); | ||
249 | - if (thisPo >= 2) { | ||
250 | - | ||
251 | - // 倒数三个不触发效果 | ||
252 | - if ((sNum - thisPo) >= 3) { | ||
253 | - myScroll.scrollTo((0 - (thisPo - 2) * sWidth), 0, 400); | ||
254 | - } | ||
255 | - } | ||
256 | -} | ||
257 | - | ||
258 | function diaHide() { | 247 | function diaHide() { |
259 | $('#dialog-wrapper').hide(); | 248 | $('#dialog-wrapper').hide(); |
260 | } | 249 | } |
@@ -379,7 +368,6 @@ module.exports = { | @@ -379,7 +368,6 @@ module.exports = { | ||
379 | clearCookieArr: clearCookieArr, | 368 | clearCookieArr: clearCookieArr, |
380 | formatDate: formatDate, | 369 | formatDate: formatDate, |
381 | checkSubmit: checkSubmit, | 370 | checkSubmit: checkSubmit, |
382 | - autoScroll: autoScroll, | ||
383 | submitDia: submitDia, | 371 | submitDia: submitDia, |
384 | orderSubmit: orderSubmit, | 372 | orderSubmit: orderSubmit, |
385 | getAbleTime: getAbleTime, | 373 | getAbleTime: getAbleTime, |
-
Please register or login to post a comment