Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fad1ddbb
authored
Nov 16, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ed6ee05d
231b7e58
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
8 deletions
.env
app/Admin/Actions/AdminInfo.php
app/Admin/Forms/HandleInquiry.php
app/Admin/bootstrap.php
resources/views/admin/navbar-user-panel.blade.php
.env
View file @
fad1ddbb
...
@@ -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
...
...
app/Admin/Actions/AdminInfo.php
0 → 100644
View file @
fad1ddbb
<?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;
}
}
app/Admin/Forms/HandleInquiry.php
View file @
fad1ddbb
...
@@ -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
...
...
app/Admin/bootstrap.php
View file @
fad1ddbb
...
@@ -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
;
...
...
resources/views/admin/navbar-user-panel.blade.php
0 → 100644
View file @
fad1ddbb
@
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment