request->isPost()){ $code = $this->request->post('code'); $info = Basic::field('content')->where('code',$code)->find(); return $this->success('获取成功',$info); } return $this->error('非法请求'); } public function getadvert(){ if($this->request->isPost()){ $type = $this->request->post('type'); $list = \app\admin\model\Advert::where('status',1)->select(); return $this->success('获取成功',$list); } } public function getadvertdetail(){ if($this->request->isPost()){ $id = $this->request->post('id'); $detail = \app\admin\model\Advert::where('id',$id)->find(); return $this->success('获取成功',$detail); } } public function getlianxi(){ for($i = 0;$i<4;$i++){ $data['title'] = '联系电话'; $data['number'] = '15987654321'; $return[] = $data; } return $this->success('获取成功',$return); } public function infoopen(){ $info['qq'] = true; $info['wechat'] = true; return $this->success('获取成功',$info); } }