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
711f256d
authored
Nov 22, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善输入体验
parent
b170e545
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
app/Admin/Forms/UserAddress/SaveUserAddressHandle.php
app/Admin/Forms/UserAddress/SaveUserAddressHandle.php
View file @
711f256d
...
...
@@ -32,6 +32,7 @@ class SaveUserAddressHandle extends Form implements LazyRenderable
if
(
empty
(
$address
))
{
return
$this
->
response
()
->
error
(
"地址不存在"
);
}
$input
[
'is_default'
]
=
$input
[
'is_default'
]
??
0
;
$input
=
array_filter
(
$input
,
function
(
$value
)
{
return
$value
!==
null
;
});
...
...
@@ -58,7 +59,7 @@ class SaveUserAddressHandle extends Form implements LazyRenderable
"city"
=>
$input
[
"city"
]
??
""
,
"post_code"
=>
$input
[
"post_code"
]
??
""
,
"detail_address"
=>
$input
[
"detail_address"
]
??
""
,
"is_default"
=>
$input
[
"is_default"
]
??
""
,
"is_default"
=>
$input
[
"is_default"
]
??
0
,
"create_time"
=>
time
(),
"update_time"
=>
time
(),
];
...
...
@@ -104,7 +105,7 @@ class SaveUserAddressHandle extends Form implements LazyRenderable
$row
->
width
(
12
)
->
textarea
(
'detail_address'
)
->
required
();
});
$this
->
row
(
function
(
Row
$row
)
{
$row
->
width
(
3
)
->
switch
(
'is_default'
)
->
required
()
;
$row
->
width
(
3
)
->
switch
(
'is_default'
);
});
}
...
...
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