|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
var i = 1; //设置当前页数
|
|
|
|
|
var ci = 1; //设置当前页数
|
|
|
|
|
var msg_list_loading = false;
|
|
|
|
|
$(function() {
|
|
|
|
|
$(function() {
|
|
|
|
@ -33,7 +33,7 @@
|
|
|
|
|
var winH = $(window).height(); //页面可视区域高度
|
|
|
|
|
|
|
|
|
|
$("#search_customers_list").scroll(function() {
|
|
|
|
|
if (i < totalpage) { // 当滚动的页数小于总页数的时候,继续加载
|
|
|
|
|
if (ci < totalpage) { // 当滚动的页数小于总页数的时候,继续加载
|
|
|
|
|
var pageH = $(document.body).height();
|
|
|
|
|
|
|
|
|
|
var scrollT = $(window).scrollTop(); //滚动条top
|
|
|
|
@ -41,7 +41,7 @@
|
|
|
|
|
console.log(aa);
|
|
|
|
|
if ( !msg_list_loading ){
|
|
|
|
|
if (aa < 0.01 ) {
|
|
|
|
|
get_schools(i+1)
|
|
|
|
|
get_schools(ci+1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -53,7 +53,7 @@
|
|
|
|
|
var msg_list = $('#search_customers_list');
|
|
|
|
|
if (msg_list.height() + msg_list[0].scrollTop >= msg_list[0].scrollHeight - 60) {
|
|
|
|
|
msg_list_loading = true;
|
|
|
|
|
$.getJSON("<%= all_path %>?partner_id=<%= @partner.id %>page="+page+"&search="+$("#partner_name_search").val()+"&province="+$("#partner_province").val(), function(schools) {
|
|
|
|
|
$.getJSON("<%= all_path %>?partner_id=<%= @partner.id %>&page="+page+"&search="+$("#partner_name_search").val()+"&province="+$("#partner_province").val(), function(schools) {
|
|
|
|
|
if (schools) {
|
|
|
|
|
msg_list_loading = false;
|
|
|
|
|
var s_html = "";
|
|
|
|
@ -62,14 +62,14 @@
|
|
|
|
|
" <span class='fl with70'>" +
|
|
|
|
|
" <span>" +
|
|
|
|
|
" <input type='checkbox' name='school[id]' value='"+array["school"]["id"]+"' id='school_"+array["school"]["id"]+"' class='magic-checkbox'>" +
|
|
|
|
|
" <label for='school_'"+array["school"]["id"]+">"+array["school"]["name"]+"</label>" +
|
|
|
|
|
" <label for='school_"+array["school"]["id"]+"'>"+array["school"]["name"]+"</label>" +
|
|
|
|
|
" </span>\n" +
|
|
|
|
|
" </span>\n" +
|
|
|
|
|
" <span class='fl with30'>"+array["school"]["province"]+"</span>" +
|
|
|
|
|
" </p>"
|
|
|
|
|
});
|
|
|
|
|
$("#search_customers_list").append(s_html);
|
|
|
|
|
i ++;
|
|
|
|
|
ci ++;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|