You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
451 B

<?php
namespace app\appapi\controller\v1;
use app\appapi\ApiController;
use think\facade\Db;
class Article extends ApiController
{
public function getArticle(){
$id = input('id');
$article=Db::name('article')
->field('article_id,content')
->where('article_id',$id)
->find();
if(!$article){
return $this->Error('Not found');
}
return $this->Success($article);
}
}