修复评论页回来不刷新的问题

This commit is contained in:
田岩
2025-07-17 17:28:46 +08:00
parent fcbd48b612
commit 24d3023c70
+8 -4
View File
@@ -71,7 +71,8 @@
import {
reactive,
ref,
computed
computed,
onMounted
} from 'vue';
import {
@@ -126,11 +127,14 @@
const scroll_fun = (e) => {
scrollTop.value = e.detail.scrollTop
}
onMounted(() => {
uni.$on('refresh_comment_data', () => {
commentRef.value?.getData();
})
})
onLoad((params) => {
crsNum.value = params.crsNum;
uni.$on('refresh_comment_data', () => {
commentRef.value.getData();
})
});
onShow(()=>{
getData();