fix(mobile): reset page scroll on route entry

This commit is contained in:
2026-07-09 13:34:24 +08:00
parent f517cbd2b5
commit 04405b5e11
11 changed files with 40 additions and 4 deletions
@@ -40,6 +40,7 @@ import { onShow } from '@dcloudio/uni-app';
import type { LoginResult } from '@/types/api';
import { apiRequest } from '@/services/api';
import { consumeLoginRedirect, getAuth, isLoggedIn, phoneKey, saveAuth, validatePhone } from '@/services/auth';
import { resetPageScroll } from '@/services/navigation';
const stored = getAuth();
const phone = ref(stored.phone || uni.getStorageSync(phoneKey) || '');
@@ -123,6 +124,7 @@ const login = async () => {
};
onShow(() => {
resetPageScroll();
if (isLoggedIn()) {
goAfterLogin();
}