Commit 3c6fd159 by 刘海龙

111

parent 1a8bfce5
......@@ -217,15 +217,15 @@
// console.log("top:"+scrollTop+",doc:"+scrollHeight+",client:"+clientHeight);
if(scrollTop + clientHeight >= scrollHeight){ //距离顶部+当前高度 >=文档总高度 即代表滑动到底部
//滚动条到达底部
console.log("tab:" + that.tab)
console.log("page:" + that.page)
if(that.tab==0){
that.loadZhenti()
}else if(that.tab == 1) {
that.loadDownload()
} else {
that.onMyTab(that.myTab)
}
// console.log("tab:" + that.tab)
// console.log("page:" + that.page)
// if(that.tab==0){
// that.loadZhenti()
// }else if(that.tab == 1) {
// that.loadDownload()
// } else {
// that.onMyTab(that.myTab)
// }
}else if(scrollTop<=0){
//滚动条到达顶部
// alert(4)
......@@ -361,10 +361,12 @@
let that = this
$.ajax({
type: "GET",
url: "{:U('exams/Index/paper')}" + "&api=1&c=" + that.conditionId +"&page=" + this.page,
url: "{:U('exams/Index/paper')}" + "&api=1&c=" + that.conditionId +"&p=" + this.page,
dataType: "json",
success: function(res) {
if(res.status == 1) {
console.log(res)
console.log(that.zhenti )
let array = res.data.data.length > 0 ? res.data.data : []
that.zhenti = [].concat(array.map( r => {
return {
......@@ -396,12 +398,12 @@
let that = this
$.ajax({
type: "GET",
url: "{:U('exams/Index/paper')}" + "&api=2&c=" + that.conditionId +"&page=" + this.page,
url: "{:U('exams/Index/paper')}" + "&api=2&c=" + that.conditionId +"&p=" + this.page,
dataType: "json",
success: function(res) {
if(res.status == 1) {
let array = res.data.data.length > 0 ? res.data.data : []
that.download = [].concat(array.map( r => {
that.download = array.concat(array.map( r => {
return {
id: r.exams_paper_id,
title: r.exams_paper_title,
......@@ -413,7 +415,7 @@
attach: r.attach
}
}))
that.page ++
// that.page ++
if(that.condition.length == 0) {
that.condition = [{ id: '', title: '全部', select: true }].concat(res.cate.map( r => {
return {
......@@ -446,7 +448,7 @@
score: r.score
}
}))
that.page ++
// that.page ++
}
}
})
......@@ -472,7 +474,7 @@
time: new Date(r.ctime * 1000).format('yyyy-mm-dd HH:MM:ss'),
}
}))
that.page ++
// that.page ++
}
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment