private void startRequest() { if (httpRequestHandle != null) { return; } if (!UserCenterModuleEngine.getInstance().checkUserIsLogin()) { return; } if (!srl_refresh.isRefreshing()) { srl_refresh.post( new Runnable() { @Override public void run() { srl_refresh.setRefreshing(true); } }); } RequestParams requestParams = new RequestParams(); requestParams.put( NetConfig.UserCenterModule_MyLevel.RequestKey.sessionId, UserCenterModuleEngine.getInstance().getSessionIdFromCache()); httpRequestHandle = NetUtil.funHttpRequest( NetConfig.UserCenterModule_MyLevel.requestModel, baseActivity, null, NetConfig.UserCenterModule_MyLevel.ACTION, requestParams, new CusHttpResponseHandler()); }
@Override public void onSuccess( int statusCode, Header[] headers, String rawJsonResponse, UserCenter_MyLevel response) { NetUtil.showLogByResponse(isSuccess, statusCode, rawJsonResponse, null); if (isFinishing()) { return; } if (response.errno == NetConfig.UserCenterModule_MyLevel.ResponseValue.errno_0) { isSuccess = true; } else { isSuccess = false; } errMsg = getString( (Integer) NetConfig.UserCenterModule_MyLevel.ResponseValue.errno_message.get( response.errno, R.string.tvdog_common_http_errno_unknown)); endRequest(isSuccess, statusCode, rawJsonResponse, response, errMsg); }