编写类别

This commit is contained in:
巴掌 committed 2018-10-25 16:54:56 +08:00
1 parent 50c911f98a
commit 7b3d8cee54
25 files changed
+603 -98

No files matched your search

+1 -2
View File
@@ -125,7 +125,6 @@ class AuthGroup extends Base
// 保存数据
$data = AG::create($list);
$msg = array();
// 根据更新结果设置返回提示信息
$data ? $data=['msg'=>'添加成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
@@ -191,7 +190,7 @@ class AuthGroup extends Base
$data = AG::where('id',$id)->update($list);
// 根据更新结果设置返回提示信息
$data ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
$data>=0 ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
// 返回信息
return json($data);
+5 -5
View File
@@ -58,7 +58,9 @@ class AuthRule extends Base
// 如果需要查询
if($search){
$data = $authrulemod
$data = AR::field('id,title,name,condition,paixu,ismenu,font,status,pid')
->order([$order_field=>$order])
->limit($limit_start,$limit_length)
->where('title|name|pid','like','%'.$search.'%')
->all();
}
@@ -119,8 +121,6 @@ class AuthRule extends Base
// 保存数据
$data = AR::create($list);
$msg = array();
// 根据更新结果设置返回提示信息
$data ? $data=['msg'=>'添加成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
@@ -161,7 +161,7 @@ class AuthRule extends Base
$validate = new \app\admin\validate\Rule;
// 获取表单数据
$list = request()->put();
$list = request()->only(['title','name','pid','condition','paixu','ismenu','font','beizhu'],'post');
// 验证表单数据
$result = $validate->check($list);
@@ -176,7 +176,7 @@ class AuthRule extends Base
$data = AR::where('id',$id)->update($list);
// 根据更新结果设置返回提示信息
$data ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
$data>=0 ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
// 返回信息
return json($data);
-5
View File
@@ -28,8 +28,6 @@ class Index extends Base
// 渲染模板
return $this->fetch();
// 获取记录总数
}
@@ -140,9 +138,6 @@ class Index extends Base
$data = AGA::create(['uid'=>$data->id,'group_id'=>$group_id]);
$msg = array();
// 根据更新结果设置返回提示信息
$data ? $data=['msg'=>'添加成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0];
Loaded 3 of 25 files, more files were not shown because too many files have changed in this diff. Show more