修改登录空指针问题

This commit is contained in:
18401019693 2023-02-09 14:14:02 +08:00
parent a808cd13c0
commit 859f54b1e1
2 changed files with 4 additions and 4 deletions

View File

@ -10,9 +10,9 @@ ext {
manifestPlaceholders = [ manifestPlaceholders = [
// //
// serverHost : "https://napi.yaoulive.com", serverHost : "https://napi.yaoulive.com",
// //
serverHost : "https://ceshi.yaoulive.com", // serverHost : "https://ceshi.yaoulive.com",
// //
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",

View File

@ -611,7 +611,7 @@ public class EntryActivity extends AppCompatActivity {
JSONObject obj = JSON.parseObject(info[0]); JSONObject obj = JSON.parseObject(info[0]);
String uid = obj.getString("id"); String uid = obj.getString("id");
String token = obj.getString("token"); String token = obj.getString("token");
if (obj.getString("need_bind").equals("0")) { if (obj.containsKey("need_bind") && obj.getString("need_bind").equals("0")) {
mFirstLogin = obj.getIntValue("first_login") == 1; mFirstLogin = obj.getIntValue("first_login") == 1;
mShowInvite = obj.getIntValue("isagent") == 1; mShowInvite = obj.getIntValue("isagent") == 1;
CommonAppConfig.getInstance().setLoginInfo(uid, token, true); CommonAppConfig.getInstance().setLoginInfo(uid, token, true);
@ -687,7 +687,7 @@ public class EntryActivity extends AppCompatActivity {
new LiveRoomCheckLivePresenter(activity, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { new LiveRoomCheckLivePresenter(activity, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override @Override
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal)); RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
} }
@Override @Override