作者 jinglong
1 个管道 的构建 通过 耗费 0 秒

修改分页数量

... ... @@ -16,8 +16,10 @@ class CommonController extends HomeBaseController
{
//七牛云域名
const domain = 'http://jinglong.springchunjia.cn/';
//分页数量
//资料下载分页数量
const limit = 10;
//产品系列分页数量
const series_limit = 9;
//查找单条数据
public static function findData($table,$where,$field){
$res = Db::name($table)
... ...
... ... @@ -83,7 +83,7 @@ class SeriesController extends RestBaseController
//查找二级分类
$type = CommonController::selectData('type',['pid'=>$parent_id],'id');
$children_ids = array_column($type,'id');
$limit = CommonController::limit;
$limit = CommonController::series_limit;
$res = Db::name('series')
->whereIn('t_id',$children_ids);
$data = $res->field($field_series)
... ... @@ -130,7 +130,7 @@ class SeriesController extends RestBaseController
//中文
$field_series = 'id,thumbnail,title';
}
$limit = CommonController::limit;
$limit = CommonController::series_limit;
$res = Db::name('series')
->where(['t_id'=>$children_id]);
$data = $res->field($field_series)
... ...