|
@@ -25,8 +25,8 @@ class CompanyModel extends BaseModel
|
|
|
public static function systemPage($where)
|
|
|
{
|
|
|
$model = new self;
|
|
|
- if ($where['title'] !== '') $model = $model->where('title', 'LIKE', "%$where[title]%");
|
|
|
- if ($where['sid'] !== '') $model = $model->where('sid', $where['sid']);
|
|
|
+ if (isset($where['title']) && $where['title'] !== '') $model = $model->where('title', 'LIKE', "%$where[title]%");
|
|
|
+ if (isset($where['sid']) && $where['sid'] !== '') $model = $model->where('sid', $where['sid']);
|
|
|
$model = $model->where('is_del', 0);
|
|
|
$model = $model->order('sort desc,id desc');
|
|
|
$count = $model->count();
|
|
@@ -45,7 +45,7 @@ class CompanyModel extends BaseModel
|
|
|
if ($info) {
|
|
|
$info['example'] = ExampleModel::where(['cid' => $id])->order('sort desc, id asc')->select();
|
|
|
$info['designer'] = DesignerModel::where(['cid' => $id])->order('sort desc, id asc')->select();
|
|
|
- if ($info['slider_image'])
|
|
|
+ if (isset($info['slider_image']) && $info['slider_image'])
|
|
|
$info['slider_image'] = json_decode($info['slider_image'], true);
|
|
|
else
|
|
|
$info['slider_image'] = [];
|