修改权限验证,添加权限迁移数据

This commit is contained in:
cxdbz committed 2018-10-24 22:18:58 +08:00
1 parent 52d5b63647
commit 50c911f98a
5 files changed
+31 -20

No files matched your search

+1 -3
View File
@@ -151,8 +151,6 @@ class AuthGroup extends Base
// 修改角色信息
public function edit($id)
{
//实例化角色数据模型
$agmod = new agmod();
// 获取角色信息
$list = AG::field('id,title,miaoshu,rules')
@@ -190,7 +188,7 @@ class AuthGroup extends Base
}
$data = $agmod->where('id',$id)->update($list);
$data = AG::where('id',$id)->update($list);
// 根据更新结果设置返回提示信息
$data ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
@@ -6,10 +6,7 @@ namespace app\admin\controller;
use app\common\controller\Base;
// 引用用户权限关联数据模型
use app\admin\model\AuthGroupAccess as AGA;
// 引用用户组数据模型
use app\admin\model\AuthGroup as AG;
// 引用用户数据模型
use app\admin\model\Admin as AD;
class AuthGroupAccess extends Base
{
+1 -1
View File
@@ -214,7 +214,7 @@ class Index extends Base
$data = AGA::where('uid',$id)->update(['group_id'=>$group_id]);
// 根据更新结果设置返回提示信息
$data ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
$data >= 0 ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
// 返回信息
return json($data);
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff. Show more