修改onShow

This commit is contained in:
weiwei committed 2025-05-28 10:10:58 +08:00
1 parent 6bf2abfbe7
commit 5cc14ffe87
2 files changed
+16 -6

No files matched your search

+8 -3
View File
@@ -40,14 +40,19 @@
import { ref } from "vue"
import { hooks, router } from "@/sheep"
import { doorApi } from "@/sheep/api"
import { onLoad } from "@dcloudio/uni-app"
import { onLoad, onShow } from "@dcloudio/uni-app"
const pageRef = ref<any>(null)
onLoad(() => {
const app = getApp()
app._initTabbar()
})
const pageRef = ref<any>(null)
onShow(() => {
if (pageRef.value) {
pageRef.value.reload(false)
}
})
const pageHook = hooks.usePage(pageRef, doorApi.hardDoorPage, null, "data.records")
+8 -3
View File
@@ -47,14 +47,19 @@
import { ref } from "vue"
import { hooks, router } from "@/sheep"
import { doorApi } from "@/sheep/api"
import { onLoad } from "@dcloudio/uni-app"
import { onLoad, onShow } from "@dcloudio/uni-app"
const pageRef = ref<any>(null)
onLoad(() => {
const app = getApp()
app._initTabbar()
})
const pageRef = ref<any>(null)
onShow(() => {
if (pageRef.value) {
pageRef.value.reload(false)
}
})
const pageHook = hooks.usePage(pageRef, doorApi.hardDoorPage, null, "data.records")