Files.php
978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace addons\qingdong\controller;
use addons\antis\controller\StaffApi;
use app\admin\model\qingdong\file\File;
use app\admin\model\qingdong\file\Category;
class Files extends StaffApi
{
protected $noNeedLogin = ['*'];
public function index(){
$groupList = (new Category())->where('s_id', 0)->where('type','1')->select();
$this->success('',$groupList);
}
public function listCategory(){
$param= $this->request->param();
$caModel = new Category();
$res = $caModel->where('s_id',$param['sid'])->where('type','1')->select();
$this->success('分类列表',['type'=>'category','data'=>$res]);
}
public function listFile(){
$param= $this->request->param();
$fModel = new File();
$res = $fModel->where('category_id',$param['sid'])->select();
$this->success('文件列表',['type'=>'file','data'=>$res]);
}
}