1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- use think\Db;
- /**
- * 基础文章接口
- */
- class Basedata extends Api
- {
- protected $noNeedLogin = ['*'];
- protected $noNeedRight = ['*'];
- public function __construct(){
- $this->error('投票活动结束了');
- }
- 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);
- }
- }
|