ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 分页处理 * 模块部分 ~~~ is_numeric($PIN) ? NULL : $iframe->error($json,'页码格式异常['.__LINE__.']'); is_numeric($paging_every) ? NULL : $iframe->error($json,'每页条数格式异常['.__LINE__.']'); $other = []; $other['field'] = ['count(*) as total']; $where = []; $other['where'] = $I_L->where($where,$list_class_json); $row = $Sql->row(sbh_table,$other); $total = empty($row['total']) ? 0 : $row['total']; $json['total'] = $total; $json['PIN'] = $PIN < 1 ? 1 : $PIN; $json['paging_every'] = $paging_every; $paging_total = ceil($total/$paging_every); $json['paging_total'] = $paging_total; $json['succeed'] = 1; $json['msg'] = '加载完成['.__LINE__.']'; die(json_encode($json)); ~~~ * 参数说明 ~~~ 1.total 数据总数 2.PIN 当前页码 3.paging_every 每页显示条数 4.paging_total 总页数 5.succeed 响应状态(1正常0异常) 6.msg 提示信息 ~~~