Home.getConfig接口新增对1000错误码的处理

This commit is contained in:
zlzw 2023-06-03 14:13:29 +08:00
parent 6e595ff1e4
commit b02cbd7831

View File

@ -1,5 +1,6 @@
package com.yunbao.common.http; package com.yunbao.common.http;
import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.os.Build; import android.os.Build;
import android.util.Log; import android.util.Log;
@ -21,6 +22,8 @@ import com.yunbao.common.manager.APKManager;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.LiveClassManager; import com.yunbao.common.manager.LiveClassManager;
import com.yunbao.common.manager.NewLevelManager; import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MD5Util; import com.yunbao.common.utils.MD5Util;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
@ -224,7 +227,8 @@ public class CommonHttpUtil {
} }
if (obj.containsKey("clarity")) { if (obj.containsKey("clarity")) {
IMLoginManager.get(context).setClarity(obj.getString("clarity")); IMLoginManager.get(context).setClarity(obj.getString("clarity"));
} if (obj.containsKey("defaultBubbleUrl")) { }
if (obj.containsKey("defaultBubbleUrl")) {
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl")); IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
} }
} catch (Exception e) { } catch (Exception e) {
@ -232,6 +236,22 @@ public class CommonHttpUtil {
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage(); String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
ErrorActivity.forward("GetConfig接口返回数据异常", error); ErrorActivity.forward("GetConfig接口返回数据异常", error);
} }
} else if (code == 1000) {
new DialogUitl
.Builder(context)
.setContent(msg)
.setCancelable(false)
.setClickCallback3(new DialogUitl.SimpleCallback3() {
@Override
public void onConfirmClick(Dialog dialog) {
AppManager.getInstance().AppExit();
}
@Override
public void onCancel() {
AppManager.getInstance().AppExit();
}
}).build().show();
} }
} }