Commit d6fa7b45 by Joneq

修改权限

parent b14dea9a
...@@ -692,8 +692,12 @@ class MessageController extends Controller ...@@ -692,8 +692,12 @@ class MessageController extends Controller
// 系统更新管理 // 系统更新管理
private function systemUpdate(Request $request, $id, $viewid) private function systemUpdate(Request $request, $id, $viewid)
{ {
$perms_arr = ['systemupdate'];
$res_perm = $this->getUserPerms($request,$perms_arr);
$data=[ $data=[
'id'=>$id, 'id'=>$id,
'have_perm'=>$res_perm,
'user'=>SystemNoticeLogic::getAllUser() 'user'=>SystemNoticeLogic::getAllUser()
]; ];
return view('common', $data); return view('common', $data);
...@@ -702,8 +706,11 @@ class MessageController extends Controller ...@@ -702,8 +706,11 @@ class MessageController extends Controller
//系统宣讲管理 //系统宣讲管理
private function systemPreaching(Request $request, $id, $viewid) private function systemPreaching(Request $request, $id, $viewid)
{ {
$perms_arr = ['systempreaching'];
$res_perm = $this->getUserPerms($request,$perms_arr);
$data=[ $data=[
'id'=>$id, 'id'=>$id,
'have_perm'=>$res_perm,
'user'=>SystemNoticeLogic::getAllUser() 'user'=>SystemNoticeLogic::getAllUser()
]; ];
return view('common', $data); return view('common', $data);
...@@ -712,7 +719,10 @@ class MessageController extends Controller ...@@ -712,7 +719,10 @@ class MessageController extends Controller
//系统公告管理 //系统公告管理
private function systemBulletin(Request $request, $id, $viewid) private function systemBulletin(Request $request, $id, $viewid)
{ {
$perms_arr = ['systembulletin'];
$res_perm = $this->getUserPerms($request,$perms_arr);
$data=[ $data=[
'have_perm'=>$res_perm,
'id'=>$id, 'id'=>$id,
]; ];
return view('common', $data); return view('common', $data);
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
} }
</style> </style>
@if($have_perm)
<form class="layui-form layui-box" method="post"> <form class="layui-form layui-box" method="post">
<div class="layui-form-item"> <div class="layui-form-item">
...@@ -105,6 +107,21 @@ ...@@ -105,6 +107,21 @@
@else
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
@if($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_local'))
<a href="{{ Config('msgconfig.perm_domain_local').'/page/business/'.Config('msgconfig.perm_bid_local').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@elseif ($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_sz'))
<a href="{{ Config('msgconfig.perm_domain_sz').'/page/business/'.Config('msgconfig.perm_bid_sz').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@elseif ($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_release'))
<a href="{{ Config('msgconfig.perm_domain_release').'/page/business/'.Config('msgconfig.perm_bid_release').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@endif
</div>
</div>
@endif
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
} }
</style> </style>
@if($have_perm)
<form class="layui-form layui-box" method="post"> <form class="layui-form layui-box" method="post">
<div class="layui-form-item"> <div class="layui-form-item">
...@@ -200,6 +202,21 @@ ...@@ -200,6 +202,21 @@
</form> </form>
</div> </div>
@else
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
@if($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_local'))
<a href="{{ Config('msgconfig.perm_domain_local').'/page/business/'.Config('msgconfig.perm_bid_local').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@elseif ($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_sz'))
<a href="{{ Config('msgconfig.perm_domain_sz').'/page/business/'.Config('msgconfig.perm_bid_sz').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@elseif ($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_release'))
<a href="{{ Config('msgconfig.perm_domain_release').'/page/business/'.Config('msgconfig.perm_bid_release').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@endif
</div>
</div>
@endif
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
</style> </style>
@if($have_perm)
<form class="layui-form layui-box" > <form class="layui-form layui-box" >
<div class="layui-form-item"> <div class="layui-form-item">
...@@ -251,6 +253,22 @@ ...@@ -251,6 +253,22 @@
</div> </div>
@else
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
@if($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_local'))
<a href="{{ Config('msgconfig.perm_domain_local').'/page/business/'.Config('msgconfig.perm_bid_local').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@elseif ($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_sz'))
<a href="{{ Config('msgconfig.perm_domain_sz').'/page/business/'.Config('msgconfig.perm_bid_sz').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@elseif ($_SERVER['HTTP_HOST'] === Config('msgconfig.domain_release'))
<a href="{{ Config('msgconfig.perm_domain_release').'/page/business/'.Config('msgconfig.perm_bid_release').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
@endif
</div>
</div>
@endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment