This commit is contained in:
jia 2024-12-16 00:21:49 +08:00
parent e8f52aa35f
commit 001f8bcf20
2 changed files with 16 additions and 12 deletions

View File

@ -139,22 +139,23 @@ public class MySettingActivity extends BaseActivity {
});
dialog.setPositiveButton("继续注销", (dialog1, which) -> {
dialog1.dismiss();
hm.unregister(new HttpListener<BaseBean<User>>() {
hm.unregister(new HttpListener<BaseBean<Object>>() {
private int result;
@Override
public void success(BaseBean<User> baseBean) {
public void success(BaseBean<Object> baseBean) {
result = baseBean.result;
if (baseBean.isSuccess()){
SPUtil sp = SPUtil.getInstance(MySettingActivity.this);
sp.clear();
Commons.clean();
exitAccountSuccess();
}
}
@Override
public void finish() {
updateHandler.sendEmptyMessage(result);
if (Commons.NetWork.Success == result){
SPUtil sp = SPUtil.getInstance(MySettingActivity.this);
sp.clear();
Commons.clean();
exitAccountSuccess();
}else {
updateHandler.sendEmptyMessage(result);
}
}
@Override

View File

@ -365,7 +365,7 @@ public class HttpManager {
}
});
}
public HttpHandler unregister(final HttpListener<BaseBean<User>> httpListener, String userId) {
public HttpHandler unregister(final HttpListener<BaseBean<Object>> httpListener, String userId) {
String url = getFullUrl(users_URL + v3_URL + "deregister.do");
L.d(url);
RequestParams requestParams = new RequestParams();
@ -380,9 +380,9 @@ public class HttpManager {
@Override
public void onSuccess(ResponseInfo<String> responseInfo) {
L.d(responseInfo.result.toString());
BaseBean<User> baseBean = null;
BaseBean<Object> baseBean = null;
try {
baseBean = new Gson().fromJson(responseInfo.result, new TypeToken<BaseBean<User>>() {
baseBean = new Gson().fromJson(responseInfo.result, new TypeToken<BaseBean<Object>>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
@ -2873,6 +2873,9 @@ public class HttpManager {
RequestParams requestParams = new RequestParams();
requestParams.addBodyParameter("userId", userId);
requestParams.addBodyParameter("shopsUserId", shopsUserId);
L.i("jjia-------------"+userId);
L.i("jjia-------------"+shopsUserId);
String curTime = System.currentTimeMillis() / 1000 + "";
String nonce = getRandomNum() + "";
requestParams.addHeader(APPKEY, appKey);