Commit 74b85fa9 by YKai

fix:发送验证码失败错误信息Toast提示

parent 4fa302b8
...@@ -34,6 +34,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -34,6 +34,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
} }
//发送登录验证码 //发送登录验证码
@SuppressLint("CheckResult")
override fun sendLoginCode(phone: String, phoneCountryCode: String) { override fun sendLoginCode(phone: String, phoneCountryCode: String) {
mModel.sendLoginMsgCode(phone, phoneCountryCode) mModel.sendLoginMsgCode(phone, phoneCountryCode)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -43,10 +44,10 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -43,10 +44,10 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
.subscribe({ .subscribe({
if (it.code == 200) { if (it.code == 200) {
YDLCacheUtils.saveCodeTime(phone, System.currentTimeMillis().toString()) YDLCacheUtils.saveCodeTime(phone, System.currentTimeMillis().toString())
// ToastUtil.toastShort("验证码已发送")
mView.startCountdown(60) mView.startCountdown(60)
} else { } else {
mView.startAnim() mView.startAnim()
ToastUtil.toastShort(it.msg)
} }
}, { }, {
mView.startAnim() mView.startAnim()
...@@ -57,6 +58,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -57,6 +58,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
/** /**
* 重置密码的验证码 * 重置密码的验证码
*/ */
@SuppressLint("CheckResult")
override fun sendResetCode(phone: String, countryCode: String) { override fun sendResetCode(phone: String, countryCode: String) {
mModel.sendResetCode(phone, countryCode) mModel.sendResetCode(phone, countryCode)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -80,6 +82,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -80,6 +82,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
/** /**
* 绑定手机号 * 绑定手机号
*/ */
@SuppressLint("CheckResult")
override fun bindPhone(param: BindPhoneJavaParam) { override fun bindPhone(param: BindPhoneJavaParam) {
mModel.bindPhone(param) mModel.bindPhone(param)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -116,6 +119,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base ...@@ -116,6 +119,7 @@ class VerificationCodePresenterImpl(view: IVerificationCodeContract.View) : Base
/** /**
* 检查重置密码的验证码(重置密码就是忘记密码) * 检查重置密码的验证码(重置密码就是忘记密码)
*/ */
@SuppressLint("CheckResult")
override fun checkResetCode(phone: String, countryCode: String, msgCode: String) { override fun checkResetCode(phone: String, countryCode: String, msgCode: String) {
mModel.checkResetCode(phone, countryCode, msgCode) mModel.checkResetCode(phone, countryCode, msgCode)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment