task#15348,司机app自动刷新功能
This commit is contained in:
@ -75,10 +75,17 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log("mountedmounted")
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.supplierId = urlParams.get('supplierId');
|
||||
this.getTrainingList();
|
||||
document.addEventListener('visibilitychange', async ( ) => {
|
||||
let state = document.visibilityState
|
||||
if (state == 'hidden') { // 用户离开了
|
||||
}
|
||||
if (state == 'visible') {
|
||||
this.getTrainingList();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
|
Reference in New Issue
Block a user