Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
902c8a53
Commit
902c8a53
authored
Jul 31, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返回格式修改
parent
312da40d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
BaseConstant.php
classes/fpf/response/BaseConstant.php
+1
-0
ResponseMsg.php
classes/fpf/response/ResponseMsg.php
+2
-2
No files found.
classes/fpf/response/BaseConstant.php
View file @
902c8a53
...
@@ -8,6 +8,7 @@ class BaseConstant
...
@@ -8,6 +8,7 @@ class BaseConstant
const
MSG
=
'msg'
;
const
MSG
=
'msg'
;
const
CODE
=
'code'
;
const
CODE
=
'code'
;
const
VAL
=
'val'
;
const
VAL
=
'val'
;
const
DATA
=
'data'
;
const
OK
=
'ok'
;
const
OK
=
'ok'
;
const
FINALTAG
=
'finaltag'
;
const
FINALTAG
=
'finaltag'
;
}
}
classes/fpf/response/ResponseMsg.php
View file @
902c8a53
...
@@ -65,12 +65,12 @@ class ResponseMsg
...
@@ -65,12 +65,12 @@ class ResponseMsg
* @param int $code
* @param int $code
* @return string
* @return string
*/
*/
public
function
jsonSuccess
(
$
msg
=
''
,
$code
=
0
)
public
function
jsonSuccess
(
$
data
=
''
,
$code
=
20
0
)
{
{
$view
=
[
$view
=
[
BaseConstant
::
CODE
=>
$code
,
BaseConstant
::
CODE
=>
$code
,
BaseConstant
::
MSG
=>
BaseConstant
::
OK
,
BaseConstant
::
MSG
=>
BaseConstant
::
OK
,
BaseConstant
::
VAL
=>
$msg
BaseConstant
::
DATA
=>
$data
];
];
$json
=
json_encode
(
$view
);
$json
=
json_encode
(
$view
);
return
$this
->
dumpJsonData
(
$json
);
return
$this
->
dumpJsonData
(
$json
);
...
...
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