|
@@ -19,6 +19,7 @@ import com.cooleshow.base.utils.Utils;
|
|
|
import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
|
|
|
import com.cooleshow.base.widgets.VerifyEditText;
|
|
|
import com.cooleshow.usercenter.R;
|
|
|
+import com.cooleshow.usercenter.bean.UserInfo;
|
|
|
import com.cooleshow.usercenter.bean.UserLoginInfo;
|
|
|
import com.cooleshow.usercenter.constants.UserConstants;
|
|
|
import com.cooleshow.usercenter.databinding.ActivityInputCodeLayoutBinding;
|
|
@@ -39,6 +40,7 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
|
|
|
public static final int TIME_COUNT_TOTAL = 60000;
|
|
|
public static final int REQUEST_CODE_FOR_SET_PASSWORD = 100001;
|
|
|
private String mPhoneNum;
|
|
|
+ private int tenantId = UserConstants.NO_HAVE_TENANT;
|
|
|
|
|
|
private CountDownTimer mCountDownTimer = new CountDownTimer(TIME_COUNT_TOTAL, TIME_COUNT_SPACE) {
|
|
|
@Override
|
|
@@ -102,7 +104,7 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
|
|
|
public void run() {
|
|
|
viewBinding.editCode.showSoftKeyBoard();
|
|
|
}
|
|
|
- },200);
|
|
|
+ }, 200);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -190,12 +192,18 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void loginByCodeSuccess(UserLoginInfo data) {
|
|
|
+ public void loginByCodeSuccess(UserLoginInfo data, UserInfo userInfo) {
|
|
|
//添加公共参数
|
|
|
if (isFinishing() || isDestroyed()) {
|
|
|
return;
|
|
|
}
|
|
|
if (data != null) {
|
|
|
+ if (userInfo.getTenantId() != UserConstants.NO_HAVE_TENANT) {
|
|
|
+ this.tenantId = userInfo.getTenantId();
|
|
|
+ UserHelper.addTenantIdParams(userInfo.getTenantId());
|
|
|
+ } else {
|
|
|
+ UserHelper.removeTenantIdParams();
|
|
|
+ }
|
|
|
if (data.password) {
|
|
|
//有设置密码
|
|
|
UserHelper.handleLoginSuccessAction(data);
|
|
@@ -226,6 +234,7 @@ public class VerifyCodeInputActivity extends BaseMVPActivity<ActivityInputCodeLa
|
|
|
private void setLoginResult() {
|
|
|
Intent intent = new Intent();
|
|
|
intent.putExtra(UserConstants.LOGIN_STATUS, UserConstants.LOGIN_STATUS_SUCCESS);
|
|
|
+ intent.putExtra(UserConstants.TENANT_ID, tenantId);
|
|
|
setResult(RESULT_OK, intent);
|
|
|
finish();
|
|
|
}
|