Basedata.php 505 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 基础文章接口
  7. */
  8. class Basedata extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. public function find(){
  13. $key = input('key');
  14. if(!$key){
  15. $this->error();
  16. }
  17. $fields = 'name,content,updatetime';
  18. $find = Db::name('basedata')->field($fields)->where('key',$key)->find();
  19. $this->success('success',$find);
  20. }
  21. }