|
@@ -558,12 +558,18 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), Downloa
|
558
|
558
|
/* it.authUrl="com.xhkjedu.xh_control_browser.MainActivity"
|
559
|
559
|
it.appPackage="com.xhkjedu.xh_control_browser"*/
|
560
|
560
|
LogShow("锁定了吧" + mainLockFlag)
|
|
561
|
+ //未锁定则执行跳转,锁定则跳转主页再次锁定并且不在请求接口
|
561
|
562
|
if (!mainLockFlag) {
|
562
|
|
- if (it.authUrl != null && AppUtils.isAppInstalled(this@MainActivity, it.appPackage)) {
|
563
|
|
- spUtils.saveJson(Const.AUTOAPPKEY, it)
|
564
|
|
- startAutoApp(it)
|
565
|
|
- } else {
|
566
|
|
- try {
|
|
563
|
+ //如果地址为空并且请求为true则不跳转,否则跳转
|
|
564
|
+ try {
|
|
565
|
+ if ((it.authUrl.isNullOrEmpty()||it.appPackage.isNullOrEmpty())&&it.netSucessFlag){
|
|
566
|
+ canClickFlag = true
|
|
567
|
+ autoAppFlag = false
|
|
568
|
+ spUtils.saveJson(Const.AUTOAPPKEY, it)
|
|
569
|
+ } else if ((!it.authUrl.isNullOrEmpty()&&!it.appPackage.isNullOrEmpty()) && AppUtils.isAppInstalled(this@MainActivity, it.appPackage)) {
|
|
570
|
+ spUtils.saveJson(Const.AUTOAPPKEY, it)
|
|
571
|
+ startAutoApp(it)
|
|
572
|
+ } else if (!it.netSucessFlag){
|
567
|
573
|
val autoAppBean = spUtils.getFromJson(
|
568
|
574
|
Const.AUTOAPPKEY,
|
569
|
575
|
AutoAppBean().javaClass
|
|
@@ -577,9 +583,9 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), Downloa
|
577
|
583
|
} else {
|
578
|
584
|
canClickFlag = true
|
579
|
585
|
}
|
580
|
|
- } catch (e: Exception) {
|
581
|
|
- canClickFlag = true
|
582
|
586
|
}
|
|
587
|
+ } catch (e: Exception) {
|
|
588
|
+ canClickFlag = true
|
583
|
589
|
}
|
584
|
590
|
} else {
|
585
|
591
|
canClickFlag = true
|