@Override public void onReqResponse(Object o, int methodId) { super.onReqResponse(o, methodId); switch (methodId) { case HuPuRes.REQ_METHOD_USER_LOGOUT: QuizCommitResp code = (QuizCommitResp) o; if (code.result == 0) { showToast("解绑失败"); } else { SharedPreferencesMgr.setString("bp", ""); SharedPreferencesMgr.setString("bp", ""); SharedPreferencesMgr.setString("tk", null); SharedPreferencesMgr.setString("is_login", null); SharedPreferencesMgr.setString(HuPuRes.KEY_NICK_NAME, null); SharedPreferencesMgr.setString("hupu_name", ""); this.mToken = null; this.uid = -1; btn_submit.setVisibility(View.INVISIBLE); showToast(getString(R.string.title_unbind_phone_success)); findViewById(R.id.phone_arrow).setVisibility(View.VISIBLE); findViewById(R.id.layout_phone).setEnabled(true); txtNickName.setText(getString(R.string.title_unsett_nick)); setBindInfo(); } break; case HuPuRes.REQ_METHOD_USER_BIND: // if (o!=null) { // PhoneBindReq entity = (PhoneBindReq)o; // //HupuLog.e("papa", entity.token); // updateBindInfo(entity); // } setBindInfo(); break; case HuPuRes.REQ_METHOD_USER_UNBIND: QuizCommitResp unbind = (QuizCommitResp) o; if (unbind.result == 0) { showToast("已绑定的帐号只有一个了,不能再解绑!"); } else { // 解绑成功后 缓存的值改变 SharedPreferencesMgr.setInt("channel" + channel, 0); setBindInfo(); } break; case HuPuRes.REQ_METHOD_USER_BIND_INFO: if (o != null) { BindInfoReq entity = (BindInfoReq) o; if (entity.isLogin == 0) { checkToken(entity.isLogin); } setBindInfo(); } break; default: break; } }