1、修改包的图片
2、修改房间的所有进出方式
This commit is contained in:
@@ -55,6 +55,7 @@ public abstract class BaseObserver<T> implements Observer<T> {
|
||||
if (apiException.getCode() == 301) {
|
||||
EventBus.getDefault().post(new LogOutEvent());
|
||||
try {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("提示当前账号已在别的地方登陆,如果不是本人操作请修改密码");
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
|
||||
@@ -24,6 +24,7 @@ public class DefaultTransformer<T> implements ObservableTransformer<BaseModel<T>
|
||||
.map(response -> {
|
||||
if (response.isTokenExpired()) {
|
||||
// 触发登出事件(EventBus)
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("提示当前账号已在别的地方登陆,如果不是本人操作请修改密码");
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
throw new APIException(-1, "登录已过期");
|
||||
}
|
||||
|
||||
@@ -315,6 +315,7 @@ public class RetrofitClient {
|
||||
observer.onNext(string.getData());
|
||||
} else if (code == 301) {
|
||||
try {
|
||||
ToastUtils.showShort("提示当前账号已在别的地方登陆,如果不是本人操作请修改密码");
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -1994,7 +1995,7 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
ToastUtils.showShort("提示当前账号已在别的地方登陆,如果不是本人操作请修改密码");
|
||||
if (t.toString().contains("登录失效")) {
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
@@ -2308,6 +2309,7 @@ public class RetrofitClient {
|
||||
|
||||
} else if (code == 301) {
|
||||
try {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("提示当前账号已在别的地方登陆,如果不是本人操作请修改密码");
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -2360,7 +2362,14 @@ public class RetrofitClient {
|
||||
public void onResponse(Call<BaseModel<List<XlhDrawBean>>> call, Response<BaseModel<List<XlhDrawBean>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<XlhDrawBean>> baseModel = response.body();
|
||||
observer.onNext(baseModel.getData());
|
||||
if (baseModel.getCode()==1) {
|
||||
if (baseModel != null && baseModel.getData() != null) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}
|
||||
}else {
|
||||
observer.onNext(null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user