一键连新增注册接口
This commit is contained in:
parent
2e92990835
commit
3b55692d17
|
|
@ -98,6 +98,7 @@
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".act.RegisterActivity"
|
android:name=".act.RegisterActivity"
|
||||||
|
android:process=":background"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".act.NewMainActivity"
|
android:name=".act.NewMainActivity"
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,34 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
||||||
}
|
}
|
||||||
tvRegister=findViewById(R.id.tvRegister)
|
tvRegister=findViewById(R.id.tvRegister)
|
||||||
tvRegister.setOnClickListener {
|
tvRegister.setOnClickListener {
|
||||||
|
if (BuildConfig.is_free && BuildConfig.productId.isNotEmpty()) {
|
||||||
|
val intent = Intent(applicationContext, SplashActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
} else {
|
||||||
|
if (TextUtils.isEmpty(registerHost)) {
|
||||||
|
when {
|
||||||
|
BuildConfig.is_ym -> {
|
||||||
|
val intent = Intent(applicationContext, RegisterActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_tz -> {
|
||||||
|
getTzRegister()
|
||||||
|
}
|
||||||
|
|
||||||
|
BuildConfig.is_yunti -> {
|
||||||
|
getYunTiRegister()
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
getBzyRegister()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ class RegisterActivity : BaseActivity(), View.OnClickListener {
|
||||||
private var countDownTimer: CountDownTimer? = null
|
private var countDownTimer: CountDownTimer? = null
|
||||||
private var registerKey = ""
|
private var registerKey = ""
|
||||||
private var registerIV2 = ""
|
private var registerIV2 = ""
|
||||||
|
private lateinit var aiBack:AppCompatImageView
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
@ -111,12 +112,15 @@ class RegisterActivity : BaseActivity(), View.OnClickListener {
|
||||||
with(httpStatus.rsp as RegisterRsp) {
|
with(httpStatus.rsp as RegisterRsp) {
|
||||||
if (code == "200") {
|
if (code == "200") {
|
||||||
RxToast.success("注册成功")
|
RxToast.success("注册成功")
|
||||||
MMKV.defaultMMKV()
|
if(httpStatus.rsp.data!=null){
|
||||||
.encode(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, username)
|
username= httpStatus.rsp.data.phoneNumber.toString()
|
||||||
MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_IS_REGISTER, true)
|
MMKV.defaultMMKV()
|
||||||
MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_NOTE_DEFAULT_PSW, true)
|
.encode(BZYConstants.MMKV_KEY_REMEMBER_USERNAME, username)
|
||||||
startActivity(Intent(this@RegisterActivity, LoginActivity::class.java))
|
MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_IS_REGISTER, true)
|
||||||
finish()
|
MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_NOTE_DEFAULT_PSW, true)
|
||||||
|
startActivity(Intent(this@RegisterActivity, LoginActivity::class.java))
|
||||||
|
finish()
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
RxToast.error("注册失败:(${code})${message}")
|
RxToast.error("注册失败:(${code})${message}")
|
||||||
}
|
}
|
||||||
|
|
@ -152,6 +156,12 @@ class RegisterActivity : BaseActivity(), View.OnClickListener {
|
||||||
passwordErrorTv = findViewById(R.id.tv_password_error)
|
passwordErrorTv = findViewById(R.id.tv_password_error)
|
||||||
tv_sms_code=findViewById(R.id.tv_sms_code)
|
tv_sms_code=findViewById(R.id.tv_sms_code)
|
||||||
et_sms_code=findViewById(R.id.et_sms_code)
|
et_sms_code=findViewById(R.id.et_sms_code)
|
||||||
|
aiBack=findViewById(R.id.aiBack)
|
||||||
|
aiBack.setOnClickListener {
|
||||||
|
val intent = Intent(this@RegisterActivity, LoginActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
rxDialogShapeLoading = RxDialogShapeLoading(this)
|
rxDialogShapeLoading = RxDialogShapeLoading(this)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="@dimen/dp_10"
|
android:padding="@dimen/dp_10"
|
||||||
android:text="@string/SendVerificationCode"
|
android:text="@string/SendVerificationCode"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/orange_B36C1B"
|
||||||
android:textSize="@dimen/layout_login_tv_login_textsize"
|
android:textSize="@dimen/layout_login_tv_login_textsize"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
/>
|
/>
|
||||||
|
|
@ -239,7 +239,7 @@
|
||||||
android:layout_marginStart="@dimen/layout_register_tv_login_start_margin"
|
android:layout_marginStart="@dimen/layout_register_tv_login_start_margin"
|
||||||
android:layout_marginEnd="@dimen/layout_register_tv_login_end_margin"
|
android:layout_marginEnd="@dimen/layout_register_tv_login_end_margin"
|
||||||
android:layout_marginBottom="@dimen/layout_register_tv_login_bottom_margin"
|
android:layout_marginBottom="@dimen/layout_register_tv_login_bottom_margin"
|
||||||
android:background="@drawable/login_btn_bg_selector"
|
android:background="@drawable/oc_login_bg"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/register"
|
android:text="@string/register"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
|
|
@ -274,7 +274,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/login"
|
android:text="@string/login"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:textColor="@drawable/registerlayout_login_text_color_selector"
|
android:textColor="#B36C1B"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue