修改登录空指针问题

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);