12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use think\Db;
- /**
- * 最新政策
- */
- class Zhengce extends Api
- {
- protected $noNeedLogin = ['*'];
- protected $noNeedRight = ['*'];
- public function zhengce()
- {
- $zgs_id = 1;
- $list = Db::name('zhengce')->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('zhengce')
- ->where('id',$id)
- ->find();
- $list = info_domain_image($list, ['image']);
- $this->success(1, $list);
- }
- }
|