Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
48037bc6
Commit
48037bc6
authored
Oct 18, 2018
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口格式
parent
142fa194
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
ApplicationController.php
api/controllers/ApplicationController.php
+5
-4
ApplicationBusiness.php
common/business/ApplicationBusiness.php
+2
-2
No files found.
api/controllers/ApplicationController.php
View file @
48037bc6
...
...
@@ -20,11 +20,12 @@ class ApplicationController extends BaseController
*/
public
function
actionIndex
()
{
$result
[
'code'
]
=
0
;
$recommendData
=
ApplicationBusiness
::
getRecommendList
();
$
result
[
'recommend'
]
=
$recommendData
;
$
data
[
'recommend'
]
=
$recommendData
;
$cate_app_data
=
ApplicationBusiness
::
getCategoryAppList
();
$result
[
'cate_app_data'
]
=
$cate_app_data
;
$data
[
'cate_app_data'
]
=
$cate_app_data
;
$result
[
'code'
]
=
0
;
$result
[
'data'
]
=
$data
;
return
$result
;
}
...
...
@@ -49,7 +50,7 @@ class ApplicationController extends BaseController
if
(
$id
){
return
ApplicationBusiness
::
appInfo
(
$id
);
}
else
{
return
[
'code'
=>
1
,
'msg'
=>
'id不能为空'
];
return
[
'code'
=>
1
,
'
data'
=>
[],
'
msg'
=>
'id不能为空'
];
}
}
...
...
common/business/ApplicationBusiness.php
View file @
48037bc6
...
...
@@ -115,9 +115,9 @@ class ApplicationBusiness
$app_item
[
'images'
]
=
[];
}
unset
(
$app_item
[
'image_ids'
]);
return
[
'code'
=>
0
,
'
app_info
'
=>
$app_item
];
return
[
'code'
=>
0
,
'
data
'
=>
$app_item
];
}
return
[
'code'
=>
1
,
'msg'
=>
"id不合法"
];
return
[
'code'
=>
1
,
'
data'
=>
[],
'
msg'
=>
"id不合法"
];
}
...
...
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