Index.php 858 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 首页接口
  7. */
  8. class Index extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. /**
  13. * 首页
  14. *
  15. */
  16. public function index()
  17. {
  18. $this->success('请求成功');
  19. }
  20. public function getConfiguration()
  21. {
  22. $name = $this->request->post('name');
  23. $website = $this->request->post('website');
  24. $where['name']=$name;
  25. $where['website']=$website;
  26. $where['status']='normal';
  27. $list = Db::name('functional')->where($where)->find();
  28. unset($where);
  29. $where['fid']=$list['id'];
  30. $where['status']='normal';
  31. $list['details']=Db::name('functional_del')->where($where)->select();
  32. $this->success('请求成功',$list);
  33. }
  34. }