/** 登录 */ public void requestLogin() { showLoading(); AjaxParams params = new AjaxParams(); params.put("username", mPhone); params.put("password", mPwd); httpRequest.get(Urls.LOGIN, params, callBack, 0); }
private void LoadMessage() { AjaxParams params = new AjaxParams(); String APP_KEY = "kswby"; String KEY_SECRET = "54sad1ferae"; /* rstr true string 请求随机数 sign true string 生成加密串 openid true string 用户ID串 refresh*/ // FinalHttp(Context context, String appKey, String appSecret, String appVersion, String uuid, // String channel) final FinalHttp httpRequest = new FinalHttp( getApplicationContext(), APP_KEY, KEY_SECRET, String.valueOf(8.0), GetDeviceUniqueIDUtil.getDeviceUniqueId(getApplicationContext()), "tusheng"); String openid = "app" + GlobleArrt.message.data.uid; try { params.put("openid", DesUtil.encode(openid)); } catch (Exception e) { e.printStackTrace(); } params = httpRequest.addFixedParams(params); Log.d("pa", params.toString()); httpRequest.getCustomFixedParams( "http://tbxl.120ask.com/api/chat/news_list", params, new AjaxCallBack<HttpResult>() { // // http://tbxl.120ask.com/api/chat/news_list?fkey=kswby&openid=xxxxxxxx&rstr=randomstr&sign=F8E5211C67B1F5074E35BB77007A237C // // http://tbxl.120ask.com/api/chat/news_list?fkey=kswby&openid=app44686471&rstr=1445589573883&sign=5011EAF412C1A3E2E6F254291F04955D // openid=app44686471&rstr=1445589573883&fkey=kswby&os=2&sign=5011EAF412C1A3E2E6F254291F04955D&retype=2 @Override public void onSuccess(HttpResult httpResult) { Log.d("json", httpResult.baseJson.toString()); } @Override public void onFailure(int i, HttpExceptionResult httpExceptionResult) {} }, 4); }