|
@@ -6,14 +6,16 @@ use think\App;
|
|
|
use think\facade\Db;
|
|
|
|
|
|
class Menu extends BaseController{
|
|
|
- public function __construct(App $app) {parent::__construct($app);}
|
|
|
-/** 进入页面获取权限列表
|
|
|
-* @return \think\response\Json|void
|
|
|
-* @throws \think\db\exception\DataNotFoundException
|
|
|
-* @throws \think\db\exception\DbException
|
|
|
-* @throws \think\db\exception\ModelNotFoundException
|
|
|
- */
|
|
|
- public function MenuList(){
|
|
|
+ public function __construct(App $app) {
|
|
|
+ parent::__construct($app);
|
|
|
+ }
|
|
|
+ /** 进入页面获取权限列表
|
|
|
+ * @return \think\response\Json|void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ */
|
|
|
+ public function MenuList(){
|
|
|
|
|
|
$role = Db::name("role_action")->where("role_id","=",$this->roleid)->find();
|
|
|
|
|
@@ -101,12 +103,12 @@ class Menu extends BaseController{
|
|
|
return $result ? app_show(0,"添加成功"): error_show(1003,"添加失败");
|
|
|
}
|
|
|
/**菜单编辑或新建
|
|
|
- * @return \think\response\Json|void
|
|
|
- * @throws \think\db\exception\DataNotFoundException
|
|
|
- * @throws \think\db\exception\DbException
|
|
|
- * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @return \think\response\Json|void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
*/
|
|
|
- public function MenuEdit(){
|
|
|
+ public function MenuEdit(){
|
|
|
$post =$this->post;
|
|
|
$id = isset($post['id']) ?intval($post['id']) :"";
|
|
|
if($id!=""){
|
|
@@ -155,12 +157,12 @@ class Menu extends BaseController{
|
|
|
return $result ? app_show(0,"{$message}成功"): error_show(1003,"{$message}失败");
|
|
|
}
|
|
|
/**菜单状态更新
|
|
|
-* @return \think\response\Json|void
|
|
|
-* @throws \think\db\exception\DataNotFoundException
|
|
|
-* @throws \think\db\exception\DbException
|
|
|
-* @throws \think\db\exception\ModelNotFoundException
|
|
|
- */
|
|
|
- public function MenuStatus(){
|
|
|
+ * @return \think\response\Json|void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ */
|
|
|
+ public function MenuStatus(){
|
|
|
$post =$this->post;
|
|
|
$id = isset($post['id']) ?intval($post['id']) :"";
|
|
|
$menu = Db::name("admin_menu")->where("id","=",$id)->find();
|
|
@@ -208,7 +210,7 @@ class Menu extends BaseController{
|
|
|
return app_show(0,"获取成功",$data);
|
|
|
}
|
|
|
/** 菜单下功能信息修改*/
|
|
|
- public function ActionSave(){
|
|
|
+ public function ActionSave(){
|
|
|
$post =$this->post;
|
|
|
$actid = isset($post['id']) ? intval($post['id']) : "";
|
|
|
if($actid==""){
|