Commit d5d11062 by 宁成龙

Merge remote-tracking branch 'origin/master'

parents 25d1b1c3 1e7721a8
...@@ -27,7 +27,7 @@ class OrderApiController extends BaseController ...@@ -27,7 +27,7 @@ class OrderApiController extends BaseController
$params = $request->all(); $params = $request->all();
$type = arrayGet($params, "type"); $type = arrayGet($params, "type");
$order_id = 203; $order_id = 69;
$orderAddressList = OrderService::getOrderAddress($order_id); $orderAddressList = OrderService::getOrderAddress($order_id);
$orderAddressList = arrayChangeKeyByField($orderAddressList,"order_address_type"); $orderAddressList = arrayChangeKeyByField($orderAddressList,"order_address_type");
// dump($orderAddressList); // dump($orderAddressList);
...@@ -117,6 +117,8 @@ class OrderApiController extends BaseController ...@@ -117,6 +117,8 @@ class OrderApiController extends BaseController
$info["orderList"] = OrderService::getOrderList($order_id); $info["orderList"] = OrderService::getOrderList($order_id);
$info["orderList"]["adminUser"] = CmsUser::getInfoByUserId($info["orderList"]["sale_id"]);
// dd($info); // dd($info);
if($type == "1"){ if($type == "1"){
......
...@@ -18,20 +18,20 @@ class HomeController extends Controller ...@@ -18,20 +18,20 @@ class HomeController extends Controller
->header('Dashboard') ->header('Dashboard')
->description('Description...') ->description('Description...')
->body(function (Row $row) { ->body(function (Row $row) {
$row->column(6, function (Column $column) { $row->column(12, function (Column $column) {
$column->row(Dashboard::title()); $column->row(view('dashboard.title'));
$column->row(new Examples\Tickets()); // $column->row(new Examples\Tickets());
}); });
$row->column(6, function (Column $column) { // $row->column(6, function (Column $column) {
$column->row(function (Row $row) { // $column->row(function (Row $row) {
$row->column(6, new Examples\NewUsers()); // $row->column(6, new Examples\NewUsers());
$row->column(6, new Examples\NewDevices()); // $row->column(6, new Examples\NewDevices());
}); // });
//
$column->row(new Examples\Sessions()); // $column->row(new Examples\Sessions());
$column->row(new Examples\ProductOrders()); // $column->row(new Examples\ProductOrders());
}); // });
}); });
} }
} }
...@@ -33,7 +33,7 @@ class Permission ...@@ -33,7 +33,7 @@ class Permission
$menus = !in_array($request->user->userId, $permData['admin_group']) ? $menus = !in_array($request->user->userId, $permData['admin_group']) ?
$this->menu($menuData, $request->user->userId) : $menuData; $this->menu($menuData, $request->user->userId) : $menuData;
if (empty($menus)) { if (empty($menus)) {
return $this->view('Auth', '没有访问权限', $permData['go_url']); echo '菜单生成错误,请联系技术';
} }
$request->menus = $menus; $request->menus = $menus;
...@@ -42,12 +42,12 @@ class Permission ...@@ -42,12 +42,12 @@ class Permission
$request->perms = $perms; $request->perms = $perms;
} }
if (!in_array($user->userId, $permData['admin_group']) && $action != 'Dashboard') {//不是超级管理员 if (!in_array($user->userId, $permData['admin_group']) && $action != 'Dashboard') {//不是超级管理员
$perm = $this->perm($request->user->userId, $action); $perm = $this->perm($request->user->userId, strtolower($action));
if ($perm !== true) { if ($perm !== true) {
if ($isApi) { if ($isApi) {
return '没有权限'; return '没有权限';
} }
return $this->view('Auth', '没有访问权限', $permData['go_url']); echo '没有访问权限';
} }
} }
...@@ -138,11 +138,12 @@ class Permission ...@@ -138,11 +138,12 @@ class Permission
function perm($userId, $perm = '') function perm($userId, $perm = '')
{ {
$permArr = config('perm.perm'); $permArr = config('perm.perm');
$notAuth = $permArr['notAuth']; $notAuth = $permArr['not_auth'];
$AdminID = $permArr['adminGroup']; $AdminID = $permArr['admin_group'];
if ((!in_array($perm, $notAuth)) && !in_array($userId, $AdminID)) {//过滤不用鉴权的方法与用户 if ((!in_array($perm, $notAuth)) && !in_array($userId, $AdminID)) {//过滤不用鉴权的方法与用户
$permID = $permArr['id']; $permID = $permArr['id'];
$url = $permArr['url'] . '/' . $userId . '/' . $permID . '?perms=' . $perm; $url = $permArr['url'] . '/' . $userId . '/' . $permID . '?perms=' . $perm;
dd($url);
$result = json_decode(curl($url, '', 0), true); $result = json_decode(curl($url, '', 0), true);
if (!isset($result['retcode']) || $result['retcode'] !== 0 || $result['data']['perms'][$perm] == false) { if (!isset($result['retcode']) || $result['retcode'] !== 0 || $result['data']['perms'][$perm] == false) {
return false; return false;
......
...@@ -8,6 +8,6 @@ return [ ...@@ -8,6 +8,6 @@ return [
'admin_group' => explode(',', env('ADMIN_GROUP')),//管理员权限组,有所有权限 'admin_group' => explode(',', env('ADMIN_GROUP')),//管理员权限组,有所有权限
'menu_id' => env('MENU_ID'), 'menu_id' => env('MENU_ID'),
'menu_url' => env('MENU_URL'), 'menu_url' => env('MENU_URL'),
'not_auth' => [] 'not_auth' => ['index']
] ]
]; ];
<style>
.table tr:first-child td {
border-top: 0;
}
</style>
<div class="table-responsive">
<table class="table">
@foreach($dependencies as $dependency => $version)
<tr>
<td width="240px" class="bold text-80">{{ $dependency }}</td>
<td><span class="label bg-primary">{{ $version }}</span></td>
</tr>
@endforeach
</table>
</div>
\ No newline at end of file
<div class="table-responsive">
<table class="table">
@foreach($envs as $env)
<tr>
<td width="120px" class="bold text-80">{{ $env['name'] }}</td>
<td>{{ $env['value'] }}</td>
</tr>
@endforeach
</table>
</div>
\ No newline at end of file
<style>
.ext-icon {
color: rgba(0,0,0,0.5);
margin-left: 10px;
}
.installed {
color: #00a65a;
margin-right: 15px;
font-size:20px;
}
</style>
<ul class="products-list product-list-in-box" id="extension-box" style="margin-top:10px;min-height: 100px">
@foreach($extensions as $extension)
<li class="item hidden">
<div class="product-img">
<i class="{{$extension['icon']}} fa-2x ext-icon"></i>
</div>
<div class="product-info" data-key="{{$extension['key']}}">
<a href="{{ $extension['link'] }}" target="_blank" class="">
{{ $extension['name'] }}
</a>
@if($extension['installed'])
<span class="pull-right installed"><i class="ti-check"></i></span>
@endif
</div>
</li>
@endforeach
</ul>
<div class="box-footer text-center">
<a href="https://github.com/jqhph/dcat-admin#%E6%89%A9%E5%B1%95" target="_blank" class="uppercase">View All Extensions</a>
</div>
<script>Dcat.ready(function () {
// var $box = $('#extension-box');
// $box.loading();
//
// $.ajax({
// url: 'https://jqhph.github.io/dcat-admin/extra/extensions.html',
// success: function (response) {
// $box.loading(false);
//
// $box.html(response);
// },
// error: function () {
// $box.loading(false);
//
// $box.find('.item').removeClass('hidden');
// }
// });
})</script>
\ No newline at end of file
<style>
.dashboard-title .links {
text-align: center;
margin-bottom: 2.5rem;
}
.dashboard-title .links > a {
padding: 0 25px;
font-size: 12px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
color: #fff;
}
.dashboard-title h1 {
font-weight: 200;
font-size: 2.5rem;
}
.dashboard-title .avatar {
background: #fff;
border: 2px solid #fff;
width: 70px;
height: 70px;
}
</style>
<div class="dashboard-title card bg-primary">
<div class="card-body" style="min-height: 100%">
<div class="text-center ">
<img class="avatar img-circle shadow mt-1" style="width: 500px" src="{{ admin_asset('@admin/images/logo.png') }}">
<div class="text-center mb-1">
<h1 class="mb-3 mt-2 text-white">Semour Admin</h1>
<div class="links">
{{-- <a href="https://github.com/jqhph/dcat-admin" target="_blank">Github</a>--}}
{{-- <a href="http://www.dcatadmin.com/" id="doc-link" target="_blank">{{ __('admin.documentation') }}</a>--}}
{{-- <a href="http://www.dcatadmin.com/" id="demo-link" target="_blank">{{ __('admin.extensions') }}</a>--}}
{{-- <a href="https://jqhph.github.io/dcat-admin/demo.html" id="demo-link" target="_blank">{{ __('admin.demo') }}</a>--}}
</div>
</div>
</div>
</div>
</div>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="10" style="text-align:center"> <td colspan="10" style="text-align:center">
SELLER /CONTACT:{{@$info["orderList"]["adminUser"]["name"]}} Email:{{@$info["orderList"]["adminUser"]["email"]}} Tel: +86{{@$info["orderList"]["adminUser"]["mobile"]}} Fax: (+86){{@$info["orderList"]["adminUser"]["fax"]}} Mob: SELLER /CONTACT:{{@$info["orderList"]["adminUser"]["engName"]}} Email:{{@$info["orderList"]["adminUser"]["email"]}} Tel: +86{{@$info["orderList"]["adminUser"]["mobile"]}} Fax: (+86){{@$info["orderList"]["adminUser"]["fax"]}} Mob:
+86{{@$info["orderList"]["adminUser"]["mobile"]}} +86{{@$info["orderList"]["adminUser"]["mobile"]}}
</td> </td>
</tr> </tr>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="10" style="text-align:center"> <td colspan="10" style="text-align:center">
SELLER /CONTACT:{{@$info["orderList"]["adminUser"]["name"]}} Email:{{@$info["orderList"]["adminUser"]["email"]}} Tel: +86{{@$info["orderList"]["adminUser"]["mobile"]}} Fax: (+86){{@$info["orderList"]["adminUser"]["fax"]}} Mob: SELLER /CONTACT:{{@$info["orderList"]["adminUser"]["engName"]}} Email:{{@$info["orderList"]["adminUser"]["email"]}} Tel: +86{{@$info["orderList"]["adminUser"]["mobile"]}} Fax: (+86){{@$info["orderList"]["adminUser"]["fax"]}} Mob:
+86{{@$info["orderList"]["adminUser"]["mobile"]}} +86{{@$info["orderList"]["adminUser"]["mobile"]}}
</td> </td>
</tr> </tr>
...@@ -79,10 +79,10 @@ ...@@ -79,10 +79,10 @@
<td>{{@$bill["consignee"]}}</td> <td>{{@$bill["consignee"]}}</td>
<td> <td>
@if(!empty($info["orderList"]["scm_user"])) @if(!empty($info["orderList"]["scm_user"]))
@if($info["orderList"]["scm_user"]["name"]) @if($info["orderList"]["scm_user"]["company_name"])
{{$info["orderList"]["scm_user"]["name"]}}
@else
{{$info["orderList"]["scm_user"]["company_name"]}} {{$info["orderList"]["scm_user"]["company_name"]}}
@else
{{$info["orderList"]["scm_user"]["name"]}}
@endif @endif
@endif @endif
</td> </td>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="10" style="text-align:center"> <td colspan="10" style="text-align:center">
SELLER /CONTACT:{{@$info["orderList"]["adminUser"]["name"]}} Email:{{@$info["orderList"]["adminUser"]["email"]}} Tel: +86{{@$info["orderList"]["adminUser"]["mobile"]}} Fax: (+86){{@$info["orderList"]["adminUser"]["fax"]}} Mob: SELLER /CONTACT:{{@$info["orderList"]["adminUser"]["engName"]}} Email:{{@$info["orderList"]["adminUser"]["email"]}} Tel: +86{{@$info["orderList"]["adminUser"]["mobile"]}} Fax: (+86){{@$info["orderList"]["adminUser"]["fax"]}} Mob:
+86{{@$info["orderList"]["adminUser"]["mobile"]}} +86{{@$info["orderList"]["adminUser"]["mobile"]}}
</td> </td>
</tr> </tr>
...@@ -80,10 +80,10 @@ ...@@ -80,10 +80,10 @@
<td>{{@$bill["consignee"]}}</td> <td>{{@$bill["consignee"]}}</td>
<td> <td>
@if(!empty($info["orderList"]["scm_user"])) @if(!empty($info["orderList"]["scm_user"]))
@if($info["orderList"]["scm_user"]["name"]) @if($info["orderList"]["scm_user"]["company_name"])
{{$info["orderList"]["scm_user"]["name"]}}
@else
{{$info["orderList"]["scm_user"]["company_name"]}} {{$info["orderList"]["scm_user"]["company_name"]}}
@else
{{$info["orderList"]["scm_user"]["name"]}}
@endif @endif
@endif @endif
</td> </td>
......
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