新增密码登录
This commit is contained in:
@@ -1275,6 +1275,8 @@
|
||||
android:name="com.sdk.base.module.permission.PermissionActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
tools:remove="android:screenOrientation" />
|
||||
<activity android:name=".ui.login.LoginPasswordActivity" />
|
||||
<activity android:name=".ui.setting.ResetPasswordActivity" />
|
||||
|
||||
<activity
|
||||
android:name="com.idlefish.flutterboost.containers.FlutterBoostActivity"
|
||||
|
@@ -5,7 +5,9 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
@@ -55,7 +57,9 @@ import io.reactivex.disposables.Disposable;
|
||||
/**
|
||||
* @author zhouxiangfeng
|
||||
* @date 17/2/26
|
||||
* @Deprecated use {@link com.yizhuan.erban.quick_pass.QuickPassLoginAct }
|
||||
*/
|
||||
@Deprecated
|
||||
public class LoginActivity extends BaseLoginAct implements View.OnClickListener {
|
||||
|
||||
private static final String TAG = "LoginActivity";
|
||||
@@ -283,7 +287,7 @@ public class LoginActivity extends BaseLoginAct implements View.OnClickListener
|
||||
codeEditText.setVisibility(View.VISIBLE);
|
||||
getCodeButton.setVisibility(View.VISIBLE);
|
||||
btnLogin.setEnabled(false);
|
||||
}else {
|
||||
} else {
|
||||
stopCountDownTimer();
|
||||
getCodeButton.setText("重新获取");
|
||||
getCodeButton.setClickable(true);//重新获得点击
|
||||
@@ -327,7 +331,7 @@ public class LoginActivity extends BaseLoginAct implements View.OnClickListener
|
||||
Logger.e(TAG, "获取短信失败!");
|
||||
}
|
||||
});
|
||||
}else {
|
||||
} else {
|
||||
AuthModel.get()
|
||||
.sendLoginCode(accountEt.getEditableText().toString(), 0)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
@@ -0,0 +1,172 @@
|
||||
package com.yizhuan.erban.ui.login;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseLoginAct;
|
||||
import com.yizhuan.erban.ui.setting.ResetPasswordActivity;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_core.auth.exception.BanAccountException;
|
||||
import com.yizhuan.xchat_android_core.auth.exception.IsSuperAdminException;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
|
||||
public class LoginPasswordActivity extends BaseLoginAct {
|
||||
|
||||
|
||||
private View btnNext;
|
||||
private EditText edtPhone;
|
||||
private EditText edtPassword;
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent intent = new Intent(context, LoginPasswordActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
private final TextWatcher textWatcher = new TextWatcherWrapper() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
checkInput();
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login_password);
|
||||
EventBus.getDefault().register(this);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void checkInput() {
|
||||
boolean enabled = !TextUtils.isEmpty(edtPhone.getText().toString()) && edtPhone.getText().toString().trim().length() >= 7
|
||||
&& !TextUtils.isEmpty(edtPassword.getText().toString()) && edtPassword.getText().toString().trim().length() >= 6;
|
||||
btnNext.setEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
private void initView() {
|
||||
btnNext = findViewById(R.id.btn_next);
|
||||
edtPhone = findViewById(R.id.et_account);
|
||||
edtPassword = findViewById(R.id.et_password);
|
||||
edtPhone.addTextChangedListener(textWatcher);
|
||||
edtPassword.addTextChangedListener(textWatcher);
|
||||
btnNext.setOnClickListener(v -> login());
|
||||
findViewById(R.id.tv_code_login).setOnClickListener(v -> finish());
|
||||
findViewById(R.id.tv_forget_password).setOnClickListener(v -> ResetPasswordActivity.start(context,ResetPasswordActivity.FROM_NOT_LOGIN));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
StatusBarLightModes(true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
private void login() {
|
||||
getDialogManager().showProgressDialog(this, "正在登录...");
|
||||
AuthModel.get().login(
|
||||
edtPhone.getText().toString().trim(),
|
||||
edtPassword.getText().toString().trim(),
|
||||
"",
|
||||
"",
|
||||
"")
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mCompositeDisposable.add(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
getDialogManager().dismissDialog();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
getDialogManager().dismissDialog();
|
||||
dealWithLoginError(e);
|
||||
}
|
||||
});
|
||||
|
||||
StatisticManager.Instance().onEvent(this,
|
||||
StatisticsProtocol.Event.EVENT_LOGIN_PHONE_CLICK, "点击手机号登录", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dealWithLoginError(Throwable e) {
|
||||
if (!(e instanceof IsSuperAdminException)) {
|
||||
String msg = e.getMessage();
|
||||
StringBuilder eventLabel = new StringBuilder("登录注册页-登录失败");
|
||||
if (!TextUtils.isEmpty(msg)) {
|
||||
eventLabel.append(msg);
|
||||
}
|
||||
// 2004可以完整写入
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_LOGIN_FAILED_CLICK, eventLabel.toString());
|
||||
}
|
||||
if (e instanceof BanAccountException) {
|
||||
BanAccountException exception = (BanAccountException) e;
|
||||
String text = "您的账号因" + exception.getMessage() + "被封禁\n解封时间:";
|
||||
int start = text.length();
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日", Locale.getDefault());
|
||||
text += simpleDateFormat.format(new Date(exception.getDate()));
|
||||
SpannableString spannableString = new SpannableString(text);
|
||||
spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(LoginPasswordActivity.this, R.color.appColor)),
|
||||
start, text.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
getDialogManager().showOkCancelWithTitleDialog("您被封号了",
|
||||
spannableString, "确定", "取消", null);
|
||||
} else {
|
||||
toast(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册成功后发送过来的事件
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLoginEvent(LoginEvent event) {
|
||||
getDialogManager().dismissDialog();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
}
|
@@ -68,9 +68,7 @@ public class LoginPhoneActivity extends BaseActivity implements View.OnClickList
|
||||
accountEt.setFocusableInTouchMode(true);
|
||||
accountEt.requestFocus();
|
||||
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
// permission();
|
||||
// showLoginTip();
|
||||
// AuthModel.get().isFromLogin = true;
|
||||
|
||||
}
|
||||
|
||||
private void onFindViews() {
|
||||
@@ -84,6 +82,7 @@ public class LoginPhoneActivity extends BaseActivity implements View.OnClickList
|
||||
btnNext.setEnabled(false);
|
||||
accountEt.addTextChangedListener(textWatcher);
|
||||
ivBack.setOnClickListener(this);
|
||||
findViewById(R.id.tv_password_login).setOnClickListener(v -> LoginPasswordActivity.start(this));
|
||||
}
|
||||
|
||||
private void checkInput() {
|
||||
|
@@ -1,10 +0,0 @@
|
||||
package com.yizhuan.erban.ui.login.presenter;
|
||||
|
||||
import com.yizhuan.erban.base.BaseMvpPresenter;
|
||||
import com.yizhuan.erban.ui.login.view.LoginView;
|
||||
|
||||
public class LoginPresenter extends BaseMvpPresenter<LoginView>{
|
||||
|
||||
|
||||
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
package com.yizhuan.erban.ui.login.view;
|
||||
|
||||
import com.yizhuan.xchat_android_library.base.IMvpBaseView;
|
||||
|
||||
public interface LoginView extends IMvpBaseView{
|
||||
|
||||
}
|
@@ -159,7 +159,7 @@ public class ModifyPwdActivity extends BaseBindingActivity<ActivityModifyPwdBind
|
||||
if (type == PAY_PWD) {
|
||||
VerifyPhoneActivity.startForResult(this, true);
|
||||
} else {
|
||||
UIHelper.showForgetPswAct(ModifyPwdActivity.this);
|
||||
ResetPasswordActivity.start(context,ResetPasswordActivity.FROM_LOGIN);
|
||||
}
|
||||
break;
|
||||
case R.id.btn_get_code:
|
||||
|
@@ -0,0 +1,149 @@
|
||||
package com.yizhuan.erban.ui.setting;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseBindingActivity;
|
||||
import com.yizhuan.erban.databinding.ActivityResetLoginPwdBinding;
|
||||
import com.yizhuan.erban.ui.login.CodeDownTimer;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.code.CodeType;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
@ActLayoutRes(R.layout.activity_reset_login_pwd)
|
||||
public class ResetPasswordActivity extends BaseBindingActivity<ActivityResetLoginPwdBinding> {
|
||||
public static final int FROM_NOT_LOGIN = 1;
|
||||
public static final int FROM_LOGIN = 2;
|
||||
|
||||
|
||||
private int from;
|
||||
|
||||
private CodeDownTimer timer;
|
||||
|
||||
public static void start(Context context, int type) {
|
||||
Intent intent = new Intent(context, ResetPasswordActivity.class);
|
||||
intent.putExtra("from", type);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
from = getIntent().getIntExtra("from", FROM_LOGIN);
|
||||
mBinding.setClick(this);
|
||||
initTitleBar("重置登录密码");
|
||||
|
||||
if (from == FROM_LOGIN) {
|
||||
mBinding.etPhone.setText(UserModel.get().getCacheLoginUserInfo().getPhone());
|
||||
mBinding.etPhone.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
super.onClick(v);
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_commit:
|
||||
commit();
|
||||
break;
|
||||
case R.id.btn_get_code:
|
||||
mBinding.btnGetCode.setClickable(false);
|
||||
AuthModel.get()
|
||||
.sendLoginCode(mBinding.etPhone.getText().toString(), from == FROM_LOGIN ?
|
||||
CodeType.RESET_PSW_LOGIN : CodeType.RESET_PSW_NOT_LOGIN)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
startCountDownTimer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
mBinding.btnGetCode.setClickable(true);
|
||||
LogUtils.e("获取短信失败!");
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void startCountDownTimer() {
|
||||
stopCountDownTimer();
|
||||
timer = new CodeDownTimer(mBinding.btnGetCode, 60000, 1000);
|
||||
timer.start();
|
||||
}
|
||||
|
||||
private void stopCountDownTimer() {
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void commit() {
|
||||
if (TextUtils.isEmpty(mBinding.edPassword.getText())) {
|
||||
toast("密码不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
getDialogManager().showProgressDialog(ResetPasswordActivity.this, "处理中...");
|
||||
AuthModel.get().requestResetPsw(
|
||||
mBinding.etPhone.getText().toString(),
|
||||
mBinding.etCode.getText().toString(),
|
||||
mBinding.edPassword.getText()
|
||||
)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
getDialogManager().dismissDialog();
|
||||
UserModel.get().updateCurrentUserInfo().subscribe();
|
||||
toast("修改成功");
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(e.getMessage());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
}
|
||||
}
|
@@ -2,18 +2,18 @@ package com.yizhuan.erban.ui.setting;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.tencent.bugly.beta.Beta;
|
||||
import com.tongdaxing.erban.upgrade.AppUpgradeHelper;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
@@ -165,6 +165,9 @@ public class SettingActivity extends BaseActivity implements View.OnClickListene
|
||||
case R.id.tv_black_manager:
|
||||
BlackListManageActivity.start(this);
|
||||
break;
|
||||
case R.id.rly_login_pwd:
|
||||
ModifyPwdActivity.start(this, ModifyPwdActivity.LOGIN_PWD);
|
||||
break;
|
||||
case R.id.rly_pay_pwd:
|
||||
if (UserModel.get().getCacheLoginUserInfo() == null) {
|
||||
toast("无当前登录用户信息.");
|
||||
|
143
app/src/main/res/layout/activity_login_password.xml
Normal file
143
app/src/main/res/layout/activity_login_password.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:padding="@dimen/dp_17"
|
||||
android:src="@drawable/arrow_left_white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:text="验证码登录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="140dp"
|
||||
android:text="你的手机号是多少"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="@dimen/text_size_18"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_account"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:background="@drawable/bg_common_disable"
|
||||
android:baselineAligned="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:text="+86"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="123456" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_password"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/bg_common_disable"
|
||||
android:baselineAligned="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_account">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:text="密码"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="textPassword"
|
||||
android:maxLength="11"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_forget_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="75dp"
|
||||
android:text="忘记密码"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_password" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="下一步"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_forget_password" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
110
app/src/main/res/layout/activity_reset_login_pwd.xml
Normal file
110
app/src/main/res/layout/activity_reset_login_pwd.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_normal_1c1b22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_25" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:hint="请输入你的手机号"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:text=""
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:background="@null"
|
||||
android:hint="@string/hint_require_code"
|
||||
android:inputType="number"
|
||||
android:maxLength="16"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_get_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="29dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="@color/transparent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{click}"
|
||||
android:text="@string/text_request_code"
|
||||
android:textColor="@color/appColor"
|
||||
android:textSize="@dimen/dp_13"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/et_code"
|
||||
app:layout_constraintEnd_toEndOf="@+id/et_code"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.SuperEditText
|
||||
android:id="@+id/ed_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLength="16"
|
||||
app:hint="请输入密码(6-16个字符)"
|
||||
app:hint_color="@color/text_hint_555574"
|
||||
app:text_color="@color/text_normal_c6c6e9"
|
||||
app:title_hint="确认密码" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_commit"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:clickable="true"
|
||||
android:enabled="true"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:text="重置密码"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</layout>
|
@@ -168,8 +168,45 @@
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:background="@color/line_height_201F27" />
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@color/line_353548" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rly_login_pwd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{click}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:text="@string/text_setting_login_password"
|
||||
android:textColor="@color/text_title_white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_login_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:src="@drawable/setting_right" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@color/line_353548" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rly_pay_pwd"
|
||||
|
@@ -3,39 +3,29 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="10dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:paddingLeft="@dimen/dp_25"
|
||||
android:paddingRight="@dimen/dp_25">
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginEnd="@dimen/dp_40">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title_hint"
|
||||
android:visibility="gone"
|
||||
style="@style/subTitleTextAppearance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/subTitleTextAppearance"
|
||||
android:text="原密码"/>
|
||||
android:text="原密码"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:gravity="start|center_vertical"
|
||||
android:inputType="textPassword"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColorHint="@color/color_b3b3b3"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:background="@null"
|
||||
android:maxLength="16"
|
||||
tools:ignore="SpUsage" />
|
||||
android:maxLength="16" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -668,7 +668,7 @@
|
||||
<string name="text_setting_bind_alipay_account">绑定支付宝账号</string>
|
||||
<string name="text_setting_bind_bank_card_account">绑定提现银行卡</string>
|
||||
<string name="text_setting_withdraw_format_bank_card_info">%s (%s)</string>
|
||||
<string name="text_setting_login_password">登录密码</string>
|
||||
<string name="text_setting_login_password">设置/修改登录密码</string>
|
||||
<string name="text_modify">修改</string>
|
||||
<string name="text_setting_pay_password">支付密码</string>
|
||||
<string name="text_setting_feedback">我要反馈</string>
|
||||
|
@@ -16,6 +16,19 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_password_login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:text="密码登录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -53,7 +66,7 @@
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_account"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
|
@@ -18,7 +18,6 @@ import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.netease.nis.quicklogin.QuickLogin;
|
||||
import com.netease.nis.quicklogin.listener.QuickLoginPreMobileListener;
|
||||
import com.netease.nis.quicklogin.listener.QuickLoginTokenListener;
|
||||
import com.tongdaxing.erban.upgrade.AppUpgradeHelper;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseLoginAct;
|
||||
import com.yizhuan.erban.ui.login.LoginPhoneActivity;
|
||||
@@ -48,14 +47,8 @@ public class QuickPassLoginAct extends BaseLoginAct implements View.OnClickListe
|
||||
* 基本权限管理
|
||||
*/
|
||||
private final String[] BASIC_PERMISSIONS = new String[]{
|
||||
// Manifest.permission.READ_PHONE_STATE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
|
||||
// Manifest.permission.CAMERA,
|
||||
// Manifest.permission.RECORD_AUDIO,
|
||||
// Manifest.permission.ACCESS_COARSE_LOCATION,
|
||||
// Manifest.permission.ACCESS_FINE_LOCATION
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -63,17 +56,6 @@ public class QuickPassLoginAct extends BaseLoginAct implements View.OnClickListe
|
||||
*/
|
||||
private void permission() {
|
||||
checkPermission(() -> {
|
||||
// String oaid = OAIDUtil.getOaid();
|
||||
// String imei = TelephonyUtils.getImei(BasicConfig.INSTANCE.getAppContext());
|
||||
// String imeiMd5 = null;
|
||||
// if (!TextUtils.isEmpty(imei)) {
|
||||
// imeiMd5 = MD5Utils.getMD5String(imei);
|
||||
// }
|
||||
//
|
||||
// if (TextUtils.isEmpty(oaid) && TextUtils.isEmpty(imeiMd5) && !"bilibili2".equals(AppMetaDataUtil.getChannelID()) ){
|
||||
// return;
|
||||
// }
|
||||
// InitialModel.get().reportAdv(oaid,imeiMd5).subscribe();
|
||||
},
|
||||
R.string.ask_again,
|
||||
BASIC_PERMISSIONS);
|
||||
|
@@ -269,7 +269,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
VersionUtil.getLocalName(BasicConfig.INSTANCE.getAppContext()),
|
||||
"erban-client",
|
||||
account,
|
||||
"",//DESAndBase64(password)
|
||||
DESAndBase64(password),
|
||||
"password",
|
||||
"uyzjdhds",
|
||||
code,
|
||||
@@ -1380,17 +1380,18 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param code 验证码
|
||||
* @return
|
||||
*/
|
||||
@GET("/oauth/token")
|
||||
Single<LoginResult> login(@Query("phone") String phone,
|
||||
@Query("version") String version,
|
||||
@Query("client_id") String client_id,
|
||||
@Query("username") String username,
|
||||
@Query("password") String password,
|
||||
@Query("grant_type") String grant_type,
|
||||
@Query("client_secret") String client_secret,
|
||||
@Query("code") String code,
|
||||
@Query("yiDunToken") String yiDunToken,
|
||||
@Query("shuMeiDeviceId") String shuMeiDeviceId
|
||||
@FormUrlEncoded
|
||||
@POST("/oauth/token")
|
||||
Single<LoginResult> login(@Field("phone") String phone,
|
||||
@Field("version") String version,
|
||||
@Field("client_id") String client_id,
|
||||
@Field("username") String username,
|
||||
@Field("password") String password,
|
||||
@Field("grant_type") String grant_type,
|
||||
@Field("client_secret") String client_secret,
|
||||
@Field("code") String code,
|
||||
@Field("yiDunToken") String yiDunToken,
|
||||
@Field("shuMeiDeviceId") String shuMeiDeviceId
|
||||
);
|
||||
|
||||
|
||||
@@ -1406,16 +1407,17 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param client_secret
|
||||
* @return
|
||||
*/
|
||||
@GET("/oauth/token")
|
||||
Single<LoginResult> loginForOldMember(@Query("phone") String phone,
|
||||
@Query("version") String version,
|
||||
@Query("client_id") String client_id,
|
||||
@Query("username") String username,
|
||||
@Query("password") String password,
|
||||
@Query("grant_type") String grant_type,
|
||||
@Query("client_secret") String client_secret,
|
||||
@Query("operateType") int type,
|
||||
@Query("qqOpenid") String openid);
|
||||
@FormUrlEncoded
|
||||
@POST("/oauth/token")
|
||||
Single<LoginResult> loginForOldMember(@Field("phone") String phone,
|
||||
@Field("version") String version,
|
||||
@Field("client_id") String client_id,
|
||||
@Field("username") String username,
|
||||
@Field("password") String password,
|
||||
@Field("grant_type") String grant_type,
|
||||
@Field("client_secret") String client_secret,
|
||||
@Field("operateType") int type,
|
||||
@Field("qqOpenid") String openid);
|
||||
|
||||
/**
|
||||
* 登出接口
|
||||
@@ -1434,9 +1436,10 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param access_token
|
||||
* @return
|
||||
*/
|
||||
@GET("/oauth/ticket")
|
||||
Single<TicketResult> requestTicket(@Query("issue_type") String issue_type,
|
||||
@Query("access_token") String access_token);
|
||||
@FormUrlEncoded
|
||||
@POST("/oauth/ticket")
|
||||
Single<TicketResult> requestTicket(@Field("issue_type") String issue_type,
|
||||
@Field("access_token") String access_token);
|
||||
|
||||
|
||||
/**
|
||||
@@ -1446,15 +1449,16 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/acc/verification/code")
|
||||
Single<ServiceResult> requestSMSCode(@Query("phone") String phone,
|
||||
@Query("type") String type);
|
||||
|
||||
Single<ServiceResult> requestSMSCode(@Field("phone") String phone,
|
||||
@Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST("/acc/pwd/reset")
|
||||
Single<ServiceResult> requestResetPsw(@Query("phone") String phone,
|
||||
@Query("smsCode") String smsCode,
|
||||
@Query("newPwd") String newPwd);
|
||||
Single<ServiceResult> requestResetPsw(@Field("phone") String phone,
|
||||
@Field("smsCode") String smsCode,
|
||||
@Field("newPwd") String newPwd);
|
||||
|
||||
|
||||
/**
|
||||
@@ -1466,21 +1470,23 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param linkedmeChannel
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/acc/third/login")
|
||||
Single<LoginResult> thirdLogin(@Query("openid") String openid,
|
||||
@Query("unionid") String unionid,
|
||||
@Query("type") String type,
|
||||
@Query("linkedmeChannel") String linkedmeChannel,
|
||||
@Query("yiDunToken") String yiDunToken,
|
||||
@Query("shuMeiDeviceId") String shuMeiDeviceId);
|
||||
Single<LoginResult> thirdLogin(@Field("openid") String openid,
|
||||
@Field("unionid") String unionid,
|
||||
@Field("type") String type,
|
||||
@Field("linkedmeChannel") String linkedmeChannel,
|
||||
@Field("yiDunToken") String yiDunToken,
|
||||
@Field("shuMeiDeviceId") String shuMeiDeviceId);
|
||||
|
||||
/**
|
||||
* 音游上耳伴老用户用 QQ 登录时,判断 QQ 的 open id 是否存在
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/acc/third/isExistsQqAccount")
|
||||
Single<ServiceResult<String>> isExistsQqAccount(@Query("qqOpenid") String qqOpenid);
|
||||
Single<ServiceResult<String>> isExistsQqAccount(@Field("qqOpenid") String qqOpenid);
|
||||
|
||||
|
||||
/**
|
||||
@@ -1502,11 +1508,12 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/withDraw/phone")
|
||||
Single<ServiceResult> bindPhone(@Query("uid") String uid,
|
||||
@Query("phone") String phone,
|
||||
@Query("code") String code,
|
||||
@Query("ticket") String ticket);
|
||||
Single<ServiceResult> bindPhone(@Field("uid") String uid,
|
||||
@Field("phone") String phone,
|
||||
@Field("code") String code,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
/**
|
||||
* 获取绑定手机验证码
|
||||
@@ -1515,9 +1522,10 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param sign
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/withDraw/phoneCode")
|
||||
Single<ServiceResult> getSMSCode(@Query("params") String params,
|
||||
@Query("sign") String sign);
|
||||
Single<ServiceResult> getSMSCode(@Field("params") String params,
|
||||
@Field("sign") String sign);
|
||||
|
||||
/**
|
||||
* 注册接口
|
||||
@@ -1527,14 +1535,15 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/acc/register")
|
||||
Single<RegisterResult> register(@Query("phone") String phone,
|
||||
@Query("smsCode") String smsCode,
|
||||
@Query("verifyCode") String verifyCode,
|
||||
@Query("password") String password,
|
||||
@Query("linkedmeChannel") String linkedmeChannel,
|
||||
@Query("token") String yiDunToken,
|
||||
@Query("shuMeiDeviceId") String shuMeiDeviceId);
|
||||
Single<RegisterResult> register(@Field("phone") String phone,
|
||||
@Field("smsCode") String smsCode,
|
||||
@Field("verifyCode") String verifyCode,
|
||||
@Field("password") String password,
|
||||
@Field("linkedmeChannel") String linkedmeChannel,
|
||||
@Field("token") String yiDunToken,
|
||||
@Field("shuMeiDeviceId") String shuMeiDeviceId);
|
||||
|
||||
/**
|
||||
* 注册获取验证码
|
||||
@@ -1559,11 +1568,12 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("acc/pwd/modify")
|
||||
Single<ServiceResult<String>> changeLoginPwd(@Query("phone") String phone,
|
||||
@Query("pwd") String oldPasswd,
|
||||
@Query("newPwd") String newPasswd,
|
||||
@Query("ticket") String ticket);
|
||||
Single<ServiceResult<String>> changeLoginPwd(@Field("phone") String phone,
|
||||
@Field("pwd") String oldPasswd,
|
||||
@Field("newPwd") String newPasswd,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
/**
|
||||
* 设置登录密码, 第三方登录 没有登录密码,通过这个接口设置密码,账号就是耳伴号
|
||||
@@ -1574,11 +1584,12 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("acc/pwd/set")
|
||||
Single<ServiceResult<String>> setLoginPwd(@Query("phone") String phone,
|
||||
@Query("newPwd") String newPasswd,
|
||||
@Query("uid") String uid,
|
||||
@Query("ticket") String ticket);
|
||||
Single<ServiceResult<String>> setLoginPwd(@Field("phone") String phone,
|
||||
@Field("newPwd") String newPasswd,
|
||||
@Field("uid") String uid,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
|
||||
/**
|
||||
@@ -1588,8 +1599,9 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("sms/getCode")
|
||||
Single<ServiceResult<String>> sendCode(@Query("mobile") String phone, @Query("type") String type);
|
||||
Single<ServiceResult<String>> sendCode(@Field("mobile") String phone, @Field("type") String type);
|
||||
|
||||
/**
|
||||
* 验证验证码
|
||||
@@ -1598,8 +1610,9 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("sms/login/verify")
|
||||
Single<ServiceResult<Object>> check(@Query("phone") String phone, @Query("code") String code);
|
||||
Single<ServiceResult<Object>> check(@Field("phone") String phone, @Field("code") String code);
|
||||
|
||||
/**
|
||||
* @param token 易盾一键登录token
|
||||
@@ -1608,11 +1621,12 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param yiDunToken 易盾登录保护token
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("acc/oneclick/login")
|
||||
Single<LoginResult> quickPassLogin(@Query("token") String token,
|
||||
@Query("accessToken") String accessToken,
|
||||
@Query("shuMeiDeviceId") String shuMeiDeviceId,
|
||||
@Query("yiDunToken") String yiDunToken
|
||||
Single<LoginResult> quickPassLogin(@Field("token") String token,
|
||||
@Field("accessToken") String accessToken,
|
||||
@Field("shuMeiDeviceId") String shuMeiDeviceId,
|
||||
@Field("yiDunToken") String yiDunToken
|
||||
);
|
||||
|
||||
|
||||
|
@@ -7,7 +7,7 @@ package com.yizhuan.xchat_android_core.code;
|
||||
public interface CodeType {
|
||||
/**
|
||||
* 1注册,2登录,3重设密码,4绑定手机,5绑定支付宝,6重设支付密码,7解绑手机,10超管登录,
|
||||
* 11-绑定提现银行卡
|
||||
* 11-绑定提现银行卡 13,"非登录态重置密码" 14,"登录态重置密码"
|
||||
*/
|
||||
int REGISTER = 1;
|
||||
int LOGIN = 2;
|
||||
@@ -18,4 +18,6 @@ public interface CodeType {
|
||||
int UNBIND_PHONE = 7;
|
||||
int SUPER_ADMIN = 10;
|
||||
int BIND_WITHDRAW_BANK_CARD = 11;
|
||||
int RESET_PSW_NOT_LOGIN = 13;
|
||||
int RESET_PSW_LOGIN = 14;
|
||||
}
|
||||
|
Reference in New Issue
Block a user