You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
60
hyhproject/admin/controller/Roles.php
Executable file
60
hyhproject/admin/controller/Roles.php
Executable file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
namespace wstmart\admin\controller;
|
||||
use wstmart\admin\model\Roles as M;
|
||||
/**
|
||||
* ============================================================================
|
||||
* 角色控制器
|
||||
*/
|
||||
class Roles extends Base{
|
||||
|
||||
public function index(){
|
||||
|
||||
return $this->fetch("list");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页
|
||||
*/
|
||||
public function pageQuery(){
|
||||
$m = new M();
|
||||
return WSTGrid($m->pageQuery());
|
||||
}
|
||||
/**
|
||||
* 获取菜单
|
||||
*/
|
||||
public function get(){
|
||||
|
||||
$m = new M();
|
||||
return $m->get((int)Input("post.id"));
|
||||
}
|
||||
/**
|
||||
* 跳去编辑页面
|
||||
*/
|
||||
public function toEdit(){
|
||||
$m = new M();
|
||||
$rs = $m->getById((int)Input("get.id"));
|
||||
$this->assign("object",$rs);
|
||||
return $this->fetch("edit");
|
||||
}
|
||||
/**
|
||||
* 新增菜单
|
||||
*/
|
||||
public function add(){
|
||||
$m = new M();
|
||||
return $m->add();
|
||||
}
|
||||
/**
|
||||
* 编辑菜单
|
||||
*/
|
||||
public function edit(){
|
||||
$m = new M();
|
||||
return $m->edit();
|
||||
}
|
||||
/**
|
||||
* 删除菜单
|
||||
*/
|
||||
public function del(){
|
||||
$m = new M();
|
||||
return $m->del();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user