<?php namespace app\api\controller; use app\common\controller\Api; use think\Db; /** * 最新动态 */ class Dongtai extends Api { protected $noNeedLogin = ['*']; protected $noNeedRight = ['*']; public function dongtai() { $zgs_id = 0; $list = Db::name('dongtai')->field('content',true) ->where('company_id','IN',[$this->auth->company_id,$zgs_id]) ->order('id' , 'desc') ->autopage() ->select(); $list = list_domain_image($list, ['image']); $this->success(1, $list); } public function info(){ $id = input('id',0); $list = Db::name('dongtai') ->where('id',$id) ->find(); $list = info_domain_image($list, ['image']); $this->success(1, $list); } }