model = new Banner(); // // $this->article_model = new Article(); } /** * @author chenniang * @DataTime: 2021-03-23 09:20 * @功能说明:首页 */ public function index(){ $dis = [ 'uniacid' => $this->_uniacid, 'status' => 1 ]; $data['article'] = $this->article_model->where($dis)->field('id,title')->order('top desc,id desc')->select()->toArray(); $data['banner'] = $this->model->where($dis)->field('id,img,link')->order('top desc,id desc')->select()->toArray(); return $this->success($data); } /** * @author chenniang * @DataTime: 2021-03-23 09:55 * @功能说明:文章详情 */ public function articleInfo(){ $input = $this->_param; $dis = [ 'id' => $input['id'] ]; $data = $this->article_model->dataInfo($dis); $data['create_time'] = date('Y-m-d H:i:s',$data['create_time']); return $this->success($data); } /** * @author chenniang * @DataTime: 2021-03-23 14:16 * @功能说明:获取配置信息 */ public function configInfo(){ $dis = [ 'uniacid' => $this->_uniacid ]; $config_model = new \app\massage\model\Config(); $config = $config_model->dataInfo($dis); return $this->success($config); } }