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
+5 -1
View File
@@ -119,6 +119,7 @@ import { onShow } from '@dcloudio/uni-app';
import type { CompetencyProfile, PracticeRecord, PromotionEvidence } from '@/types/api';
import { clearAuth, getAuth, isLoggedIn, rememberLoginRedirect } from '@/services/auth';
import { getCompetencyProfile, getPracticeHistory, getPromotionEvidence } from '@/services/practice';
import { resetPageScroll } from '@/services/navigation';
const loggedIn = ref(false);
const phone = ref('');
@@ -182,7 +183,10 @@ const logout = () => {
uni.showToast({ title: '已退出', icon: 'none' });
};
onShow(loadData);
onShow(() => {
resetPageScroll();
void loadData();
});
</script>
<style scoped>