Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
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
3dedd5ff
authored
Nov 14, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
地址接口列表报错问题
parent
8aeb99a0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
app/Http/Controllers/Api/UserAddressApiController.php
app/Http/Controllers/BrandController.php
app/Http/Services/BrandService.php
app/Http/Services/UserAddressService.php
app/Http/Controllers/Api/UserAddressApiController.php
View file @
3dedd5ff
...
...
@@ -17,7 +17,7 @@ class UserAddressApiController extends Controller
{
$userId
=
$request
->
user
->
id
;
$data
=
UserAddressService
::
getUserAddressList
(
$userId
);
return
$this
->
setSuccessData
(
$data
[
'data'
],
count
(
$data
[
'data'
]
));
return
$this
->
setSuccessData
(
$data
,
count
(
$data
));
}
public
function
detail
(
Request
$request
)
...
...
app/Http/Controllers/BrandController.php
View file @
3dedd5ff
...
...
@@ -23,15 +23,17 @@ class BrandController extends Controller
* @return \Illuminate\Contracts\Support\Renderable
*/
public
function
map
()
{
{
$brandList
=
BrandService
::
getStandardBrandList
();
return
view
(
'brand.map'
,
compact
(
'brandList'
));
}
public
function
info
(
Request
$request
)
{
$id
=
$request
->
route
(
'id'
);
$brand
=
BrandService
::
getStandardBrandList
()
return
view
(
'brand.list'
);
}
}
app/Http/Services/BrandService.php
View file @
3dedd5ff
...
...
@@ -39,4 +39,9 @@ class BrandService
return
$standardBrandList
;
}
public
static
function
getBrandInfo
(
$
)
{
}
}
app/Http/Services/UserAddressService.php
View file @
3dedd5ff
...
...
@@ -58,7 +58,7 @@ class UserAddressService
}
])
->
where
(
'user_id'
,
$userId
)
->
orderBy
(
'address_id'
,
'desc'
);
$result
=
$query
->
get
()
->
toArray
();
foreach
(
$result
[
'data'
]
as
&
$item
)
{
foreach
(
$result
as
&
$item
)
{
$item
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
,
$item
[
'create_time'
]);
$item
[
'country'
]
=
\Arr
::
get
(
$item
[
'country'
],
'name'
);
}
...
...
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