Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
11e99621
...
11e99621ef1ca505474aaf8ccc6bea98598d7293
authored
2022-05-26 16:16:00 +0800
by
mengfan.xie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
release
1 parent
2b49d752
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app/Http/Controllers/Release/WorkController.php
app/Http/Controllers/Release/WorkController.php
View file @
11e9962
...
...
@@ -49,9 +49,9 @@ class WorkController extends BaseController
$size
=
(
int
)
$request
->
get
(
'size'
,
20
);
list
(
$code
,
$msg
,
$data
)
=
$this
->
doApi
(
'/invests/content/searchSinger'
,[
'singerName'
=>
$singerName
]);
$max_page
=
ceil
(
count
(
$data
)
/
$size
);
$data
=
array_slice
(
$data
,(
$page
-
1
)
*
$size
,
$size
,
true
);
$data
=
array_slice
(
$data
,(
$page
-
1
)
*
$size
,
$size
);
if
(
$code
===
0
)
{
return
Response
::
success
([
'data'
=>
$data
,
'max_page'
=>
$max_page
]);
return
Response
::
success
([
'data'
=>
array_values
(
$data
)
,
'max_page'
=>
$max_page
]);
}
else
{
return
Response
::
error
(
-
1
,
$msg
);
}
...
...
Please
register
or
sign in
to post a comment