[8.5.0]
[singapore] [抽取独立登录、f2a登录流程]
This commit is contained in:
@@ -26,7 +26,6 @@ import com.mogo.och.biz.login.callback.ITaxiLoginCallback
|
|||||||
import com.mogo.och.biz.login.net.OchCommonServiceManager
|
import com.mogo.och.biz.login.net.OchCommonServiceManager
|
||||||
import com.mogo.och.bridge.autopilot.location.OchLocationManager
|
import com.mogo.och.bridge.autopilot.location.OchLocationManager
|
||||||
import com.mogo.och.biz.login.bean.LoginInfo
|
import com.mogo.och.biz.login.bean.LoginInfo
|
||||||
import com.mogo.och.biz.login.ui.login.LoginViewModel
|
|
||||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||||
import com.mogo.och.common.module.manager.cache.ISpCallback
|
import com.mogo.och.common.module.manager.cache.ISpCallback
|
||||||
import com.mogo.och.common.module.manager.cache.OchSPManager
|
import com.mogo.och.common.module.manager.cache.OchSPManager
|
||||||
@@ -111,7 +110,7 @@ object LoginModel {
|
|||||||
override fun onSuccess(data: BaseData?) {
|
override fun onSuccess(data: BaseData?) {
|
||||||
if (null != data && 0 == data.code) {
|
if (null != data && 0 == data.code) {
|
||||||
// 获取验证码成功
|
// 获取验证码成功
|
||||||
ToastCharterUtils.showToastShort(mContext?.getString(R.string.module_och_taxi_login_get_code_success))
|
ToastCharterUtils.showToastShort(mContext?.getString(R.string.biz_login_get_code_success))
|
||||||
iTaxiLoginCallback?.getPhoneCodeSuccess()
|
iTaxiLoginCallback?.getPhoneCodeSuccess()
|
||||||
} else {
|
} else {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
@@ -122,9 +121,9 @@ object LoginModel {
|
|||||||
|
|
||||||
override fun onError() {
|
override fun onError() {
|
||||||
if (!NetworkUtils.isConnected(mContext)) {
|
if (!NetworkUtils.isConnected(mContext)) {
|
||||||
ToastCharterUtils.showToastShort(mContext?.getString(R.string.network_error_tip))
|
ToastCharterUtils.showToastShort(mContext?.getString(R.string.biz_login_network_error_tip))
|
||||||
} else {
|
} else {
|
||||||
ToastCharterUtils.showToastShort(mContext?.getString(R.string.request_error_tip))
|
ToastCharterUtils.showToastShort(mContext?.getString(R.string.biz_login_request_error_tip))
|
||||||
}
|
}
|
||||||
iTaxiLoginCallback?.netErrorCallback()
|
iTaxiLoginCallback?.netErrorCallback()
|
||||||
}
|
}
|
||||||
@@ -150,7 +149,7 @@ object LoginModel {
|
|||||||
if (isAutoLoginMode){
|
if (isAutoLoginMode){
|
||||||
iTaxiLoginCallback?.stopAutoLogin()
|
iTaxiLoginCallback?.stopAutoLogin()
|
||||||
}else{
|
}else{
|
||||||
ToastCharterUtils.showToastShort(mContext?.getString(R.string.module_och_taxi_login_login_success))
|
ToastCharterUtils.showToastShort(mContext?.getString(R.string.biz_login_login_success))
|
||||||
}
|
}
|
||||||
// 登录成功需要新的值
|
// 登录成功需要新的值
|
||||||
queryCarStatus(false)
|
queryCarStatus(false)
|
||||||
@@ -163,12 +162,12 @@ object LoginModel {
|
|||||||
|
|
||||||
override fun onError() {
|
override fun onError() {
|
||||||
if (!NetworkUtils.isConnected(mContext)) {
|
if (!NetworkUtils.isConnected(mContext)) {
|
||||||
ToastCharterUtils.showToastShort(mContext?.getString(R.string.network_error_tip))
|
ToastCharterUtils.showToastShort(mContext?.getString(R.string.biz_login_network_error_tip))
|
||||||
} else {
|
} else {
|
||||||
if (isAutoLoginMode){
|
if (isAutoLoginMode){
|
||||||
ToastCharterUtils.showToastShort(mContext?.getString(R.string.request_error_tip_unmanned))
|
ToastCharterUtils.showToastShort(mContext?.getString(R.string.biz_login_request_error_tip_unmanned))
|
||||||
}else{
|
}else{
|
||||||
ToastCharterUtils.showToastShort(mContext?.getString(R.string.request_error_tip))
|
ToastCharterUtils.showToastShort(mContext?.getString(R.string.biz_login_request_error_tip))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -216,9 +215,9 @@ object LoginModel {
|
|||||||
MogoAnalyticUtils.track("QueryCarStatus", map)
|
MogoAnalyticUtils.track("QueryCarStatus", map)
|
||||||
|
|
||||||
if (!NetworkUtils.isConnected(mContext)) {
|
if (!NetworkUtils.isConnected(mContext)) {
|
||||||
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.network_error_tip))
|
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.biz_login_network_error_tip))
|
||||||
} else {
|
} else {
|
||||||
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.request_error_tip))
|
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.biz_login_request_error_tip))
|
||||||
}
|
}
|
||||||
// LoginStatusManager.setLoginError(-10012, "网络错误")
|
// LoginStatusManager.setLoginError(-10012, "网络错误")
|
||||||
LoginStatusManager.setLoginError(-10012, StringUtils.getString(R.string.module_och_network_mistake))
|
LoginStatusManager.setLoginError(-10012, StringUtils.getString(R.string.module_och_network_mistake))
|
||||||
@@ -272,9 +271,9 @@ object LoginModel {
|
|||||||
|
|
||||||
override fun onError() {
|
override fun onError() {
|
||||||
if (!NetworkUtils.isConnected(mContext)) {
|
if (!NetworkUtils.isConnected(mContext)) {
|
||||||
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.network_error_tip))
|
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.biz_login_network_error_tip))
|
||||||
} else {
|
} else {
|
||||||
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.request_error_tip))
|
ToastCharterUtils.showToastShort(mContext!!.getString(R.string.biz_login_request_error_tip))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,12 +47,12 @@ class ErrorInfoViewModel : ViewModel() {
|
|||||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "倒计时onError:${it}")
|
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "倒计时onError:${it}")
|
||||||
it.printStackTrace()
|
it.printStackTrace()
|
||||||
RxUtils.createSubscribe(1_000) {
|
RxUtils.createSubscribe(1_000) {
|
||||||
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.biz_login_get_code),true)
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "倒计时onComplete")
|
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "倒计时onComplete")
|
||||||
RxUtils.createSubscribe(1_000) {
|
RxUtils.createSubscribe(1_000) {
|
||||||
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.biz_login_get_code),true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class LoginView : ConstraintLayout, LoginViewModel.IErrorInfoViewCallback {
|
|||||||
|
|
||||||
override fun inputPhoneError() {
|
override fun inputPhoneError() {
|
||||||
biz_ace_login_phone_value.text?.clear()
|
biz_ace_login_phone_value.text?.clear()
|
||||||
biz_ace_login_phone_value.setHint(R.string.module_och_taxi_login_phone_error)
|
biz_ace_login_phone_value.setHint(R.string.biz_login_phone_error)
|
||||||
context?.let {
|
context?.let {
|
||||||
biz_ace_login_phone_value.setHintTextColor(
|
biz_ace_login_phone_value.setHintTextColor(
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
@@ -162,7 +162,7 @@ class LoginView : ConstraintLayout, LoginViewModel.IErrorInfoViewCallback {
|
|||||||
|
|
||||||
override fun setCountDownText(text: String, enable: Boolean) {
|
override fun setCountDownText(text: String, enable: Boolean) {
|
||||||
if (enable) {
|
if (enable) {
|
||||||
biz_actv_login_get_code.setText(R.string.module_och_taxi_login_get_code)
|
biz_actv_login_get_code.setText(R.string.biz_login_get_code)
|
||||||
biz_actv_login_get_code.isEnabled = true
|
biz_actv_login_get_code.isEnabled = true
|
||||||
} else {
|
} else {
|
||||||
biz_actv_login_get_code.text = text
|
biz_actv_login_get_code.text = text
|
||||||
|
|||||||
@@ -57,12 +57,12 @@ class LoginViewModel : ViewModel(), ITaxiLoginCallback, ILoginCallback {
|
|||||||
initListeners()
|
initListeners()
|
||||||
}
|
}
|
||||||
if (!RegexUtils.isMobileExact(phone)) {
|
if (!RegexUtils.isMobileExact(phone)) {
|
||||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_phone_error)
|
ToastCharterUtils.showToastShort(R.string.biz_login_phone_error)
|
||||||
viewCallback?.inputPhoneError()
|
viewCallback?.inputPhoneError()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(code.isBlank()||code.length<4){
|
if(code.isBlank()||code.length<4){
|
||||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_code_error)
|
ToastCharterUtils.showToastShort(R.string.biz_login_code_error)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(phone== LoginConst.OFFLINEPHONE&&code== LoginConst.OFFLINECODE){
|
if(phone== LoginConst.OFFLINEPHONE&&code== LoginConst.OFFLINECODE){
|
||||||
@@ -80,7 +80,7 @@ class LoginViewModel : ViewModel(), ITaxiLoginCallback, ILoginCallback {
|
|||||||
initListeners()
|
initListeners()
|
||||||
}
|
}
|
||||||
if (!RegexUtils.isMobileExact(phone)) {
|
if (!RegexUtils.isMobileExact(phone)) {
|
||||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_phone_error)
|
ToastCharterUtils.showToastShort(R.string.biz_login_phone_error)
|
||||||
viewCallback?.inputPhoneError()
|
viewCallback?.inputPhoneError()
|
||||||
OchChainLogManager.writeChainLog("登录页面","获取验证码 手机号输入错误")
|
OchChainLogManager.writeChainLog("登录页面","获取验证码 手机号输入错误")
|
||||||
return
|
return
|
||||||
@@ -101,10 +101,10 @@ class LoginViewModel : ViewModel(), ITaxiLoginCallback, ILoginCallback {
|
|||||||
}, {
|
}, {
|
||||||
CallerLogger.d(TAG, "倒计时onError:${it}")
|
CallerLogger.d(TAG, "倒计时onError:${it}")
|
||||||
it.printStackTrace()
|
it.printStackTrace()
|
||||||
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.biz_login_get_code),true)
|
||||||
}, {
|
}, {
|
||||||
CallerLogger.d(TAG, "倒计时onComplete")
|
CallerLogger.d(TAG, "倒计时onComplete")
|
||||||
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.biz_login_get_code),true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
package com.mogo.och.biz.login.ui.loginf2a
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.SystemClock
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.widget.addTextChangedListener
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||||
|
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||||
|
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||||
|
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||||
|
import com.mogo.och.biz.R
|
||||||
|
import com.mogo.och.biz.login.ui.LoginFragment
|
||||||
|
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||||
|
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_acbtn_login
|
||||||
|
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_acet_phone_code_value
|
||||||
|
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_ace_login_phone_value
|
||||||
|
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_actv_login_get_code
|
||||||
|
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_actv_welcome_login_title
|
||||||
|
|
||||||
|
|
||||||
|
class LoginF2aView : ConstraintLayout, LoginF2aViewModel.IErrorInfoViewCallback {
|
||||||
|
|
||||||
|
private val TAG = "LoginF2aView"
|
||||||
|
|
||||||
|
constructor(context: Context) : super(context)
|
||||||
|
|
||||||
|
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||||
|
|
||||||
|
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(
|
||||||
|
context,
|
||||||
|
attributeSet,
|
||||||
|
defStyleAttr
|
||||||
|
)
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
context: Context,
|
||||||
|
attributeSet: AttributeSet,
|
||||||
|
defStyleAttr: Int,
|
||||||
|
defStyleRes: Int
|
||||||
|
) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||||
|
|
||||||
|
private var viewModel: LoginF2aViewModel? = null
|
||||||
|
|
||||||
|
private fun initView() {
|
||||||
|
LayoutInflater.from(context).inflate(R.layout.biz_login_view_f2a, this, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initListener(){
|
||||||
|
biz_acbtn_login.onClick {
|
||||||
|
val phone = biz_ace_login_phone_value.text.toString()
|
||||||
|
val code = biz_acet_phone_code_value.text.toString()
|
||||||
|
viewModel?.gotoLogin(phone, code)
|
||||||
|
}
|
||||||
|
biz_actv_welcome_login_title.setOnClickListener {
|
||||||
|
continuousClick()
|
||||||
|
}
|
||||||
|
biz_actv_login_get_code.setOnClickListener {
|
||||||
|
OchChainLogManager.writeChainLog("登录页面","点击获取验证码")
|
||||||
|
if(viewModel==null){
|
||||||
|
OchChainLogManager.writeChainLog("司机登录页面","mPresenter=${viewModel}")
|
||||||
|
}else{
|
||||||
|
viewModel?.getPhoneCode(biz_ace_login_phone_value.text.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
biz_ace_login_phone_value.addTextChangedListener {
|
||||||
|
it?.let { itEditable ->
|
||||||
|
if (itEditable.isNotEmpty()) {
|
||||||
|
inputPhoneNormal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val COUNTS = 4 // 点击次数
|
||||||
|
private const val DURATION: Long = 1000 // 规定有效时间
|
||||||
|
val TAG = LoginFragment::class.java.simpleName
|
||||||
|
}
|
||||||
|
|
||||||
|
private var mHits = LongArray(COUNTS)
|
||||||
|
|
||||||
|
private fun continuousClick() {
|
||||||
|
//每次点击时,数组向前移动一位
|
||||||
|
System.arraycopy(mHits, 1, mHits, 0, mHits.size - 1)
|
||||||
|
//为数组最后一位赋值
|
||||||
|
mHits[mHits.size - 1] = SystemClock.uptimeMillis()
|
||||||
|
if (mHits[0] >= (SystemClock.uptimeMillis() - DURATION)) {
|
||||||
|
mHits = LongArray(COUNTS) //重新初始化数组
|
||||||
|
viewModel?.gotoLogin("13288888888", "8888")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun inputPhoneNormal() {
|
||||||
|
context?.let {
|
||||||
|
biz_ace_login_phone_value.setHintTextColor(
|
||||||
|
ContextCompat.getColor(
|
||||||
|
it,
|
||||||
|
R.color.taxi_878890
|
||||||
|
)
|
||||||
|
)
|
||||||
|
biz_ace_login_phone_value.setBackgroundResource(R.drawable.biz_login_phone_normal)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun gotoLogin4Fragment(phone: String, code: String){
|
||||||
|
viewModel?.gotoLogin(phone, code)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onAttachedToWindow() {
|
||||||
|
super.onAttachedToWindow()
|
||||||
|
|
||||||
|
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||||
|
ViewModelProvider(it).get(LoginF2aViewModel::class.java)
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel?.setDistanceCallback(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||||
|
super.onVisibilityAggregated(isVisible)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getBottomInfo(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
try {
|
||||||
|
initView()
|
||||||
|
initListener()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun inputPhoneError() {
|
||||||
|
biz_ace_login_phone_value.text?.clear()
|
||||||
|
biz_ace_login_phone_value.setHint(R.string.biz_login_phone_error)
|
||||||
|
context?.let {
|
||||||
|
biz_ace_login_phone_value.setHintTextColor(
|
||||||
|
ContextCompat.getColor(
|
||||||
|
it,
|
||||||
|
R.color.taxi_EF262C
|
||||||
|
)
|
||||||
|
)
|
||||||
|
biz_ace_login_phone_value.setBackgroundResource(R.drawable.biz_login_phone_error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun closeSoftInput() {
|
||||||
|
requestFocus()
|
||||||
|
KeyboardUtils.hideSoftInput(ActivityUtils.getTopActivity())
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setCountDownText(text: String, enable: Boolean) {
|
||||||
|
if (enable) {
|
||||||
|
biz_actv_login_get_code.setText(R.string.biz_login_get_code)
|
||||||
|
biz_actv_login_get_code.isEnabled = true
|
||||||
|
} else {
|
||||||
|
biz_actv_login_get_code.text = text
|
||||||
|
biz_actv_login_get_code.isEnabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
package com.mogo.och.biz.login.ui.loginf2a
|
||||||
|
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
import com.mogo.commons.AbsMogoApplication
|
||||||
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||||
|
import com.mogo.eagle.core.utilcode.util.RegexUtils
|
||||||
|
import com.mogo.och.biz.R
|
||||||
|
import com.mogo.och.biz.login.LoginConst
|
||||||
|
import com.mogo.och.biz.login.callback.ITaxiLoginCallback
|
||||||
|
import com.mogo.och.biz.login.model.LoginModel
|
||||||
|
import com.mogo.och.biz.login.ui.debugview.BusinessViewModel
|
||||||
|
import com.mogo.och.common.module.biz.login.ILoginCallback
|
||||||
|
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||||
|
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||||
|
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
|
||||||
|
import io.reactivex.Observable
|
||||||
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.disposables.Disposable
|
||||||
|
import io.reactivex.schedulers.Schedulers
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
class LoginF2aViewModel : ViewModel(), ITaxiLoginCallback, ILoginCallback {
|
||||||
|
|
||||||
|
private val TAG = BusinessViewModel::class.java.simpleName
|
||||||
|
|
||||||
|
private var viewCallback: IErrorInfoViewCallback? = null
|
||||||
|
|
||||||
|
private var countDownDisposable: Disposable? = null
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setDistanceCallback(viewCallback: IErrorInfoViewCallback) {
|
||||||
|
this.viewCallback = viewCallback
|
||||||
|
initListeners()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCleared() {
|
||||||
|
super.onCleared()
|
||||||
|
this.viewCallback = null
|
||||||
|
countDownDisposable?.let {
|
||||||
|
if (!it.isDisposed) {
|
||||||
|
it.dispose()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initListeners() {
|
||||||
|
LoginModel.setiTaxiLoginCallback(this)
|
||||||
|
LoginStatusManager.addListener(TAG,this)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun gotoLogin(phone: String, code: String) {
|
||||||
|
if(!LoginModel.hasInit()){
|
||||||
|
initListeners()
|
||||||
|
}
|
||||||
|
if (!RegexUtils.isMobileExact(phone)) {
|
||||||
|
ToastCharterUtils.showToastShort(R.string.biz_login_phone_error)
|
||||||
|
viewCallback?.inputPhoneError()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(code.isBlank()||code.length<4){
|
||||||
|
ToastCharterUtils.showToastShort(R.string.biz_login_code_error)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(phone== LoginConst.OFFLINEPHONE&&code== LoginConst.OFFLINECODE){
|
||||||
|
gotoOfflineMode()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
LoginModel.gotoLogin(phone, code, false)
|
||||||
|
viewCallback?.closeSoftInput()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getPhoneCode(phone: String) {
|
||||||
|
OchChainLogManager.writeChainLog("登录页面","获取验证码${phone}")
|
||||||
|
if(!LoginModel.hasInit()){
|
||||||
|
OchChainLogManager.writeChainLog("登录页面","LoginModel没有初始化去初始化")
|
||||||
|
initListeners()
|
||||||
|
}
|
||||||
|
if (!RegexUtils.isMobileExact(phone)) {
|
||||||
|
ToastCharterUtils.showToastShort(R.string.biz_login_phone_error)
|
||||||
|
viewCallback?.inputPhoneError()
|
||||||
|
OchChainLogManager.writeChainLog("登录页面","获取验证码 手机号输入错误")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
LoginModel.getPhoneCode(phone)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getPhoneCodeSuccess() {
|
||||||
|
super.getPhoneCodeSuccess()
|
||||||
|
val countDownSeconds = 60L;
|
||||||
|
countDownDisposable = Observable.intervalRange(0, countDownSeconds, 0, 1, TimeUnit.SECONDS)
|
||||||
|
.map { aLong -> countDownSeconds - aLong }
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe({
|
||||||
|
viewCallback?.setCountDownText("${it}s",false)
|
||||||
|
CallerLogger.d(TAG, "倒计时:$it")
|
||||||
|
}, {
|
||||||
|
CallerLogger.d(TAG, "倒计时onError:${it}")
|
||||||
|
it.printStackTrace()
|
||||||
|
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.biz_login_get_code),true)
|
||||||
|
}, {
|
||||||
|
CallerLogger.d(TAG, "倒计时onComplete")
|
||||||
|
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.biz_login_get_code),true)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun gotoOfflineMode() {
|
||||||
|
LoginModel.gotoOfflineMode()
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IErrorInfoViewCallback {
|
||||||
|
fun inputPhoneError()
|
||||||
|
fun closeSoftInput()
|
||||||
|
fun setCountDownText(text: String, enable: Boolean)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
458
OCH/common/biz/src/main/res/layout/biz_login_view_f2a.xml
Normal file
458
OCH/common/biz/src/main/res/layout/biz_login_view_f2a.xml
Normal file
@@ -0,0 +1,458 @@
|
|||||||
|
<?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:id="@+id/biz_cl_driver_main"
|
||||||
|
android:layout_width="1042dp"
|
||||||
|
android:layout_height="1169dp"
|
||||||
|
android:background="@drawable/biz_login_pop_bg">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_h_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_begin="@dimen/dp_22" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_v_left"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_begin="@dimen/dp_42" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_v_right"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_end="@dimen/dp_42" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_h_bottom"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_end="@dimen/dp_63" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/group_password_login"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:constraint_referenced_ids="biz_actv_welcome_login_title,actv_login_phone_title,biz_ace_login_phone_value,actv_phone_code_title,v_phone_code_bg,biz_acet_phone_code_value,biz_acbtn_login"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/group_reset_password"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:constraint_referenced_ids="biz_actv_reset_password_title,actv_reset_password_title,biz_reset_password_first_value,actv_secode_password_title,biz_reset_password_secode_value,biz_acbtn_reset_passwrod"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/group_bind_sec_code"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:constraint_referenced_ids="actv_f2a_title,aciv_get_f2a_code,v_f2a_code_bg,acet_f2a_code,actv_find_code,biz_acbtn_f2a_login_first"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/group_f2a_login"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:constraint_referenced_ids="biz_actv_f2a_login_title_big,biz_actv_f2a_login_title,biz_actv_f2a_login_title_samll,acet_input_number_1,acet_input_number_2,acet_input_number_3,acet_input_number_4,acet_input_number_5,acet_input_number_6,biz_acbtn_f2a_login_normal"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<!-- region 第一步账号登录 -->
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/biz_actv_welcome_login_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_99"
|
||||||
|
android:layout_marginTop="@dimen/dp_104"
|
||||||
|
android:text="@string/biz_login_title"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="70dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/guideline_h_top" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/actv_login_phone_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
|
android:text="@string/biz_login_get_phone_title"
|
||||||
|
android:textColor="@color/biz_login_C6C6C6"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_actv_welcome_login_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_welcome_login_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/biz_ace_login_phone_value"
|
||||||
|
android:layout_width="@dimen/dp_760"
|
||||||
|
android:layout_height="@dimen/dp_136"
|
||||||
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="@string/biz_login_phone_hint_text"
|
||||||
|
android:inputType="numberSigned"
|
||||||
|
android:maxLength="11"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="30dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/actv_login_phone_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/actv_login_phone_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/actv_phone_code_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
|
android:text="@string/biz_login_get_password"
|
||||||
|
android:textColor="@color/biz_login_C6C6C6"
|
||||||
|
android:textSize="40dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_ace_login_phone_value" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/v_phone_code_bg"
|
||||||
|
android:layout_width="@dimen/dp_760"
|
||||||
|
android:layout_height="@dimen/dp_136"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/actv_phone_code_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/biz_acet_phone_code_value"
|
||||||
|
android:layout_width="@dimen/dp_760"
|
||||||
|
android:layout_height="136dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:maxLength="4"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="30dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/v_phone_code_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/v_phone_code_bg"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/v_phone_code_bg"
|
||||||
|
tools:text="1881" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/biz_acbtn_login"
|
||||||
|
android:layout_width="760dp"
|
||||||
|
android:layout_height="136dp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_107"
|
||||||
|
android:background="@drawable/biz_login_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/biz_login_btn"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="40dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/guideline_h_bottom"/>
|
||||||
|
|
||||||
|
<!-- endregion-->
|
||||||
|
|
||||||
|
<!-- region 第二步重置密码 -->
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/biz_actv_reset_password_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_99"
|
||||||
|
android:layout_marginTop="@dimen/dp_104"
|
||||||
|
android:text="@string/biz_login_reset_password_title_big"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="70dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/guideline_h_top" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/actv_reset_password_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
|
android:text="@string/biz_login_reset_password_title"
|
||||||
|
android:textColor="@color/biz_login_C6C6C6"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_actv_reset_password_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_reset_password_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/biz_reset_password_first_value"
|
||||||
|
android:layout_width="@dimen/dp_760"
|
||||||
|
android:layout_height="@dimen/dp_136"
|
||||||
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="@string/biz_login_reset_password_first_text_hide"
|
||||||
|
android:inputType="numberSigned"
|
||||||
|
android:maxLength="11"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="30dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_actv_reset_password_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/actv_reset_password_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/actv_secode_password_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
|
android:text="@string/biz_login_reset_password_second_title"
|
||||||
|
android:textColor="@color/biz_login_C6C6C6"
|
||||||
|
android:textSize="40dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_actv_reset_password_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_reset_password_first_value" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/biz_reset_password_secode_value"
|
||||||
|
android:layout_width="@dimen/dp_760"
|
||||||
|
android:layout_height="@dimen/dp_136"
|
||||||
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="@string/biz_login_reset_password_first_text_hide"
|
||||||
|
android:inputType="numberSigned"
|
||||||
|
android:maxLength="11"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="30dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_actv_reset_password_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/actv_secode_password_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/biz_acbtn_reset_passwrod"
|
||||||
|
android:layout_width="760dp"
|
||||||
|
android:layout_height="136dp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_107"
|
||||||
|
android:background="@drawable/biz_login_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/biz_login_reset_password_next"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="40dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/guideline_h_bottom"/>
|
||||||
|
|
||||||
|
<!-- endregion-->
|
||||||
|
|
||||||
|
<!-- region 第三步展示二维码 -->
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/actv_f2a_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/guideline_h_top"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_68"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="请使用MFA验证器应用扫描一下二维码获取\n获取账户xxx的6位验证码"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/aciv_get_f2a_code"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/actv_f2a_title"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
|
android:layout_width="@dimen/dp_369"
|
||||||
|
android:layout_height="@dimen/dp_360"/>
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/v_f2a_code_bg"
|
||||||
|
android:layout_width="@dimen/dp_760"
|
||||||
|
android:layout_height="@dimen/dp_136"
|
||||||
|
android:layout_marginTop="39dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/aciv_get_f2a_code"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:background="@drawable/biz_login_phone_normal" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/acet_f2a_code"
|
||||||
|
android:layout_width="@dimen/dp_760"
|
||||||
|
android:layout_height="136dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberSigned"
|
||||||
|
android:maxLength="4"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="30dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/v_f2a_code_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/v_f2a_code_bg"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/v_f2a_code_bg"
|
||||||
|
tools:text="1881" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/actv_find_code"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/acet_f2a_code"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/acet_f2a_code"
|
||||||
|
android:text="若无法获取验证码,请联系管理员"
|
||||||
|
android:textColor="@color/biz_login_C0C3C9"
|
||||||
|
android:layout_marginTop="@dimen/dp_19"
|
||||||
|
android:textSize="@dimen/dp_30"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/biz_acbtn_f2a_login_first"
|
||||||
|
android:layout_width="760dp"
|
||||||
|
android:layout_height="136dp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_107"
|
||||||
|
android:background="@drawable/biz_login_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/biz_login_btn"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="40dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/guideline_h_bottom"/>
|
||||||
|
<!-- endregion -->
|
||||||
|
|
||||||
|
<!-- region 第四步 f2a 正常登录 -->
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/biz_actv_f2a_login_title_big"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_99"
|
||||||
|
android:layout_marginTop="@dimen/dp_104"
|
||||||
|
android:text="@string/biz_login_f2a_title_big"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="70dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/guideline_h_top" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/biz_actv_f2a_login_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_57"
|
||||||
|
android:layout_marginEnd="@dimen/dp_108"
|
||||||
|
android:text="@string/biz_login_f2a_title"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/guideline_v_right"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/biz_actv_f2a_login_title_big"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title_big" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/biz_actv_f2a_login_title_samll"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_104"
|
||||||
|
android:text="@string/biz_login_f2a_title_samll"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp_40"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/acet_input_number_1"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title_samll"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/acet_input_number_2"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
|
android:layout_marginTop="@dimen/dp_39"
|
||||||
|
android:layout_width="@dimen/dp_110"
|
||||||
|
android:layout_height="@dimen/dp_135"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/acet_input_number_2"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/acet_input_number_1"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/acet_input_number_3"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title_samll"
|
||||||
|
android:layout_marginTop="@dimen/dp_39"
|
||||||
|
android:layout_width="@dimen/dp_110"
|
||||||
|
android:layout_height="@dimen/dp_135"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/acet_input_number_3"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/acet_input_number_2"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/acet_input_number_4"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title_samll"
|
||||||
|
android:layout_marginTop="@dimen/dp_39"
|
||||||
|
android:layout_width="@dimen/dp_110"
|
||||||
|
android:layout_height="@dimen/dp_135"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/acet_input_number_4"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/acet_input_number_3"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/acet_input_number_5"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title_samll"
|
||||||
|
android:layout_marginTop="@dimen/dp_39"
|
||||||
|
android:layout_width="@dimen/dp_110"
|
||||||
|
android:layout_height="@dimen/dp_135"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/acet_input_number_5"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/acet_input_number_4"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/acet_input_number_6"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title_samll"
|
||||||
|
android:layout_marginTop="@dimen/dp_39"
|
||||||
|
android:layout_width="@dimen/dp_110"
|
||||||
|
android:layout_height="@dimen/dp_135"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/acet_input_number_6"
|
||||||
|
android:background="@drawable/biz_login_phone_normal"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/acet_input_number_5"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/biz_actv_f2a_login_title_samll"
|
||||||
|
android:layout_marginTop="@dimen/dp_39"
|
||||||
|
android:layout_width="@dimen/dp_110"
|
||||||
|
android:layout_height="@dimen/dp_135"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
|
android:id="@+id/biz_acbtn_f2a_login_normal"
|
||||||
|
android:layout_width="760dp"
|
||||||
|
android:layout_height="136dp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_107"
|
||||||
|
android:background="@drawable/biz_login_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/biz_login_btn"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="40dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/guideline_h_bottom"/>
|
||||||
|
|
||||||
|
<!-- endregion -->
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_99"
|
android:layout_marginStart="@dimen/dp_99"
|
||||||
android:layout_marginTop="@dimen/dp_104"
|
android:layout_marginTop="@dimen/dp_104"
|
||||||
android:text="@string/module_och_taxi_login_title"
|
android:text="@string/biz_login_title"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="70dp"
|
android:textSize="70dp"
|
||||||
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_50"
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
android:text="@string/module_och_taxi_login_get_phone_title"
|
android:text="@string/biz_login_get_phone_title"
|
||||||
android:textColor="@color/biz_login_C6C6C6"
|
android:textColor="@color/biz_login_C6C6C6"
|
||||||
android:textSize="@dimen/dp_40"
|
android:textSize="@dimen/dp_40"
|
||||||
app:layout_constraintStart_toStartOf="@+id/biz_actv_welcome_login_title"
|
app:layout_constraintStart_toStartOf="@+id/biz_actv_welcome_login_title"
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:maxLength="11"
|
android:maxLength="11"
|
||||||
android:hint="@string/module_och_taxi_login_phone_hint_text"
|
android:hint="@string/biz_login_phone_hint_text"
|
||||||
android:textColorHint="@color/white"
|
android:textColorHint="@color/white"
|
||||||
android:inputType="numberSigned"
|
android:inputType="numberSigned"
|
||||||
android:paddingStart="30dp"
|
android:paddingStart="30dp"
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_50"
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
android:text="@string/module_och_taxi_login_get_code_title"
|
android:text="@string/biz_login_get_code_title"
|
||||||
android:textColor="@color/biz_login_C6C6C6"
|
android:textColor="@color/biz_login_C6C6C6"
|
||||||
android:textSize="40dp"
|
android:textSize="40dp"
|
||||||
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
app:pressed_enabled="false"
|
app:pressed_enabled="false"
|
||||||
android:textColor="@color/biz_login_getcode_text_color_selector"
|
android:textColor="@color/biz_login_getcode_text_color_selector"
|
||||||
android:gravity="start|center_vertical"
|
android:gravity="start|center_vertical"
|
||||||
android:text="@string/module_och_taxi_login_get_code"
|
android:text="@string/biz_login_get_code"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="136dp"/>
|
android:layout_height="136dp"/>
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
android:background="@drawable/biz_login_bg"
|
android:background="@drawable/biz_login_bg"
|
||||||
android:layout_marginTop="118dp"
|
android:layout_marginTop="118dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:text="@string/module_och_taxi_login_btn"
|
android:text="@string/biz_login_btn"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="40dp"
|
android:textSize="40dp"
|
||||||
android:layout_width="760dp"
|
android:layout_width="760dp"
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<string name="module_och_taxi_login_title">Welcome to log in</string>
|
<string name="biz_login_title">Welcome to log in</string>
|
||||||
<string name="module_och_taxi_login_btn">Login</string>
|
<string name="biz_login_btn">Login</string>
|
||||||
<string name="module_och_taxi_login_get_code">Get Verification Code</string>
|
<string name="biz_login_get_code">Get Verification Code</string>
|
||||||
<string name="module_och_taxi_login_get_code_title">Please enter verification code</string>
|
<string name="biz_login_get_code_title">Please enter verification code</string>
|
||||||
<string name="module_och_taxi_login_get_code_success">Verification code obtained successfully</string>
|
<string name="biz_login_get_password">Please enter password</string>
|
||||||
<string name="module_och_taxi_login_login_success">Login successful</string>
|
<string name="biz_login_get_code_success">Verification code obtained successfully</string>
|
||||||
<string name="module_och_taxi_login_phone_error">Please enter a correct phone number</string>
|
<string name="biz_login_login_success">Login successful</string>
|
||||||
<string name="module_och_taxi_login_code_error">Please enter a correct verification code</string>
|
<string name="biz_login_phone_error">Please enter a correct phone number</string>
|
||||||
<string name="module_och_taxi_login_phone_hint_text">Please enter phone number</string>
|
<string name="biz_login_code_error">Please enter a correct verification code</string>
|
||||||
<string name="module_och_taxi_login_get_phone_title">Please enter phone number</string>
|
<string name="biz_login_phone_hint_text">Please enter phone number</string>
|
||||||
|
<string name="biz_login_get_phone_title">Please enter phone number</string>
|
||||||
|
|
||||||
<string name="network_error_tip">Network exception, please try again later</string>
|
<string name="biz_login_network_error_tip">Network exception, please try again later</string>
|
||||||
<string name="request_error_tip">Request exception occurred, please try again later</string>
|
<string name="biz_login_request_error_tip">Request exception occurred, please try again later</string>
|
||||||
<string name="request_error_tip_unmanned">Connection error between vehicle and server. Please wait.</string>
|
<string name="biz_login_request_error_tip_unmanned">Connection error between vehicle and server. Please wait.</string>
|
||||||
|
|
||||||
<string name="biz_log_i_see">I see</string>
|
<string name="biz_log_i_see">I see</string>
|
||||||
<string name="biz_login_offline_login">Guest Login</string>
|
<string name="biz_login_offline_login">Guest Login</string>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<color name="biz_login_878890">#878890</color>
|
<color name="biz_login_878890">#878890</color>
|
||||||
<color name="biz_login_19FFF5">#19FFF5</color>
|
<color name="biz_login_19FFF5">#19FFF5</color>
|
||||||
<color name="biz_login_1970FF">#1970FF</color>
|
<color name="biz_login_1970FF">#1970FF</color>
|
||||||
|
<color name="biz_login_C0C3C9">#c0c3c9</color>
|
||||||
|
|
||||||
<color name="biz_login_2EACFF">#2EACFF</color>
|
<color name="biz_login_2EACFF">#2EACFF</color>
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<string name="module_och_taxi_login_title">欢迎您登录</string>
|
<string name="biz_login_title">欢迎您登录</string>
|
||||||
<string name="module_och_taxi_login_btn">登录</string>
|
<string name="biz_login_btn">登录</string>
|
||||||
<string name="module_och_taxi_login_get_code">获取验证码</string>
|
<string name="biz_login_get_code">获取验证码</string>
|
||||||
<string name="module_och_taxi_login_get_code_title">请输入验证码</string>
|
<string name="biz_login_get_code_title">请输入验证码</string>
|
||||||
<string name="module_och_taxi_login_get_code_success">获取验证码成功</string>
|
<string name="biz_login_get_password">请输入密码</string>
|
||||||
<string name="module_och_taxi_login_login_success">登录成功</string>
|
<string name="biz_login_get_code_success">获取验证码成功</string>
|
||||||
<string name="module_och_taxi_login_phone_error">请输入正确的手机号</string>
|
<string name="biz_login_login_success">登录成功</string>
|
||||||
<string name="module_och_taxi_login_code_error">请输入正确的验证码</string>
|
<string name="biz_login_phone_error">请输入正确的手机号</string>
|
||||||
<string name="module_och_taxi_login_phone_hint_text">请输入手机号</string>
|
<string name="biz_login_code_error">请输入正确的验证码</string>
|
||||||
<string name="module_och_taxi_login_get_phone_title">请输入手机号</string>
|
<string name="biz_login_phone_hint_text">请输入手机号</string>
|
||||||
|
<string name="biz_login_get_phone_title">请输入手机号</string>
|
||||||
|
|
||||||
<string name="network_error_tip">网络异常,请稍后重试</string>
|
<string name="biz_login_reset_password_title_big">设置新密码</string>
|
||||||
<string name="request_error_tip">请求出现异常,请稍后重试</string>
|
<string name="biz_login_reset_password_title">请设置新密码</string>
|
||||||
<string name="request_error_tip_unmanned">车辆与服务端连接异常,请稍等</string>
|
<string name="biz_login_reset_password_first_text_hide">14-20位,包含数字、英文大小写</string>
|
||||||
|
<string name="biz_login_reset_password_second_title">请确认新密码</string>
|
||||||
|
<string name="biz_login_reset_password_next">下一步</string>
|
||||||
|
|
||||||
|
|
||||||
|
<string name="biz_login_f2a_title_big">欢迎登录</string>
|
||||||
|
<string name="biz_login_f2a_title">请打开MFA验证器,输入6位验证码,若无法获取验证码,请联系管理员</string>
|
||||||
|
<string name="biz_login_f2a_title_samll">请输入6位验证码</string>
|
||||||
|
|
||||||
|
<string name="biz_login_network_error_tip">网络异常,请稍后重试</string>
|
||||||
|
<string name="biz_login_request_error_tip">请求出现异常,请稍后重试</string>
|
||||||
|
<string name="biz_login_request_error_tip_unmanned">车辆与服务端连接异常,请稍等</string>
|
||||||
|
|
||||||
<string name="biz_log_i_see">我知道了</string>
|
<string name="biz_log_i_see">我知道了</string>
|
||||||
<string name="biz_login_offline_login">访客登录</string>
|
<string name="biz_login_offline_login">访客登录</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user