Commit fad1ddbb by 宁成龙

Merge remote-tracking branch 'origin/master'

parents ed6ee05d 231b7e58
...@@ -2,7 +2,7 @@ APP_NAME=Laravel ...@@ -2,7 +2,7 @@ APP_NAME=Laravel
APP_ENV=local APP_ENV=local
APP_KEY=base64:Qez7GnqgT9Obb1V+FbzqgYIkkbSUeffZVsZsK+B3lkw= APP_KEY=base64:Qez7GnqgT9Obb1V+FbzqgYIkkbSUeffZVsZsK+B3lkw=
APP_DEBUG=true APP_DEBUG=true
APP_URL=http://localhost APP_URL=http://admin.semourdev.net/admin
LOG_CHANNEL=stack LOG_CHANNEL=stack
......
<?php
namespace App\Admin\Actions;
use App\Admin\Forms\AdminSetting as AdminSettingForm;
use Dcat\Admin\Actions\Action;
use Dcat\Admin\Widgets\Modal;
class AdminInfo extends Action
{
public function render()
{
return <<<HTML
<li class="dropdown dropdown-user nav-item">
<a class="dropdown-toggle nav-link dropdown-user-link" href="#" data-toggle="dropdown">
<div class="user-nav d-sm-flex d-none">
<span class="user-name text-bold-600">{{ request()->user->name }}</span>
<span class="user-status"><i class="fa fa-circle text-success"></i> {{ trans('admin.online') }}</span>
</div>
<span>
<img class="round" src="{{ $user->getAvatar() }}" alt="avatar" height="40" width="40" />
</span>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a href="{{ admin_url('auth/setting') }}" class="dropdown-item">
<i class="feather icon-user"></i> {{ trans('admin.setting') }}
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ admin_url('auth/logout') }}">
<i class="feather icon-power"></i> {{ trans('admin.logout') }}
</a>
</div>
</li>
HTML;
}
}
...@@ -31,6 +31,8 @@ class HandleInquiry extends Form implements LazyRenderable ...@@ -31,6 +31,8 @@ class HandleInquiry extends Form implements LazyRenderable
} }
Inquiry::where('inquiry_id', $input['inquiry_id'])->update([ Inquiry::where('inquiry_id', $input['inquiry_id'])->update([
'status' => $input['status'], 'status' => $input['status'],
'processing_time' => time(),
'update_time' => time(),
'processing_result' => $input['handle_result'] 'processing_result' => $input['handle_result']
]); ]);
return $this return $this
......
...@@ -183,19 +183,21 @@ HTML ...@@ -183,19 +183,21 @@ HTML
if (!Dcat\Admin\Support\Helper::isAjaxRequest()) { if (!Dcat\Admin\Support\Helper::isAjaxRequest()) {
$navbar->$method(App\Admin\Actions\AdminSetting::make()->render()); $navbar->$method(App\Admin\Actions\AdminSetting::make()->render());
} }
$navbar->right( // $navbar->right('');
<<<HTML
HTML
);
}); });
admin_inject_section(Admin::SECTION['NAVBAR_USER_PANEL'], function () {
return view('admin.navbar-user-panel', ['user' => request()->user]);
});
Admin::menu(function (Menu $menu) { Admin::menu(function (Menu $menu) {
//权限系统的菜单 //权限系统的菜单
$permMenus = request()->menus; $permMenus = request()->menus;
$permMenus = (array) $permMenus; $permMenus = (array)$permMenus;
$addMenus = []; $addMenus = [];
foreach ($permMenus as $key => &$permMenu) { foreach ($permMenus as $key => &$permMenu) {
$permMenu = (array) $permMenu; $permMenu = (array)$permMenu;
//为了区分本系统手动添加的菜单 //为了区分本系统手动添加的菜单
$key = $key + 1000; $key = $key + 1000;
$permMenu['id'] = $key + 1; $permMenu['id'] = $key + 1;
...@@ -205,7 +207,7 @@ Admin::menu(function (Menu $menu) { ...@@ -205,7 +207,7 @@ Admin::menu(function (Menu $menu) {
$addMenus[] = $permMenu; $addMenus[] = $permMenu;
if (!empty($permMenu['childs'])) { if (!empty($permMenu['childs'])) {
foreach ($permMenu['childs'] as $k => &$child) { foreach ($permMenu['childs'] as $k => &$child) {
$child = (array) $child; $child = (array)$child;
//为了让字菜单的id不和父菜单的id冲突 //为了让字菜单的id不和父菜单的id冲突
$child['id'] = $k + ($key + 1) * 100; $child['id'] = $k + ($key + 1) * 100;
$child['parent_id'] = $key + 1; $child['parent_id'] = $key + 1;
......
@if($user)
<li class="dropdown dropdown-user nav-item">
<a class="dropdown-toggle nav-link dropdown-user-link" href="#" data-toggle="dropdown">
<div class="user-nav d-sm-flex d-none">
<span class="user-name text-bold-600">{{ $user->name }}</span>
<span class="user-status"><i class="fa fa-circle text-success"></i> {{ trans('admin.online') }}</span>
</div>
<span>
<img class="round" src="/vendor/dcat-admin/images/default-avatar.jpg" alt="avatar" height="40" width="40" />
</span>
</a>
<div class="dropdown-menu dropdown-menu-right">
{{-- <a href="{{ admin_url('auth/setting') }}" class="dropdown-item">--}}
{{-- <i class="feather icon-user"></i> {{ trans('admin.setting') }}--}}
{{-- </a>--}}
{{-- <div class="dropdown-divider"></div>--}}
<a class="dropdown-item" href="{{ config('website.login.logout').'?redirect='.config('app.url') }}">
<i class="feather icon-power"></i> {{ trans('admin.logout') }}
</a>
</div>
</li>
@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