window.onscroll = function () {
throttle(trrigerAdd,window);
};
function trrigerAdd(){
var $dHeight = document.documentElement.clientHeight;
var $aHeight = document.documentElement.offsetHeight;
var $scrolly = document.documentElement.scrollTop || document.body.scrollTop;
if (($aHeight - $dHeight) - $scrolly <= 2) {
orderinfor.index[orderinfor.currentState]++;
}
}
function throttle(method,context){
clearTimeout(method.tId);
console.log(method.tId);
method.tId=setTimeout(function(){
method.call(context);
},500);
}