| | |
| | | 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(); |