接口返回拼接message,review by 王海元
Showing
2 changed files
with
1 additions
and
1 deletions
@@ -121,7 +121,7 @@ export default class NativeRequest { | @@ -121,7 +121,7 @@ export default class NativeRequest { | ||
121 | async _parseResponse(response) { | 121 | async _parseResponse(response) { |
122 | let code = response && response.code ? response.code : 0; | 122 | let code = response && response.code ? response.code : 0; |
123 | if (code == 200) { | 123 | if (code == 200) { |
124 | - if (response.message != '' && response.data) { | 124 | + if (response.message && response.message != '' && response.data && typeof(response.data) =="object") { |
125 | response.data.message = response.message; | 125 | response.data.message = response.message; |
126 | } | 126 | } |
127 | return response.data; | 127 | return response.data; |
-
Please register or login to post a comment