<script></p> <p>var finish = 1;<br> var page = 0;<br> $(function(){<br> $(window).scroll(function(){<br> var sTop = $(document).scrollTop();<br> var winH = $(window).height();<br> var pageH = $(document).height();<br> if((sTop >= pageH-winH) && finish== 1){<br> waterList();<br> }<br> })<br> })<br> <br> function waterList(){<br> finish = 2;<br> var nowpage = "{$nowpage}";<br> var c = '{$c}';<br> var _type = '{$_type}';<br> var tag_id = '{$tag_id}';<br> $.ajax({<br> type:'get',<br> url:app+'/s-boxwater',<br> data:{page:++page,nowpage:nowpage,c:c,_type:_type,tag_id:tag_id},<br> dataType:'json',<br> beforeSend:function(){<br> var loading = '<div style="text-align:center;margin-top: 40px;position: relative;width: 824px;" id="loading-zj"><img src="'+STATIC+'/Static/icage/img/ajax-loader.gif" /></div>';<br> $('#boxwater').append(loading);<br> },<br> success:function(r){<br> $('#loading-zj').remove();<br> if(r.ステータス = = 2){<br> $('#listpage').show();<br> finish = 2;<br> }else if(r.status == 3){<br> $('#ボックスウォーター').append(r.html) ;<br> $('#listpage').show();<br> finish = 2;<br> }else if(r.status == 1){<br> $('#boxwater' ).append(r.html);<br> 終了= 1;<br> }else{<br> $('#listpage').show();<br> finish = 2;<br> }<br> }<br> });<br> }<br> </p> <p></script>
/** /** ?php> 此代码许多ソースコードのデータ、パラメータ、望测试があります
*ボックスクエリリストボックスクエリリスト。*/
プライベート関数 boxList(){
$data = $this->maplist();
$map = $data['map'];
$map['is_del'] = 0 ;
$_order = $data['_order'];
$count = model('Showbox')->where($map)->count();
import('ORG.Util.Page');
$page = new Page($count,48);
$this->assign('listpage',$page->show());
$this->assign('nowpage',$page- >firstRow);
$list = model('Showbox')->where($map)->limit($page->firstRow.',12')->order($_order)-> ;select();
foreach ($list as $k=>$v){
$list[$k]['user_info'] = getUserInfo($v['uid']);
$list[$k ]['sid'] = getFirstid($v['id']);
}
$this->assign('list',$list);
}
* ボックスリストはスクロールしています。 //スクロール表示
*/
public function boxwater(){
$this->supportList('showbox');
$this->subscripList('showbox');
$supportList = array();
$var['login_uid'] = $this->uid;
if($this->uid){
$supportList = getSupport($this->uid,'showbox');
}
$var ['supportList'] = $supportList;
$subscripList = array();
if($this->uid){
$subscripList = getSubscrip($this->uid,'showbox');
}
$ var['subscripList'] = $subscripList;
$data = $this->maplist();
$map = $data['map'];
$map['is_del'] = 0;
$_order = $data['_order'];
$st_page = $_GET['page'];
$nowpage = $_GET['nowpage'];
$page = $nowpage+$st_page*12;
$c = $_GET[ 'c'];
$list = model('Showbox')->where($map)->order($_order)->limit($page.',12')->select() ;
if(!empty($list)){
$html = '';
foreach ($list as $k=>$v){
$list[$k]['user_info'] = getユーザー情報($ v['uid']);
$list[$k]['sid'] = getFirstid($v['id']);
}
$var['list'] = $list;
$return ['ステータス'] = 1;
if($st_page == 3){
$return['ステータス'] = 3;
}
$this-&g t;fetchTpl('ボックスウォーター' ,$var);
}else{
$return['status'] = 2;
}
exit(json_encode($return));exit;
}