更新接口文件

This commit is contained in:
2020-05-10 22:15:42 +08:00
parent 6249dc9b5e
commit 36d104332a
7 changed files with 83 additions and 13 deletions

View File

@@ -8,7 +8,10 @@
// +----------------------------------------------------------------------
namespace app\controller\api;
use think\facade\Db;
use app\model\Category;
use app\model\Model;
use app\model\Attribute;
/**
* @title 内容管理
@@ -40,7 +43,7 @@ class Content extends Base {
}
$list = $this->model->where($map)->order($order)->paginate($this->request->pageConfig);
$this->data['code'] = 1;
$this->data['data'] = $list;
return $this->data;
}
@@ -56,7 +59,7 @@ class Content extends Base {
return $this->error("非法操作!");
}
$info = $this->model->find($id);
$this->data['code'] = 1;
$this->data['data'] = $info;
return $this->data;
}