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
afac9e58
Commit
afac9e58
authored
Aug 08, 2018
by
tufengqi
Committed by
tufengqi
Aug 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
输出类常量修改
parent
fc723239
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ResponseMsg.php
classes/fpf/response/ResponseMsg.php
+6
-6
No files found.
classes/fpf/response/ResponseMsg.php
View file @
afac9e58
...
...
@@ -39,7 +39,7 @@ class ResponseMsg
return
self
::
$default_header_list
;
}
public
function
arrSuccess
(
$data
=
'ok'
,
$code
=
200
)
public
function
arrSuccess
(
$data
=
BaseConstant
::
OK
,
$code
=
200
)
{
return
[
BaseConstant
::
ERROR
=>
false
,
BaseConstant
::
MESSAGE
=>
$data
,
BaseConstant
::
CODE
=>
$code
];
}
...
...
@@ -61,8 +61,8 @@ class ResponseMsg
$msg
=
'unknown error'
;
}
$view
=
[
'code'
=>
$code
,
'msg'
=>
$msg
,
BaseConstant
::
CODE
=>
$code
,
BaseConstant
::
MESSAGE
=>
$msg
,
];
$json
=
json_encode
(
$view
);
return
$this
->
dumpJsonData
(
$json
);
...
...
@@ -91,10 +91,10 @@ class ResponseMsg
*/
public
function
dealRet
(
$ret
)
{
if
(
true
===
$ret
[
'error'
])
{
$this
->
jsonError
(
$ret
[
'msg'
]
?
:
'unknown error'
);
if
(
true
===
$ret
[
BaseConstant
::
ERROR
])
{
$this
->
jsonError
(
$ret
[
BaseConstant
::
MESSAGE
]
?
:
'unknown error'
);
}
else
{
$this
->
jsonSuccess
(
$ret
[
'msg'
]
?
:
BaseConstant
::
OK
);
$this
->
jsonSuccess
(
$ret
[
BaseConstant
::
MESSAGE
]
?
:
BaseConstant
::
OK
);
}
}
...
...
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