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
c8dbb5a1
authored
Nov 21, 2022
by
宁成龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化收货公司
parent
39f507e5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
app/Admin/Forms/User/EditUserHandle.php
app/Admin/Forms/UserAddress/SaveUserAddressHandle.php
app/Admin/Service/UserAddressService.php
app/Admin/Service/UserService.php
app/Admin/Forms/User/EditUserHandle.php
View file @
c8dbb5a1
...
...
@@ -65,7 +65,7 @@ class EditUserHandle extends Form implements LazyRenderable
$form
->
width
(
5
)
->
text
(
'email'
);
});
$this
->
row
(
function
(
Row
$form
)
{
$form
->
width
(
5
)
->
select
(
'
reg_source'
)
->
options
(
admin_trans
(
'user.options.reg_source
'
))
->
required
();
$form
->
width
(
5
)
->
select
(
'
account_properties'
)
->
options
(
admin_trans
(
'user.options.account_properties
'
))
->
required
();
$form
->
width
(
5
)
->
text
(
'remark'
);
});
}
...
...
app/Admin/Forms/UserAddress/SaveUserAddressHandle.php
View file @
c8dbb5a1
...
...
@@ -38,6 +38,7 @@ class SaveUserAddressHandle extends Form implements LazyRenderable
if
(
$input
[
'is_default'
]
==
1
)
{
UserAddress
::
updateByUserId
(
$address
[
'user_id'
],
[
'is_default'
=>
0
]);
}
$input
[
'consignee'
]
=
$input
[
'first_name'
]
.
' '
.
$input
[
'last_name'
];
UserAddress
::
updateById
(
$addressId
,
$input
);
}
else
{
$userId
=
$this
->
payload
[
'user_id'
]
??
0
;
...
...
app/Admin/Service/UserAddressService.php
View file @
c8dbb5a1
...
...
@@ -5,6 +5,7 @@ namespace App\Admin\Service;
use
App\Admin\Actions\User\UserAssignAction
;
use
App\Admin\Actions\User\UserStatusAction
;
use
App\Admin\Actions\User\UserTransferAction
;
use
App\Models\Country
;
use
App\Models\User
;
use
Dcat\Admin\Grid
;
...
...
@@ -18,9 +19,9 @@ class UserAddressService
$grid
->
column
(
'phone'
);
$grid
->
column
(
'detail_address'
);
$grid
->
column
(
'city'
);
$grid
->
column
(
'address_type'
);
$grid
->
column
(
'address_type'
)
->
using
(
admin_trans
(
'user-address.options.address_type'
))
;
$grid
->
column
(
'post_code'
);
$grid
->
column
(
'country'
);
$grid
->
column
(
'country'
)
->
using
(
Country
::
getCountryMap
())
;
$grid
->
column
(
'province'
);
}
}
app/Admin/Service/UserService.php
View file @
c8dbb5a1
...
...
@@ -177,6 +177,7 @@ class UserService
"create_time"
=>
time
(),
"update_time"
=>
time
(),
];
$addressData
[
'consignee'
]
=
$addressData
[
'first_name'
]
.
" "
.
$addressData
[
'last_name'
];
UserAddress
::
insertData
(
$addressData
);
}
...
...
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