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
@@ -239,6 +239,7 @@ import { computed, nextTick, ref } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import type { PracticeAlert, PracticeAssignment, PracticeRecord, ReviewDetail } from '@/types/api';
import { isLoggedIn, rememberLoginRedirect } from '@/services/auth';
import { resetPageScroll } from '@/services/navigation';
import {
createPracticeAssignment,
getPracticeAlerts,
@@ -616,7 +617,10 @@ const goLogin = () => {
uni.navigateTo({ url: '/pages/auth/login/index' });
};
onShow(loadPage);
onShow(() => {
resetPageScroll();
void loadPage();
});
</script>
<style scoped>