50 lines
912 B
PHP
50 lines
912 B
PHP
<?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("操作成功");
|
|
}
|
|
|
|
}
|