Esempio n. 1
0
  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) {}
                }));
  }
Esempio n. 2
0
  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) {}
                }));
  }