/** * 修改密码 * * @param tel * @param password * @param verify * @param callback */ public void modifyPassword(String tel, String password, String verify, StatusCallback callback) { RequestMap params = new RequestMap(); params.put("tel", tel); params.put("newP", Utils.MD5(password.getBytes())); params.put("code", verify); RequestManager.getInstance().post(API.URL.ModifyPassword, params, callback); }
public void userRegister( String name, String tel, String password, String verify, StatusCallback callback) { RequestMap params = new RequestMap(); params.put("name", name); params.put("tel", tel); params.put("pass", Utils.MD5(password.getBytes())); params.put("code", verify); RequestManager.getInstance().post(API.URL.Register, params, callback); }
public void updateAccountData() { RequestManager.getInstance() .post( API.URL.GetUserData, null, new DataCallback<UserAccountData>() { @Override public void success(String info, UserAccountData data) { setUserAccountData(data); } }); }
private void applyToken(String token) { HashMap<String, String> map = new HashMap(); JSONObject json = new JSONObject(); try { json.put("token", token); json.put("type", "android"); json.put("version", Utils.getAppVersionCode() + ""); } catch (JSONException e) { e.printStackTrace(); } map.put("token", json.toString()); RequestManager.getInstance().setHeader(map); Utils.Log("setToken:" + json.toString()); }
/** * 绑定手机 * * @param * @param code */ public void boundTel( String oldTel, String newTel, String oldPassword, String newPassword, String code, StatusCallback callback) { RequestMap params = new RequestMap(); params.put("oldTel", oldTel); params.put("newTel", newTel); params.put("oldPassword", Utils.MD5(oldPassword.getBytes())); params.put("newPassword", Utils.MD5(newPassword.getBytes())); params.put("code", code); RequestManager.getInstance().post(API.URL.BindTel, params, callback); }
public void userLogin(String tel, String password, StatusCallback callback) { RequestMap params = new RequestMap(); params.put("tel", tel); params.put("pass", Utils.MD5(password.getBytes())); RequestManager.getInstance() .post( API.URL.Login, params, callback.add( new DataCallback<UserAccountData>() { @Override public void success(String info, UserAccountData data) { setUserAccountData(data); } @Override public void error(String errorInfo) {} })); }
public void userLoginThroughQQ(String openId, String face, String name, StatusCallback callback) { RequestMap params = new RequestMap(); params.put("type", "0"); params.put("openId", openId); params.put("face", face); params.put("name", name); RequestManager.getInstance() .post( API.URL.ThirdLogin, params, callback.add( new DataCallback<UserAccountData>() { @Override public void success(String info, UserAccountData data) { setUserAccountData(data); } @Override public void error(String errorInfo) {} })); }
/** * 商家登录 * * @param email * @param password * @param callback */ public void bizLogin(String email, String password, DataCallback callback) { RequestMap param = new RequestMap(); param.put("email", email); param.put("pass", password); RequestManager.getInstance().post(API.URL.BizLogin, param, callback); }
public void isRegistered(String tel, StatusCallback callback) { RequestMap params = new RequestMap(); params.put("tel", tel); RequestManager.getInstance().post(API.URL.IsRegistered, params, callback); }