fix 自由包不需要图形验证码
This commit is contained in:
parent
064a6c4c3e
commit
737330c20f
|
|
@ -502,29 +502,32 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
|
|||
}
|
||||
|
||||
R.id.tv_register -> {
|
||||
val intent = Intent(applicationContext, SplashActivity::class.java)
|
||||
startActivity(intent)
|
||||
// if (TextUtils.isEmpty(registerHost)) {
|
||||
// when {
|
||||
// BuildConfig.is_ym -> {
|
||||
// getYmRegister()
|
||||
// }
|
||||
//
|
||||
// BuildConfig.is_tz -> {
|
||||
// getTzRegister()
|
||||
// }
|
||||
//
|
||||
// BuildConfig.is_yunti -> {
|
||||
// getYunTiRegister()
|
||||
// }
|
||||
//
|
||||
// else -> {
|
||||
// getBzyRegister()
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||
// }
|
||||
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 -> {
|
||||
getYmRegister()
|
||||
}
|
||||
|
||||
BuildConfig.is_tz -> {
|
||||
getTzRegister()
|
||||
}
|
||||
|
||||
BuildConfig.is_yunti -> {
|
||||
getYunTiRegister()
|
||||
}
|
||||
|
||||
else -> {
|
||||
getBzyRegister()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
R.id.tv_kefu -> {
|
||||
|
|
|
|||
|
|
@ -91,13 +91,14 @@ class SplashActivity : BaseActivity() {
|
|||
private val Captcha_REQUEST_CODE = 3333
|
||||
private lateinit var rlPb: View
|
||||
private lateinit var ll_action: View
|
||||
private lateinit var but_skip: Button
|
||||
private lateinit var but_register: Button
|
||||
private var but_skip: Button? = null
|
||||
private var but_register: Button? = null
|
||||
|
||||
private lateinit var rlMain: RelativeLayout
|
||||
|
||||
private lateinit var splashAtyVM: SplashAtyVM
|
||||
private var registerHost = ""
|
||||
|
||||
companion object {
|
||||
public var registerKey = ""
|
||||
public var registerIV2 = ""
|
||||
|
|
@ -315,36 +316,38 @@ class SplashActivity : BaseActivity() {
|
|||
}
|
||||
|
||||
private fun initWebView() {
|
||||
webView = findViewById(R.id.webView)
|
||||
pb_web = findViewById(R.id.pb_web)
|
||||
but_skip = findViewById(R.id.but_skip)
|
||||
but_register = findViewById(R.id.but_register)
|
||||
but_skip.setOnClickListener {
|
||||
val intent = Intent(this@SplashActivity, LoginActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
but_register.setOnClickListener {
|
||||
if (TextUtils.isEmpty(registerHost)) {
|
||||
when {
|
||||
BuildConfig.is_ym -> {
|
||||
getYmRegister()
|
||||
}
|
||||
if (!BuildConfig.is_free && BuildConfig.productId.isNotEmpty()) {
|
||||
webView = findViewById(R.id.webView)
|
||||
pb_web = findViewById(R.id.pb_web)
|
||||
but_skip = findViewById(R.id.but_skip)
|
||||
but_register = findViewById(R.id.but_register)
|
||||
but_skip?.setOnClickListener {
|
||||
val intent = Intent(this@SplashActivity, LoginActivity::class.java)
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
but_register?.setOnClickListener {
|
||||
if (TextUtils.isEmpty(registerHost)) {
|
||||
when {
|
||||
BuildConfig.is_ym -> {
|
||||
getYmRegister()
|
||||
}
|
||||
|
||||
BuildConfig.is_tz -> {
|
||||
getTzRegister()
|
||||
}
|
||||
BuildConfig.is_tz -> {
|
||||
getTzRegister()
|
||||
}
|
||||
|
||||
BuildConfig.is_yunti -> {
|
||||
getYunTiRegister()
|
||||
}
|
||||
BuildConfig.is_yunti -> {
|
||||
getYunTiRegister()
|
||||
}
|
||||
|
||||
else -> {
|
||||
getBzyRegister()
|
||||
else -> {
|
||||
getBzyRegister()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||
}
|
||||
} else {
|
||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(registerHost)))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -358,8 +361,8 @@ class SplashActivity : BaseActivity() {
|
|||
lifecycleScope.launch(Dispatchers.Main) {
|
||||
delay(3000) // 延迟3秒
|
||||
com.cncat.vpn.common.log.Log.d("setWebView delay")
|
||||
but_skip.visibility = View.VISIBLE
|
||||
but_register.visibility = View.VISIBLE
|
||||
but_skip?.visibility = View.VISIBLE
|
||||
but_register?.visibility = View.VISIBLE
|
||||
}
|
||||
// WebView设置
|
||||
val webSettings = webView.settings
|
||||
|
|
@ -516,8 +519,8 @@ class SplashActivity : BaseActivity() {
|
|||
|
||||
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
||||
rlPb.visibility = View.VISIBLE
|
||||
but_skip.visibility = View.INVISIBLE
|
||||
but_register.visibility = View.INVISIBLE
|
||||
but_skip?.visibility = View.INVISIBLE
|
||||
but_register?.visibility = View.INVISIBLE
|
||||
splashAtyVM.checkLogin()
|
||||
} else {
|
||||
// doRegister()
|
||||
|
|
@ -533,8 +536,8 @@ class SplashActivity : BaseActivity() {
|
|||
val token = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_TOKEN)
|
||||
ll_action.visibility = View.VISIBLE
|
||||
rlPb.visibility = View.INVISIBLE
|
||||
but_skip.visibility = View.INVISIBLE
|
||||
but_register.visibility = View.INVISIBLE
|
||||
but_skip?.visibility = View.INVISIBLE
|
||||
but_register?.visibility = View.INVISIBLE
|
||||
if (MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_IS_REGISTER, false)) {
|
||||
|
||||
if (token != null && token.isNotEmpty()) {
|
||||
|
|
@ -1252,6 +1255,7 @@ class SplashActivity : BaseActivity() {
|
|||
}
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun getYmRegister() {
|
||||
var mmkvHost = MMKV.defaultMMKV()
|
||||
.decodeString(BZYConstants.MMKV_KEY_REGISTER_HOST, "")
|
||||
|
|
|
|||
Loading…
Reference in New Issue