修复bug
This commit is contained in:
@@ -269,6 +269,7 @@ class Content extends Admin {
|
||||
if ($this->modelInfo['extend'] == 1) {
|
||||
$category = isset($data['category']) ? $data['category'] : '';
|
||||
$cate_list = parse_field_bind('category', $category, 0);
|
||||
$map['model_id'] = $this->model_id;
|
||||
$this->assign('cate_list', $cate_list);
|
||||
}
|
||||
$this->assign($data);
|
||||
|
||||
@@ -59,19 +59,20 @@ class Content extends Fornt {
|
||||
|
||||
$cate = $this->getCategory($id);
|
||||
|
||||
//获得当前栏目的所有子栏目
|
||||
$ids = get_category_child($id);
|
||||
$map['category_id'] = array('IN', $ids);
|
||||
$map['model_id'] = $this->modelInfo['id'];
|
||||
$map['status'] = array('GT', 0);
|
||||
if ($this->modelInfo['extend'] == 1) {
|
||||
//获得当前栏目的所有子栏目
|
||||
$ids = get_category_child($id);
|
||||
$map['category_id'] = array('IN', $ids);
|
||||
$map['model_id'] = $this->modelInfo['id'];
|
||||
$map['status'] = array('GT', 0);
|
||||
}
|
||||
|
||||
if ($this->modelInfo['extend'] > 1) {
|
||||
$order = "id desc";
|
||||
} else {
|
||||
$order = "is_top desc,id desc";
|
||||
}
|
||||
$model = $this->model;
|
||||
$list = $model->where($map)->order($order)->paginate(15);
|
||||
$list = $this->model->where($map)->order($order)->paginate(15);
|
||||
|
||||
$data = array(
|
||||
'list' => $list,
|
||||
|
||||
Reference in New Issue
Block a user