task#13769,答题完成返回页面执行自动刷新11

This commit is contained in:
2024-05-21 11:15:26 +08:00
parent ee1ecb1a55
commit 51351b37a4

View File

@ -92,6 +92,9 @@ export default {
// 每次回答完问题之后返回需重新加结果
},
async activated() {
await this.getList()
},
methods:{
onRefresh() {
this.getList()
@ -100,13 +103,7 @@ export default {
this.isLoading = false;
}, 1000);
},
beforeRouteUpdate(to, from, next) {
// 在当前路由改变,但是该组件被复用时调用
// 举例来说,对于带有动态参数的路径 /foo/:id在 /foo/1 和 /foo/2 之间跳转的时候,
// 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用。
this.getList();
next();
},
async getList(){
let res= await pageList({
pageNum:this.pageNum,