更新后台评论按钮权限
This commit is contained in:
parent
7ba6586b82
commit
46eb8fdbdd
@ -45,7 +45,7 @@ class Comment extends BaseController
|
||||
if (isset($params['keywords'])){
|
||||
// $where[]=['title','like','%'.$params['keywords'].'%'];
|
||||
}
|
||||
if($this->adminInfo['position_id'] != 1){ //不是超级管理员
|
||||
if($this->adminInfo['position_id'] != 1){ //不是超级管理员
|
||||
$www['admin_id'] = $this->adminInfo['id'];
|
||||
$user_address = Db::table('fa_szxc_information_useraddress')->where($www)->find();
|
||||
if ($user_address){
|
||||
@ -66,6 +66,7 @@ class Comment extends BaseController
|
||||
$total = Db::table('fa_article_comment')
|
||||
->where($where)
|
||||
->count();
|
||||
|
||||
$list = Db::table('fa_article_comment')
|
||||
->withAttr('name',function ($value,$data){
|
||||
return Db::table('fa_szxc_information_usermsg')->where('user_id',$data['user_id'])->value('name');
|
||||
@ -79,8 +80,10 @@ class Comment extends BaseController
|
||||
->withAttr('status',function ($value,$data){
|
||||
if($value == 1){
|
||||
return '通过';
|
||||
}else{
|
||||
}elseif($value == 2){
|
||||
return '不通过';
|
||||
}else{
|
||||
return '待审核';
|
||||
}
|
||||
})
|
||||
->where($where)
|
||||
@ -92,6 +95,7 @@ class Comment extends BaseController
|
||||
return table_assign(0, '', $result);
|
||||
}
|
||||
else{
|
||||
|
||||
return view('nk/comment/index',['url'=>$this->url]);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,15 @@
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>
|
||||
<div class="layui-btn-group">
|
||||
{if {:session('gougu_admin')['group_access']==1}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
{/if}
|
||||
|
||||
<a class="layui-btn layui-btn-xs {{# if(d.status == '待审核'){ }}{{# } else { }}layui-hide{{# } }}" lay-event="edit">审核</a>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
|
Loading…
x
Reference in New Issue
Block a user