沈斌
2018-05-15 4eb9bd2cd9921386de8caec224cdb7405196472d
app/src/main/java/com/moral/yunfushao/httputils/HttpUtils.java
@@ -137,13 +137,15 @@
                        XLog.e("result:" + s);
                        try {
                            JSONObject resJosn= new JSONObject(s);
                            JSONObject jsonObject = resJosn.getJSONObject("data");
                            int errno = jsonObject.optInt("code");
                            String message = jsonObject.optString("msg");
                            if(errno == 0){
                                httpCallBack.onSuccess(jsonObject.optString("info"),message);
                            }else{
                                httpCallBack.onFail(errno,message);
                            if(resJosn.has("data")) {
                                JSONObject jsonObject = resJosn.getJSONObject("data");
                                int errno = jsonObject.optInt("code");
                                String message = jsonObject.optString("msg");
                                if(errno == 0){
                                    httpCallBack.onSuccess(jsonObject.optString("info"),message);
                                }else{
                                    httpCallBack.onFail(errno,message);
                                }
                            }
                        } catch (JSONException e) {
                            e.printStackTrace();