fix(mobile): reset page scroll on route entry
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user