Commit d3d16055 by YKai

feat:去除无用导包

parent 4f7c7e1e
...@@ -10,6 +10,7 @@ import android.view.View ...@@ -10,6 +10,7 @@ import android.view.View
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.bean.StatusBarOptions import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.DeviceTool
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...@@ -40,7 +41,9 @@ import java.util.concurrent.TimeUnit ...@@ -40,7 +41,9 @@ import java.util.concurrent.TimeUnit
* @Company 壹点灵 * @Company 壹点灵
* @date 2018/11/29 * @date 2018/11/29
*/ */
class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,IVerificationCodeContract.Presenter>(), IVerificationCodeContract.View { class VerificationCodeActivity :
BaseMvpActivity<IVerificationCodeContract.View, IVerificationCodeContract.Presenter>(),
IVerificationCodeContract.View {
private var codeType = STATUS_LOGIN_BY_CODE//页面状态: 1 忘记密码界面 2验证码登录界面 private var codeType = STATUS_LOGIN_BY_CODE//页面状态: 1 忘记密码界面 2验证码登录界面
private var userPhoneNumber: String? = null private var userPhoneNumber: String? = null
...@@ -66,7 +69,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -66,7 +69,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
/** /**
* @param isBindPhone 是否是绑定手机号 * @param isBindPhone 是否是绑定手机号
*/ */
fun start(activity: Activity, phone: String, countryCode: String, type: Int, isBindPhone: Boolean) { fun start(
activity: Activity,
phone: String,
countryCode: String,
type: Int,
isBindPhone: Boolean
) {
if (TextUtils.isEmpty(phone)) { if (TextUtils.isEmpty(phone)) {
ToastUtil.toastShort("手机号不能为空") ToastUtil.toastShort("手机号不能为空")
return return
...@@ -83,7 +92,14 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -83,7 +92,14 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
* @param isBindPhone 是否是绑定手机号 * @param isBindPhone 是否是绑定手机号
* @param hasPassword 是否有密码 * @param hasPassword 是否有密码
*/ */
fun start(activity: Activity, phone: String, countryCode: String, type: Int, isBindPhone: Boolean, hasPassword: Boolean) { fun start(
activity: Activity,
phone: String,
countryCode: String,
type: Int,
isBindPhone: Boolean,
hasPassword: Boolean
) {
if (TextUtils.isEmpty(phone)) { if (TextUtils.isEmpty(phone)) {
ToastUtil.toastShort("手机号不能为空") ToastUtil.toastShort("手机号不能为空")
return return
...@@ -169,7 +185,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -169,7 +185,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
if (ActivityManager.getInstance().getSecondTaskActivity() == null) { if (ActivityManager.getInstance().getSecondTaskActivity() == null) {
closeAnim(true) closeAnim(true)
} else { } else {
if (ActivityManager.getInstance().getSecondTaskActivity() is InputPassWordActivity) { if (ActivityManager.getInstance()
.getSecondTaskActivity() is InputPassWordActivity
) {
closeAnim(false) closeAnim(false)
} else { } else {
closeAnim(true) closeAnim(true)
...@@ -197,7 +215,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -197,7 +215,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
if (ActivityManager.getInstance().getSecondTaskActivity() == null) { if (ActivityManager.getInstance().getSecondTaskActivity() == null) {
closeAnim(true) closeAnim(true)
} else { } else {
if (ActivityManager.getInstance().getSecondTaskActivity() is InputPassWordActivity) { if (ActivityManager.getInstance()
.getSecondTaskActivity() is InputPassWordActivity
) {
closeAnim(false) closeAnim(false)
} else { } else {
closeAnim(true) closeAnim(true)
...@@ -220,7 +240,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -220,7 +240,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
val msgCode = pc_1.phoneCode val msgCode = pc_1.phoneCode
if (codeType == STATUS_LOGIN_BY_CODE) {//验证码登录界面 if (codeType == STATUS_LOGIN_BY_CODE) {//验证码登录界面
if (isBindPhone) { if (isBindPhone) {
var param = BindPhoneJavaParam("", countryCode!!, userPhoneNumber!!, msgCode, UserHelper.getUserInfo()!!.uid!!) var param = BindPhoneJavaParam(
"",
countryCode!!,
userPhoneNumber!!,
msgCode,
UserHelper.getUserInfo()!!.uid!!
)
mPresenter.bindPhone(param) mPresenter.bindPhone(param)
} else { } else {
mPresenter.loginByMsgCode(userPhoneNumber!!, countryCode!!, msgCode) mPresenter.loginByMsgCode(userPhoneNumber!!, countryCode!!, msgCode)
...@@ -232,7 +258,11 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -232,7 +258,11 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
override fun baiduActionBury() { override fun baiduActionBury() {
ActionCountUtils.baiduCount(UserBIConstants.APP_REGISTER_PAGE, UserBIConstants.POSITION_CODE_REGISTER_CLICK, 25) ActionCountUtils.baiduCount(
UserBIConstants.APP_REGISTER_PAGE,
UserBIConstants.POSITION_CODE_REGISTER_CLICK,
25
)
} }
/** /**
...@@ -299,7 +329,12 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -299,7 +329,12 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
}, { }, {
tv_countdown_time.isEnabled = true tv_countdown_time.isEnabled = true
tv_countdown_time.text = "重新发送" tv_countdown_time.text = "重新发送"
tv_countdown_time.setTextColor(ContextCompat.getColor(this, R.color.platform_color_2EB0FF)) tv_countdown_time.setTextColor(
ContextCompat.getColor(
this,
R.color.platform_color_2EB0FF
)
)
}) })
} }
...@@ -307,7 +342,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -307,7 +342,13 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
* 重置密码的验证码校验成功 * 重置密码的验证码校验成功
*/ */
override fun checkResetCodeSuccess(code: String) { override fun checkResetCodeSuccess(code: String) {
InputPassWordActivity.start(this, userPhoneNumber!!, countryCode!!, InputPassWordActivity.STATUS_SET_PWD, code) InputPassWordActivity.start(
this,
userPhoneNumber!!,
countryCode!!,
InputPassWordActivity.STATUS_SET_PWD,
code
)
overridePendingTransition(0, 0) overridePendingTransition(0, 0)
} }
......
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