|
@@ -12,6 +12,7 @@ import android.view.inputmethod.EditorInfo
|
|
|
import android.widget.EditText
|
|
import android.widget.EditText
|
|
|
import android.widget.TextView
|
|
import android.widget.TextView
|
|
|
import cn.muchinfo.rma.R
|
|
import cn.muchinfo.rma.R
|
|
|
|
|
+import cn.muchinfo.rma.global.GlobalDataCollection
|
|
|
import cn.muchinfo.rma.global.data.IdentifyData
|
|
import cn.muchinfo.rma.global.data.IdentifyData
|
|
|
import cn.muchinfo.rma.lifecycle.bindOptional
|
|
import cn.muchinfo.rma.lifecycle.bindOptional
|
|
|
import cn.muchinfo.rma.netManage.base.InteractiveException
|
|
import cn.muchinfo.rma.netManage.base.InteractiveException
|
|
@@ -24,6 +25,8 @@ import cn.muchinfo.rma.view.base.app.Constant
|
|
|
import cn.muchinfo.rma.view.base.future.trade.itemView
|
|
import cn.muchinfo.rma.view.base.future.trade.itemView
|
|
|
import com.alibaba.fastjson.JSON
|
|
import com.alibaba.fastjson.JSON
|
|
|
import com.alibaba.fastjson.JSONObject
|
|
import com.alibaba.fastjson.JSONObject
|
|
|
|
|
+import com.blankj.utilcode.util.AppUtils
|
|
|
|
|
+import com.blankj.utilcode.util.LogUtils
|
|
|
import com.blankj.utilcode.util.SPUtils
|
|
import com.blankj.utilcode.util.SPUtils
|
|
|
import com.blankj.utilcode.util.ToastUtils
|
|
import com.blankj.utilcode.util.ToastUtils
|
|
|
import com.luozm.captcha.Captcha
|
|
import com.luozm.captcha.Captcha
|
|
@@ -45,6 +48,7 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
|
|
|
|
|
lateinit var captcha: Captcha
|
|
lateinit var captcha: Captcha
|
|
|
lateinit var profitEdittext: EditText
|
|
lateinit var profitEdittext: EditText
|
|
|
|
|
+ lateinit var login_account: EditText
|
|
|
lateinit var verfify: EditText
|
|
lateinit var verfify: EditText
|
|
|
lateinit var idCard: EditText
|
|
lateinit var idCard: EditText
|
|
|
lateinit var areaCodeText: TextView
|
|
lateinit var areaCodeText: TextView
|
|
@@ -60,16 +64,15 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
super.onCreate(savedInstanceState)
|
|
super.onCreate(savedInstanceState)
|
|
|
verticalLayout {
|
|
verticalLayout {
|
|
|
- viewModel.getphoneList()
|
|
|
|
|
|
|
|
|
|
loadingDialog = createLoadingDialog()
|
|
loadingDialog = createLoadingDialog()
|
|
|
loadingDialog?.bindTaskStatus(context, viewModel.loadingDialogStatus)
|
|
loadingDialog?.bindTaskStatus(context, viewModel.loadingDialogStatus)
|
|
|
val marpadding = autoSize(32)
|
|
val marpadding = autoSize(32)
|
|
|
- background = resources.getDrawable(R.color.rma_hint_title_text_color)
|
|
|
|
|
|
|
+ background = resources.getDrawable(R.color.white)
|
|
|
topBar {
|
|
topBar {
|
|
|
commonLeftButton()
|
|
commonLeftButton()
|
|
|
commonTitle {
|
|
commonTitle {
|
|
|
- text = "修改密码"
|
|
|
|
|
|
|
+ text = "重置密码"
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -81,18 +84,20 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
visibility = View.VISIBLE
|
|
visibility = View.VISIBLE
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
linearLayout {
|
|
linearLayout {
|
|
|
|
|
+ gravity = Gravity.CENTER_VERTICAL
|
|
|
background = resources.getDrawable(R.color.p_global_write_color)
|
|
background = resources.getDrawable(R.color.p_global_write_color)
|
|
|
- imageView {
|
|
|
|
|
- imageResource = R.drawable.__picker_photo_bg
|
|
|
|
|
- }.lparams(autoSize(60), autoSize(60)) {
|
|
|
|
|
|
|
+ textView {
|
|
|
|
|
+ text = "*"
|
|
|
|
|
+ textColorInt = R.color.rma_red_color
|
|
|
|
|
+ textSizeAuto = 34
|
|
|
|
|
+ }.lparams(wrapContent, wrapContent) {
|
|
|
marginStart = marpadding
|
|
marginStart = marpadding
|
|
|
- gravity = Gravity.CENTER_VERTICAL
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
textView {
|
|
textView {
|
|
|
- areaCodeText = this
|
|
|
|
|
- text = "手机号码"
|
|
|
|
|
|
|
+ text = "登陆账号"
|
|
|
textColorInt = R.color.rma_black_33
|
|
textColorInt = R.color.rma_black_33
|
|
|
textSizeAuto = 34
|
|
textSizeAuto = 34
|
|
|
}.lparams(wrapContent, wrapContent) {
|
|
}.lparams(wrapContent, wrapContent) {
|
|
@@ -100,9 +105,9 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
editText {
|
|
editText {
|
|
|
- hint = "请输入手机号码"
|
|
|
|
|
- profitEdittext = this
|
|
|
|
|
- inputType = EditorInfo.TYPE_CLASS_NUMBER
|
|
|
|
|
|
|
+ hint = "请输入登陆账号"
|
|
|
|
|
+ login_account = this
|
|
|
|
|
+ inputType = EditorInfo.TYPE_CLASS_TEXT
|
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
|
hintColorStr = "#cccccc"
|
|
hintColorStr = "#cccccc"
|
|
|
background = null
|
|
background = null
|
|
@@ -112,24 +117,32 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
marginStart = marpadding
|
|
marginStart = marpadding
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- }.lparams(matchParent, autoSize(120)) {
|
|
|
|
|
- gravity = Gravity.CENTER_VERTICAL
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }.lparams(matchParent, autoSize(120))
|
|
|
itemView()
|
|
itemView()
|
|
|
|
|
|
|
|
linearLayout {
|
|
linearLayout {
|
|
|
|
|
+ gravity = Gravity.CENTER_VERTICAL
|
|
|
background = resources.getDrawable(R.color.p_global_write_color)
|
|
background = resources.getDrawable(R.color.p_global_write_color)
|
|
|
- imageView {
|
|
|
|
|
- imageResource = R.drawable.ic_hn_message
|
|
|
|
|
- }.lparams(autoSize(60), autoSize(60)) {
|
|
|
|
|
|
|
+ textView {
|
|
|
|
|
+ text = "*"
|
|
|
|
|
+ textColorInt = R.color.rma_red_color
|
|
|
|
|
+ textSizeAuto = 34
|
|
|
|
|
+ }.lparams(wrapContent, wrapContent) {
|
|
|
|
|
+ marginStart = marpadding
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ textView {
|
|
|
|
|
+ areaCodeText = this
|
|
|
|
|
+ text = "手机号码"
|
|
|
|
|
+ textColorInt = R.color.rma_black_33
|
|
|
|
|
+ textSizeAuto = 34
|
|
|
|
|
+ }.lparams(wrapContent, wrapContent) {
|
|
|
marginStart = marpadding
|
|
marginStart = marpadding
|
|
|
- gravity = Gravity.CENTER_VERTICAL
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
editText {
|
|
editText {
|
|
|
- verfify = this
|
|
|
|
|
- hint = "请输入短信验证码"
|
|
|
|
|
|
|
+ hint = "请输入手机号码"
|
|
|
|
|
+ profitEdittext = this
|
|
|
inputType = EditorInfo.TYPE_CLASS_NUMBER
|
|
inputType = EditorInfo.TYPE_CLASS_NUMBER
|
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
|
hintColorStr = "#cccccc"
|
|
hintColorStr = "#cccccc"
|
|
@@ -152,6 +165,45 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
}.lparams(wrapContent, wrapContent) {
|
|
}.lparams(wrapContent, wrapContent) {
|
|
|
marginEnd = marpadding
|
|
marginEnd = marpadding
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ }.lparams(matchParent, autoSize(120))
|
|
|
|
|
+
|
|
|
|
|
+ itemView()
|
|
|
|
|
+
|
|
|
|
|
+ linearLayout {
|
|
|
|
|
+ gravity = Gravity.CENTER_VERTICAL
|
|
|
|
|
+ background = resources.getDrawable(R.color.p_global_write_color)
|
|
|
|
|
+ textView {
|
|
|
|
|
+ text = "*"
|
|
|
|
|
+ textColorInt = R.color.rma_red_color
|
|
|
|
|
+ textSizeAuto = 34
|
|
|
|
|
+ }.lparams(wrapContent, wrapContent) {
|
|
|
|
|
+ marginStart = marpadding
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ textView {
|
|
|
|
|
+ text = "短信验证码"
|
|
|
|
|
+ textColorInt = R.color.rma_black_33
|
|
|
|
|
+ textSizeAuto = 34
|
|
|
|
|
+ }.lparams(wrapContent, wrapContent) {
|
|
|
|
|
+ marginStart = marpadding
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ editText {
|
|
|
|
|
+ verfify = this
|
|
|
|
|
+ hint = "请输入短信验证码"
|
|
|
|
|
+ inputType = EditorInfo.TYPE_CLASS_NUMBER
|
|
|
|
|
+ gravity = Gravity.CENTER_VERTICAL
|
|
|
|
|
+ hintColorStr = "#cccccc"
|
|
|
|
|
+ background = null
|
|
|
|
|
+ textColorInt = R.color.rma_black_33
|
|
|
|
|
+ textSizeAuto = 34
|
|
|
|
|
+ }.lparams(0, matchParent, 1f) {
|
|
|
|
|
+ marginStart = marpadding
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}.lparams(matchParent, autoSize(120)) {
|
|
}.lparams(matchParent, autoSize(120)) {
|
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
gravity = Gravity.CENTER_VERTICAL
|
|
|
}
|
|
}
|
|
@@ -244,19 +296,23 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
|
|
|
|
|
viewModel.successVerfify.bindOptional(context) {
|
|
viewModel.successVerfify.bindOptional(context) {
|
|
|
if (it == true) {
|
|
if (it == true) {
|
|
|
- if (areaCodeText.getText().toString().trim { it <= ' ' } == "+86") {
|
|
|
|
|
- if (!NumberUtils.isTelePhoneNoLong(profitEdittext.getText().toString())) { //是否是手机号
|
|
|
|
|
- ToastUtils.showLong("请输入正确的手机号码")
|
|
|
|
|
- return@bindOptional
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (!NumberUtils.isTelePhoneNoLong(
|
|
|
|
|
+ profitEdittext.getText().toString()
|
|
|
|
|
+ )
|
|
|
|
|
+ ) { //是否是手机号
|
|
|
|
|
+ ToastUtils.showLong("请输入正确的手机号码")
|
|
|
|
|
+ return@bindOptional
|
|
|
}
|
|
}
|
|
|
- sendVerfifyCode(phone = profitEdittext.text.toString(), areaCode = areaCodeText.text.toString())
|
|
|
|
|
|
|
+ sendVerfifyCode(
|
|
|
|
|
+ phone = profitEdittext.text.toString(),
|
|
|
|
|
+ areaCode = areaCodeText.text.toString()
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
viewModel.getVcode.bindOptional(context) {
|
|
viewModel.getVcode.bindOptional(context) {
|
|
|
if (it == true) {
|
|
if (it == true) {
|
|
|
- val utils = IdentifyTextUtils(mail_btn,context) //初始化计时器
|
|
|
|
|
|
|
+ val utils = IdentifyTextUtils(mail_btn, context) //初始化计时器
|
|
|
utils.startTimer()
|
|
utils.startTimer()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -267,6 +323,11 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
onThrottleFirstClick {
|
|
onThrottleFirstClick {
|
|
|
if (viewModel.backgroundVerfifySuccess.value == false) {
|
|
if (viewModel.backgroundVerfifySuccess.value == false) {
|
|
|
|
|
|
|
|
|
|
+ if (login_account.text.toString().isNullOrEmpty()){
|
|
|
|
|
+ ToastUtils.showLong("请输入登陆账号")
|
|
|
|
|
+ return@onThrottleFirstClick
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (profitEdittext.text.toString().isEmpty()) {
|
|
if (profitEdittext.text.toString().isEmpty()) {
|
|
|
ToastUtils.showLong("请输入手机号")
|
|
ToastUtils.showLong("请输入手机号")
|
|
|
return@onThrottleFirstClick
|
|
return@onThrottleFirstClick
|
|
@@ -277,6 +338,7 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
return@onThrottleFirstClick
|
|
return@onThrottleFirstClick
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
// if (verfify.text.toString() != viewModule.backgroundVcode.value){
|
|
// if (verfify.text.toString() != viewModule.backgroundVcode.value){
|
|
|
// ToastUtils.showLong(R.string.please_input_right_vcode)
|
|
// ToastUtils.showLong(R.string.please_input_right_vcode)
|
|
|
// return@onThrottleFirstClick
|
|
// return@onThrottleFirstClick
|
|
@@ -287,7 +349,9 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
// return@onThrottleFirstClick
|
|
// return@onThrottleFirstClick
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
- viewModel.verfifyIdCardNum(activity = context, phone = profitEdittext.text.toString(), areaCode = areaCodeText.text.toString(), vcode = verfify.text.toString())
|
|
|
|
|
|
|
+ viewModel.loginidQuery(
|
|
|
|
|
+ account = login_account.text.toString()
|
|
|
|
|
+ )
|
|
|
} else {
|
|
} else {
|
|
|
// TODO 重置密码
|
|
// TODO 重置密码
|
|
|
|
|
|
|
@@ -301,7 +365,7 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
return@onThrottleFirstClick
|
|
return@onThrottleFirstClick
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (newPassword.text.toString().length < 6 || newPassword.text.toString().length > 20){
|
|
|
|
|
|
|
+ if (newPassword.text.toString().length < 6 || newPassword.text.toString().length > 20) {
|
|
|
ToastUtils.showLong("请输入6-20位的新密码")
|
|
ToastUtils.showLong("请输入6-20位的新密码")
|
|
|
return@onThrottleFirstClick
|
|
return@onThrottleFirstClick
|
|
|
}
|
|
}
|
|
@@ -311,8 +375,12 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
return@onThrottleFirstClick
|
|
return@onThrottleFirstClick
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- viewModel.resetPassword(idcardNum = idCard.text.toString(), phone = profitEdittext.text.toString(), areaCode = areaCodeText.text.toString(), vcode = verfify.text.toString(),
|
|
|
|
|
- newPassword = newPassword.text.toString(), activity = context)
|
|
|
|
|
|
|
+ viewModel.resetPassword(
|
|
|
|
|
+ phone = profitEdittext.text.toString(),
|
|
|
|
|
+ vcode = verfify.text.toString(),
|
|
|
|
|
+ newPassword = newPassword.text.toString(),
|
|
|
|
|
+ logincode = login_account.text.toString()
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
viewModel.backgroundVerfifySuccess.bindOptional(context) {
|
|
viewModel.backgroundVerfifySuccess.bindOptional(context) {
|
|
@@ -332,6 +400,7 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
addAction(resources.getString(R.string.__picker_yes)) { dialog1, _ ->
|
|
addAction(resources.getString(R.string.__picker_yes)) { dialog1, _ ->
|
|
|
dialog1.dismiss()
|
|
dialog1.dismiss()
|
|
|
finish()
|
|
finish()
|
|
|
|
|
+ AppUtils.relaunchApp()
|
|
|
}
|
|
}
|
|
|
}.show()
|
|
}.show()
|
|
|
}
|
|
}
|
|
@@ -347,7 +416,7 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
|
|
|
|
|
textSizeAuto = 34
|
|
textSizeAuto = 34
|
|
|
textColorInt = R.color.white
|
|
textColorInt = R.color.white
|
|
|
- }.lparams(matchParent, autoSize(100)){
|
|
|
|
|
|
|
+ }.lparams(matchParent, autoSize(100)) {
|
|
|
marginStart = autoSize(32)
|
|
marginStart = autoSize(32)
|
|
|
marginEnd = autoSize(32)
|
|
marginEnd = autoSize(32)
|
|
|
bottomMargin = autoSize(60)
|
|
bottomMargin = autoSize(60)
|
|
@@ -361,36 +430,37 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
json["mobile"] = DesTools.myServiceAddPass(phone)
|
|
json["mobile"] = DesTools.myServiceAddPass(phone)
|
|
|
//请求验证码
|
|
//请求验证码
|
|
|
OkHttpUtils.postString()
|
|
OkHttpUtils.postString()
|
|
|
- .url(SPUtils.getInstance().getString(Constant.MANAGE_URL_KEY) + "/user/smsvcode")
|
|
|
|
|
- .content(json.toJSONString())
|
|
|
|
|
- .mediaType(MediaType.parse("application/json; charset=utf-8"))
|
|
|
|
|
- // .addParams("mobile",DesTools.myServiceAddPass(area_code.getText().toString().trim() + phone_text.getText().toString().trim()))
|
|
|
|
|
- .build()
|
|
|
|
|
- .execute(object : StringCallback() {
|
|
|
|
|
- override fun onError(call: Call, e: Exception, id: Int) {
|
|
|
|
|
- viewModel.loadingDialogStatus.value = TaskUiModel.failed(Throwable(message = "手机验证码请求失败"))
|
|
|
|
|
|
|
+ .url(SPUtils.getInstance().getString(Constant.commSearchUrl) + "/user/smsvcode")
|
|
|
|
|
+ .content(json.toJSONString())
|
|
|
|
|
+ .mediaType(MediaType.parse("application/json; charset=utf-8"))
|
|
|
|
|
+ // .addParams("mobile",DesTools.myServiceAddPass(area_code.getText().toString().trim() + phone_text.getText().toString().trim()))
|
|
|
|
|
+ .build()
|
|
|
|
|
+ .execute(object : StringCallback() {
|
|
|
|
|
+ override fun onError(call: Call, e: Exception, id: Int) {
|
|
|
|
|
+ viewModel.loadingDialogStatus.value =
|
|
|
|
|
+ TaskUiModel.failed(Throwable(message = "手机验证码请求失败"))
|
|
|
// Toast.makeText(this@ResetPasswordActivity, resources.getString(R.string.identify_request_error), Toast.LENGTH_LONG).show()
|
|
// Toast.makeText(this@ResetPasswordActivity, resources.getString(R.string.identify_request_error), Toast.LENGTH_LONG).show()
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- override fun onResponse(response: String, id: Int) {
|
|
|
|
|
-
|
|
|
|
|
- //这里也要加个判断
|
|
|
|
|
- val identifyData = JSON.parseObject(response, IdentifyData::class.java)
|
|
|
|
|
- if (identifyData != null) {
|
|
|
|
|
- if (identifyData.success == "true") {
|
|
|
|
|
- viewModel.loadingDialogStatus.value = TaskUiModel.success()
|
|
|
|
|
- viewModel.backgroundVcode.value = identifyData.vcode
|
|
|
|
|
- viewModel.getVcode.value = true
|
|
|
|
|
- ToastUtils.showLong("验证码发送成功")
|
|
|
|
|
- } else {
|
|
|
|
|
- viewModel.loadingDialogStatus.value = TaskUiModel.failed(
|
|
|
|
|
- InteractiveException("手机验证码请求失败")
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ override fun onResponse(response: String, id: Int) {
|
|
|
|
|
+ LogUtils.eTag("手机验证码",response)
|
|
|
|
|
+ //这里也要加个判断
|
|
|
|
|
+ val identifyData = JSON.parseObject(response, IdentifyData::class.java)
|
|
|
|
|
+ if (identifyData != null) {
|
|
|
|
|
+ if (identifyData.success == "true") {
|
|
|
|
|
+ viewModel.loadingDialogStatus.value = TaskUiModel.success()
|
|
|
|
|
+ viewModel.backgroundVcode.value = identifyData.vcode
|
|
|
|
|
+ viewModel.getVcode.value = true
|
|
|
|
|
+ ToastUtils.showLong("验证码发送成功")
|
|
|
|
|
+ } else {
|
|
|
|
|
+ viewModel.loadingDialogStatus.value = TaskUiModel.failed(
|
|
|
|
|
+ InteractiveException("手机验证码请求失败")
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -430,7 +500,7 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
override fun onAccess(time: Long): String {
|
|
override fun onAccess(time: Long): String {
|
|
|
createWarningDialog {
|
|
createWarningDialog {
|
|
|
setTitle(resources.getString(R.string.hint))
|
|
setTitle(resources.getString(R.string.hint))
|
|
|
- setMessage("验证用时" + NumberUtils.roundNum(time / 1000.0,1) + "s")
|
|
|
|
|
|
|
+ setMessage("验证用时" + NumberUtils.roundNum(time / 1000.0, 1) + "s")
|
|
|
addAction(resources.getString(R.string.__picker_yes)) { dialog1, _ ->
|
|
addAction(resources.getString(R.string.__picker_yes)) { dialog1, _ ->
|
|
|
viewModel.successVerfify.value = true
|
|
viewModel.successVerfify.value = true
|
|
|
dialog.dismiss()
|
|
dialog.dismiss()
|
|
@@ -445,10 +515,10 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
- viewModel.verfifyImage.bindOptional(context){
|
|
|
|
|
- if (it ?: 0 < 50){
|
|
|
|
|
|
|
+ viewModel.verfifyImage.bindOptional(context) {
|
|
|
|
|
+ if (it ?: 0 < 50) {
|
|
|
setBitmap(R.mipmap.verfify_image_one)
|
|
setBitmap(R.mipmap.verfify_image_one)
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
setBitmap(R.mipmap.verfify_image_two)
|
|
setBitmap(R.mipmap.verfify_image_two)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|