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
f66afe25
authored
Nov 21, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善提示
parent
333aa830
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
app/Admin/Actions/User/UserEditAction.php
app/Admin/Renderable/UserDetail.php
app/Admin/Service/UserService.php
app/Admin/Actions/User/UserEditAction.php
View file @
f66afe25
...
@@ -29,7 +29,7 @@ class UserEditAction extends AbstractTool
...
@@ -29,7 +29,7 @@ class UserEditAction extends AbstractTool
public
function
render
()
public
function
render
()
{
{
$form
=
EditUserHandle
::
make
([
'key'
=>
$this
->
getKey
()]);
$form
=
EditUserHandle
::
make
([
'key'
=>
$this
->
getKey
()]);
$buttonName
=
trans
(
'user.labels.handle
'
);
$buttonName
=
admin_trans
(
'edit
'
);
return
Modal
::
make
()
->
lg
()
->
title
(
$this
->
title
)
->
body
(
$form
->
payload
([
'key'
=>
$this
->
getKey
()]))
->
onLoad
return
Modal
::
make
()
->
lg
()
->
title
(
$this
->
title
)
->
body
(
$form
->
payload
([
'key'
=>
$this
->
getKey
()]))
->
onLoad
(
$this
->
getModalScript
())
->
button
(
'<button style="margin-right: 5px" class="btn btn-sm btn-primary">
(
$this
->
getModalScript
())
->
button
(
'<button style="margin-right: 5px" class="btn btn-sm btn-primary">
<i class="feather icon-check-circle"></i> <span class="d-none d-sm-inline" style="margin-left: 5px">'
.
<i class="feather icon-check-circle"></i> <span class="d-none d-sm-inline" style="margin-left: 5px">'
.
...
...
app/Admin/Renderable/UserDetail.php
View file @
f66afe25
...
@@ -21,7 +21,7 @@ class UserDetail extends \Dcat\Admin\Support\LazyRenderable
...
@@ -21,7 +21,7 @@ class UserDetail extends \Dcat\Admin\Support\LazyRenderable
return
Show
::
make
(
$id
,
new
User
(),
function
(
Show
$show
)
{
return
Show
::
make
(
$id
,
new
User
(),
function
(
Show
$show
)
{
$show
->
panel
()
$show
->
panel
()
->
tools
(
function
(
Show\Tools
$tools
)
{
->
tools
(
function
(
Show\Tools
$tools
)
{
$userEditAction
=
new
UserEditAction
(
"用户编辑"
);
$userEditAction
=
new
UserEditAction
(
admin_trans
(
"edit"
)
);
$userEditAction
->
setKey
(
$this
->
key
);
$userEditAction
->
setKey
(
$this
->
key
);
$tools
->
disableDelete
();
$tools
->
disableDelete
();
$tools
->
disableEdit
();
$tools
->
disableEdit
();
...
...
app/Admin/Service/UserService.php
View file @
f66afe25
...
@@ -133,7 +133,7 @@ class UserService
...
@@ -133,7 +133,7 @@ class UserService
"status"
=>
User
::
STATUS_NORMAL
,
"status"
=>
User
::
STATUS_NORMAL
,
"sale_id"
=>
request
()
->
user
->
userId
??
"1000"
,
"sale_id"
=>
request
()
->
user
->
userId
??
"1000"
,
"sale_name"
=>
request
()
->
user
->
name
??
"admin"
,
"sale_name"
=>
request
()
->
user
->
name
??
"admin"
,
"create_time"
=>
time
(),
"create_time"
=>
time
(),
"update_time"
=>
time
(),
"update_time"
=>
time
(),
];
];
$userId
=
User
::
insertData
(
$userData
);
$userId
=
User
::
insertData
(
$userData
);
...
@@ -151,6 +151,7 @@ class UserService
...
@@ -151,6 +151,7 @@ class UserService
'phone'
=>
'required'
,
'phone'
=>
'required'
,
'country'
=>
'required'
,
'country'
=>
'required'
,
'city'
=>
'required'
,
'city'
=>
'required'
,
'address_type'
=>
'required'
,
'post_code'
=>
'required'
,
'post_code'
=>
'required'
,
'detail_address'
=>
'required'
,
'detail_address'
=>
'required'
,
'is_default'
=>
'required'
,
'is_default'
=>
'required'
,
...
...
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