// 滚动请求数据
vm.queryAssetLogList = [];
var creditFlag = true, creditIndex = 1;
$('.cLogBox').scroll(function (e) {
var heightMinus = $('.cLog').height() - $('.cLogBox').scrollTop();
if (heightMinus <= 600) {
if (creditFlag) {
creditFlag = false;
creditIndex++;
// assetQueryAssetLogFun(vm.pageNum, vm.pageSize, obj.id);
assetQueryAssetLogFun(creditIndex, vm.pageSize, vm.logDetail.id, function (data) {
if (vm.queryAssetLogList.length < creditIndex * 10) {
} else {
creditFlag = true;
}
})
}
}
});
// 查询资产日志
function assetQueryAssetLogFun(pageNum, pageSize, id, succFn) {
var param = {
"pageNum": pageNum,
"pageSize": pageSize,
"id": id
};
console.log(param);
homepageService.assetQueryAssetLog(param).then(function (data) {
if (data.data.length < 10) {
creditFlag = false;
}
vm.queryAssetLogList = vm.queryAssetLogList.concat(data.data);
return succFn();
}, function (res) {
vm.queryAssetLogList = [];
})
}
vm.queryAssetLogList = [];
var creditFlag = true, creditIndex = 1;
$('.cLogBox').scroll(function (e) {
var heightMinus = $('.cLog').height() - $('.cLogBox').scrollTop();
if (heightMinus <= 600) {
if (creditFlag) {
creditFlag = false;
creditIndex++;
// assetQueryAssetLogFun(vm.pageNum, vm.pageSize, obj.id);
assetQueryAssetLogFun(creditIndex, vm.pageSize, vm.logDetail.id, function (data) {
if (vm.queryAssetLogList.length < creditIndex * 10) {
} else {
creditFlag = true;
}
})
}
}
});
// 查询资产日志
function assetQueryAssetLogFun(pageNum, pageSize, id, succFn) {
var param = {
"pageNum": pageNum,
"pageSize": pageSize,
"id": id
};
console.log(param);
homepageService.assetQueryAssetLog(param).then(function (data) {
if (data.data.length < 10) {
creditFlag = false;
}
vm.queryAssetLogList = vm.queryAssetLogList.concat(data.data);
return succFn();
}, function (res) {
vm.queryAssetLogList = [];
})
}