初始化项目:添加后端代码、ThinkPHP框架、前端资源
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\config;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
/**
|
||||
* 云点播
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Vod extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Column模型对象
|
||||
* @var \app\admin\model\course\Column
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\config\Vod;
|
||||
|
||||
}
|
||||
|
||||
public function getList(){
|
||||
return $this->success("获取成功",$this->model->getList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置状态
|
||||
* @return void
|
||||
*/
|
||||
public function setStatus(){
|
||||
$name = $this->request->post("name");
|
||||
$status = $this->request->post("status",false);
|
||||
|
||||
if(!$name){
|
||||
$this->error(__("Invalid parameters"));
|
||||
}
|
||||
|
||||
$this->model->setStatus($name,$status);
|
||||
|
||||
return $this->success("操作成功");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user