|
|
@@ -2,6 +2,7 @@ package com.miekir.eden.ui.mine.login;
|
|
|
|
|
|
import android.content.Intent;
|
|
|
import android.os.Bundle;
|
|
|
+import android.provider.Settings;
|
|
|
import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
|
|
|
|
@@ -22,7 +23,7 @@ import com.miekir.mvp.presenter.InjectPresenter;
|
|
|
* Description: 登录界面
|
|
|
*/
|
|
|
public class LoginActivity extends BaseBeiActivity implements View.OnClickListener, ILoginView {
|
|
|
- private TextInputEditText et_email;
|
|
|
+ //private TextInputEditText et_email;
|
|
|
private TextInputEditText et_password;
|
|
|
|
|
|
@InjectPresenter
|
|
|
@@ -36,14 +37,14 @@ public class LoginActivity extends BaseBeiActivity implements View.OnClickListen
|
|
|
@Override
|
|
|
public void initViews(Bundle savedInstanceState) {
|
|
|
setTitle("伊甸园登录", false);
|
|
|
- et_email = findViewById(R.id.et_email);
|
|
|
+ //et_email = findViewById(R.id.et_email);
|
|
|
et_password = findViewById(R.id.et_password);
|
|
|
ViewTool.setOnClickListener(this, this, new int[]{R.id.btn_login, R.id.tv_forget});
|
|
|
|
|
|
- BeiUser user = UserInfoManager.getInstance().getBeiUser();
|
|
|
- if (user != null && !TextUtils.isEmpty(user.email)) {
|
|
|
- et_email.setText(user.email);
|
|
|
- }
|
|
|
+ //BeiUser user = UserInfoManager.getInstance().getBeiUser();
|
|
|
+ //if (user != null && !TextUtils.isEmpty(user.email)) {
|
|
|
+ // et_email.setText(user.email);
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -54,10 +55,11 @@ public class LoginActivity extends BaseBeiActivity implements View.OnClickListen
|
|
|
break;
|
|
|
|
|
|
case R.id.btn_login:
|
|
|
- String email = et_email.getEditableText().toString();
|
|
|
+ //String email = et_email.getEditableText().toString();
|
|
|
+ String email = Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID);
|
|
|
String password = et_password.getEditableText().toString();
|
|
|
if (TextUtils.isEmpty(email)) {
|
|
|
- ToastTool.showShort("账号不能为空");
|
|
|
+ ToastTool.showShort("暂不支持本手机");
|
|
|
return;
|
|
|
}
|
|
|
if (TextUtils.isEmpty(password)) {
|
|
|
@@ -66,7 +68,8 @@ public class LoginActivity extends BaseBeiActivity implements View.OnClickListen
|
|
|
}
|
|
|
|
|
|
password = StringTool.getEncodeString(password);
|
|
|
- if (TextUtils.isEmpty(password)) {
|
|
|
+ email = StringTool.getEncodeString(email);
|
|
|
+ if (TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) {
|
|
|
ToastTool.showShort("该手机不支持加密算法");
|
|
|
return;
|
|
|
}
|