Commit cbd845b5 by 王文龙

[update]更新libsdk修复vivo推送注销异常,修复清源接口错误信息解析

parent 5429cbf7
......@@ -94,7 +94,7 @@ dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation("com.offcn.live:base:2.5.0-s18")
implementation("com.offcn.live:imsdk-kit:1.0.0.43")
implementation("com.offcn.live:imsdk-kit:1.0.0.44")
// DB
implementation 'org.greenrobot:greendao:3.2.2'
......
......@@ -286,14 +286,28 @@ public class ContactListFragment extends BaseFragment {
Utils.logout(getActivity());
startActivity(new Intent(getActivity(), LoginActivity.class));
getActivity().finish();
CommonUtils.showToast(getActivity(), response.getString("msg"));
String errorMsg = "登录异常";
if (response.has("msg")) {
errorMsg = response.getString("msg");
}
if (response.has("message")) {
errorMsg = response.getString("message");
}
CommonUtils.showToast(getActivity(), errorMsg);
} else {
showErrorView();
CommonUtils.showToast(getActivity(), response.getString("msg"));
String errorMsg = "获取联系人失败";
if (response.has("msg")) {
errorMsg = response.getString("msg");
}
if (response.has("message")) {
errorMsg = response.getString("message");
}
CommonUtils.showToast(getActivity(), errorMsg);
}
} catch (Exception e) {
showErrorView();
CommonUtils.showToast(getActivity(), "联系人获取失败");
CommonUtils.showToast(getActivity(), "获取联系人失败");
}
}
}, new Response.ErrorListener() {
......
......@@ -148,7 +148,14 @@ public class LoginActivity extends BaseActivity {
CommonUtils.showToast(LoginActivity.this, "用户信息获取失败");
}
} else {
CommonUtils.showToast(LoginActivity.this, response.getString("msg"));
String errorMsg = "登录失败";
if (response.has("msg")) {
errorMsg = response.getString("msg");
}
if (response.has("message")) {
errorMsg = response.getString("message");
}
CommonUtils.showToast(LoginActivity.this, errorMsg);
}
} catch (Exception e) {
CommonUtils.showToast(LoginActivity.this, "用户信息解析失败");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment