Commit bc17e6c9 by 刘海龙

Merge branch 'master' of http://132.232.91.252:9999/ice/eduline

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