Commit a3d6785e by 李洋

1、权限系统配置文件

parent e9771a85
......@@ -8,6 +8,7 @@
namespace App\Http\Controllers;
use ClassPreloader\Config;
use Illuminate\Http\Request;
use App\Http\Requests;
use DB;
......@@ -687,8 +688,11 @@ class MessageController extends Controller
{
$perms_str = implode(',',$perms_arr);
$uid = $request->user->userId;
$bid = 8;
$url = "http://perm.liexin.net/api/check/$uid/$bid/?perms=$perms_str";
// $bid = 8;
// $url = "http://perm.liexin.net/api/check/$uid/$bid/?perms=$perms_str";
$bid = Config('perm.bid');
$perm_url = Config('perm.url');
$url = $perm_url."/api/check/$uid/$bid/?perms=$perms_str";
$res = json_decode(curl($url),true);
if(!$res['retcode'])
{
......
<?php
/**
* Created by PhpStorm.
* User: leo
* Date: 2017/12/27
* Time: 16:10
*/
return [
'bid' => 8,
'url' => "http://perm.liexin.net",
'消息管理' => [
'消息模板列表' => ['template_check'],
'新增消息模板' => ['template_create', 'template_edit'],
'手动消息历史' => ['manualhistorylist_check'],
'手动发送消息' => ['manualmessage_edit', 'manualmessage_send'],
'全部历史消息' => ['allhistorylist_check'],
],
];
\ No newline at end of file
......@@ -266,7 +266,7 @@
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
<a href="http://perm.liexin.net/page/business/8/request/template_create" target="_blank" class="btn btn-primary">申请权限</a>
<a href="{{ Config('perm.url').'/page/business/'.Config('perm.bid').'/request/template_create' }}" target="_blank" class="btn btn-primary">申请权限</a>
</div>
</div>
@endif
\ No newline at end of file
......@@ -180,7 +180,7 @@
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
<a href="http://perm.liexin.net/page/business/8/request/allhistorylist_check" target="_blank" class="btn btn-primary">申请权限</a>
<a href="{{ Config('perm.url').'/page/business/'.Config('perm.bid').'/request/allhistorylist_check' }}" target="_blank" class="btn btn-primary">申请权限</a>
</div>
</div>
@endif
......
......@@ -116,7 +116,7 @@
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
<a href="http://perm.liexin.net/page/business/8/request/manualhistorylist_check" target="_blank" class="btn btn-primary">申请权限</a>
<a href="{{ Config('perm.url').'/page/business/'.Config('perm.bid').'/request/manualhistorylist_check' }}" target="_blank" class="btn btn-primary">申请权限</a>
</div>
</div>
@endif
......@@ -301,7 +301,7 @@
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
<a href="http://perm.liexin.net/page/business/8/request/manualmessage_send" target="_blank" class="btn btn-primary">申请权限</a>
<a href="{{ Config('perm.url').'/page/business/'.Config('perm.bid').'/request/manualmessage_send' }}" target="_blank" class="btn btn-primary">申请权限</a>
</div>
</div>
@endif
\ No newline at end of file
......@@ -91,7 +91,7 @@
<div style="text-align: center">
<label style="margin-top: 30px">对不起,您没有权限查看此页面</label>
<div>
<a href="http://perm.liexin.net/page/business/8/request/template_check" target="_blank" class="btn btn-primary">申请权限</a>
<a href="{{ Config('perm.url').'/page/business/'.Config('perm.bid').'/request/template_check' }}" target="_blank" class="btn btn-primary">申请权限</a>
</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