diff --git a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java index 34a1be8cd..c8a3c2645 100644 --- a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java @@ -75,6 +75,15 @@ public class RouteUtil { .withBoolean("forwardEntry", true) .navigation(); } + /** + * 只回到登录页,不提示东西 + */ + public static void forwardEntry2() { + ARouter.getInstance().build(PATH_ENTRY) + .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + .navigation(); + } /** * 跳转到个人主页 diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index 0709595e3..17e9aaae5 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -122,7 +122,7 @@ public class LoginActivity extends AbsActivity { @Override public void onClick(View view) { //finish(); - RouteUtil.forwardLauncher(LoginActivity.this); + RouteUtil.forwardEntry2(); } }); @@ -380,4 +380,10 @@ public class LoginActivity extends AbsActivity { super.onDestroy(); } + + @Override + public void onBackPressed() { + super.onBackPressed(); + RouteUtil.forwardEntry2(); + } }