Commit 45655b08 by 冷斌

test

parent 1a8bfce5
......@@ -185,7 +185,7 @@
</div>
<script type="text/javascript">
new Vue({
el: '#app',
data: function() {
......@@ -202,20 +202,20 @@
}
},
created:function() {
},
mounted:function(){
$("#preloader").hide();
this.onTopTab(0)
var that = this
//滚动条到页面底部加载更多案例
//滚动条到页面底部加载更多案例
$(window).scroll(function(){
var scrollTop = $(this).scrollTop(); //滚动条距离顶部的高度
var scrollHeight = $(document).height(); //当前页面的总高度
var clientHeight = $(this).height(); //当前可视的页面高度
// console.log("top:"+scrollTop+",doc:"+scrollHeight+",client:"+clientHeight);
if(scrollTop + clientHeight >= scrollHeight){ //距离顶部+当前高度 >=文档总高度 即代表滑动到底部
if(scrollTop + clientHeight >= scrollHeight){ //距离顶部+当前高度 >=文档总高度 即代表滑动到底部
//滚动条到达底部
console.log("tab:" + that.tab)
console.log("page:" + that.page)
......@@ -230,10 +230,10 @@
//滚动条到达顶部
// alert(4)
//滚动条距离顶部的高度小于等于0 TODO
}
});
},
computed: {
currentItems: function() {
......@@ -361,7 +361,7 @@
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) {
......@@ -396,7 +396,7 @@
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) {
......@@ -432,7 +432,7 @@
let that = this
$.ajax({
type: "GET",
url: "{:U('home/Home/exams')}" + "?api=1" +"&page=" + this.page,
url: "{:U('home/Home/exams')}" + "?api=1" +"&p=" + this.page,
dataType: "json",
success: function(res) {
if(res.status == 1) {
......@@ -460,7 +460,7 @@
let that = this
$.ajax({
type: "GET",
url: "{:U('home/Home/exams')}" + "?api=1&tab=4",
url: "{:U('home/Home/exams')}" + "?api=1&tab=4&p=" + this.page,
dataType: "json",
success: function(res) {
if(res.status == 1) {
......
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