...
|
...
|
@@ -20,7 +20,7 @@ var winH = $(window).height(); |
|
|
var activeType = $navLi.filter('.active').data('type'); // 当前active的项的index
|
|
|
|
|
|
var order = {
|
|
|
page: 0,
|
|
|
page: 1,
|
|
|
end: false
|
|
|
};
|
|
|
|
...
|
...
|
@@ -34,6 +34,9 @@ var orderHammer, |
|
|
$reaMask = $('.reason-mask'),
|
|
|
reasonSwiper;
|
|
|
|
|
|
// 首屏加载标志
|
|
|
var firstScreen = $('.firstscreen-orders').children().size() > 0;
|
|
|
|
|
|
require('../common');
|
|
|
|
|
|
// 减少计时
|
...
|
...
|
@@ -58,8 +61,8 @@ function downCount(item) { |
|
|
seconds;
|
|
|
|
|
|
// calculate dates
|
|
|
hours = Math.floor((difference % _day) / _hour),
|
|
|
minutes = Math.floor((difference % _hour) / _minute),
|
|
|
hours = Math.floor((difference % _day) / _hour);
|
|
|
minutes = Math.floor((difference % _hour) / _minute);
|
|
|
seconds = Math.floor((difference % _minute) / _second);
|
|
|
|
|
|
// fix dates so that it will show two digets
|
...
|
...
|
@@ -106,6 +109,11 @@ function getOrders(option) { |
|
|
page: order.page + 1
|
|
|
};
|
|
|
|
|
|
if (firstScreen) {
|
|
|
// 如果首屏加载了,则去掉10条记录
|
|
|
opt.start = 10;
|
|
|
}
|
|
|
|
|
|
var show = option && !option.noLoadingMask;
|
|
|
|
|
|
if (inAjax) {
|
...
|
...
|
@@ -154,6 +162,9 @@ function getOrders(option) { |
|
|
setTime();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 还原参数
|
|
|
firstScreen = false;
|
|
|
}
|
|
|
|
|
|
lazyLoad({
|
...
|
...
|
@@ -265,7 +276,7 @@ $(window).scroll(function() { |
|
|
});
|
|
|
|
|
|
// 初始化请求第一页数据
|
|
|
getOrders();
|
|
|
//getOrders();
|
|
|
|
|
|
$(function() {
|
|
|
reasonSwiper = new Swiper('.box-main', {
|
...
|
...
|
@@ -273,7 +284,7 @@ $(function() { |
|
|
slidesPerView: 5,
|
|
|
centeredSlides: true,
|
|
|
initialSlide: 0,
|
|
|
onSlideChangeStart: function(reasonSwiper) {
|
|
|
onSlideChangeStart: function(reasonSwiper) {//eslint-disable-line
|
|
|
var activeIndex = reasonSwiper.activeIndex,
|
|
|
slides = reasonSwiper.slides,
|
|
|
i = 0;
|
...
|
...
|
@@ -301,7 +312,7 @@ $(function() { |
|
|
});
|
|
|
});
|
|
|
|
|
|
$reaMask.find('.box-cmp').on('touchend', function(e) {
|
|
|
$reaMask.find('.box-cmp').on('touchend', function() {
|
|
|
var selSolid = reasonSwiper.slides[reasonSwiper.activeIndex],
|
|
|
reason = $(selSolid).text(),
|
|
|
reasonId = $(selSolid).data('reasonId');
|
...
|
...
|
|