1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class File extends Base
- {
- // 新增
- public function save(){
- model('File')->add();
- HelpHander::success([],'操作成功');
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('File')->del($id);
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('File')->info($id);
- HelpHander::success($ret);
- }
- //列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $sn = input('sn','','trim');
- $source = input('source','','trim');
- $title = input('title','','trim');
- $enable = input('enable/d',-1);
- $swTime = input('swTime','','trim');
- $ret = model('File')->lists($page,$size,$sn,$source,$title,$enable,$swTime,$this->orgId);
- HelpHander::success($ret);
- }
- }
|