Commit cbd845b5 by 王文龙

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

parent 5429cbf7
...@@ -94,7 +94,7 @@ dependencies { ...@@ -94,7 +94,7 @@ dependencies {
implementation 'com.android.support:multidex:1.0.3' implementation 'com.android.support:multidex:1.0.3'
implementation("com.offcn.live:base:2.5.0-s18") 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 // DB
implementation 'org.greenrobot:greendao:3.2.2' implementation 'org.greenrobot:greendao:3.2.2'
......
...@@ -286,14 +286,28 @@ public class ContactListFragment extends BaseFragment { ...@@ -286,14 +286,28 @@ public class ContactListFragment extends BaseFragment {
Utils.logout(getActivity()); Utils.logout(getActivity());
startActivity(new Intent(getActivity(), LoginActivity.class)); startActivity(new Intent(getActivity(), LoginActivity.class));
getActivity().finish(); 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 { } else {
showErrorView(); 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) { } catch (Exception e) {
showErrorView(); showErrorView();
CommonUtils.showToast(getActivity(), "联系人获取失败"); CommonUtils.showToast(getActivity(), "获取联系人失败");
} }
} }
}, new Response.ErrorListener() { }, new Response.ErrorListener() {
......
...@@ -148,7 +148,14 @@ public class LoginActivity extends BaseActivity { ...@@ -148,7 +148,14 @@ public class LoginActivity extends BaseActivity {
CommonUtils.showToast(LoginActivity.this, "用户信息获取失败"); CommonUtils.showToast(LoginActivity.this, "用户信息获取失败");
} }
} else { } 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) { } catch (Exception e) {
CommonUtils.showToast(LoginActivity.this, "用户信息解析失败"); 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