| | |
| | | private val tv_phone by lazy { find<TextView>(R.id.tv_phone) } |
| | | private val et_code by lazy { find<EditText>(R.id.et_code) } |
| | | private val viewModel: MainActivityViewModel by viewModels() |
| | | private lateinit var recaptcha: RecaptchaVisual |
| | | // private lateinit var recaptcha: RecaptchaVisual |
| | | private val countDownTimer = object : CountDownTimer(60 * 1000, 1000) { |
| | | override fun onFinish() { |
| | | tv_get_code.text = getString(R.string.重新获取) |
| | |
| | | override fun initView() { |
| | | title = getString(R.string.set_pwd) |
| | | tv_phone.text = getString(R.string.设置密码需先验证您的手机号,phone.hidePhone()) |
| | | recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL) |
| | | // recaptcha = RecaptchaVisual(supportFragmentManager, WEB_SITE_KEY, BASE_URL) |
| | | } |
| | | |
| | | private fun sendSms() { |
| | | |
| | | lifecycleScope.launch { |
| | | try { |
| | | val token = recaptcha.runCaptcha().await() |
| | | val token = "" |
| | | viewModel.onLoginButtonClicked(token) |
| | | |
| | | HttpManager.sendSms(IGoApplication.phone, "", 4,token).request( |