Files.php 940 Bytes
<?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)->select();
        $this->success('',$groupList);

    }

    public function listCategory(){
        $param= $this->request->param();
        $caModel = new Category();
        $res = $caModel->where('s_id',$param['sid'])->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]);

    }









}