fix:商城登录互通问题

This commit is contained in:
jingyun committed 2026-09-08 13:46:45 +08:00
1 parent 7b1852d9a6
commit 1f9a8b67a2
4 files changed
+119 -9

No files matched your search

+11 -3
View File
@@ -47,11 +47,19 @@ class LoginPage extends HookConsumerWidget {
Future<void> returnAfterLogin() async {
final target = next?.trim();
final router = GoRouter.of(context);
if (target == null || target.isEmpty) {
router.go(AppRoutes.profile);
if (target != null && target.isNotEmpty) {
router.go(target);
return;
}
router.go(target);
// The mall opens this page with no `next`. Pop back to its resident
// WebView so the auth-state listener can deliver `enterWebMall` after
// the app-mall token has been issued. Replacing the route here disposes
// that WebView before the asynchronous hand-off can finish.
if (context.canPop()) {
context.pop();
} else {
router.go(AppRoutes.profile);
}
}
void startCountdown() {