Blame view

addons/exam/controller/File.php 902 Bytes
2db47680   hexiaodong   chore: 初始提交 php 遗...
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
  <?php

  

  namespace addons\exam\controller;

  

  use think\Db;

  

  class File extends Base

  {

      protected $noNeedLogin = ['*'];

  

      public function index(){

  

          $groupList = (new \app\admin\model\exam\file\Category())->where('s_id', 0)->select();

          $this->success('',$groupList);

  

      }

  

      public function listCategory(){

          $param= $this->request->param();

          //$caModel = new Category();

          $res = (new \app\admin\model\exam\file\Category())->where('s_id',$param['sid'])->select();

          $this->success('分类列表',['type'=>'category','data'=>$res]);

      }

  

      public function listFile(){

          $param= $this->request->param();

          $fModel = new \app\admin\model\exam\file\File();

          $res = $fModel->where('category_id',$param['sid'])->select();

          $this->success('文件列表',['type'=>'file','data'=>$res]);

  

      }

  

  

  

  

  }