| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use think\Db;
- /**
- * 首页接口
- */
- class Index extends Api
- {
- protected $noNeedLogin = ['*'];
- protected $noNeedRight = ['*'];
- /**
- * 首页
- *
- */
- public function index()
- {
- $this->success('请求成功');
- }
- public function getConfiguration()
- {
- $name = $this->request->post('name');
- $website = $this->request->post('website');
- $where['name']=$name;
- $where['website']=$website;
- $where['status']='normal';
- $list = Db::name('functional')->where($where)->find();
- unset($where);
- $where['fid']=$list['id'];
- $where['status']='normal';
- $domain2 = $this->request->domain();
- $list['image']=$domain2.$list['image'];
- $list['details']=Db::name('functional_del')->where($where)->select();
- foreach ($list['details'] as $k=>$v){
- $list['details'][$k]['image']=$domain2.$v['image'];
- }
- $this->success('请求成功',$list);
- }
- }
|