12345678910111213141516171819202122232425 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use think\Db;
- /**
- * 基础文章接口
- */
- class Basedata extends Api
- {
- protected $noNeedLogin = ['*'];
- protected $noNeedRight = ['*'];
- public function find(){
- $key = input('key');
- if(!$key){
- $this->error();
- }
- $fields = 'name,content,updatetime';
- $find = Db::name('basedata')->field($fields)->where('key',$key)->find();
- $this->success('success',$find);
- }
- }
|