完成全项目响应式审核与换机交接

This commit is contained in:
2026-07-22 07:41:27 +08:00
parent a127280ce6
commit eced3d1e6e
77 changed files with 2052 additions and 378 deletions
+5 -18
View File
@@ -222,7 +222,7 @@
<script setup>
import { computed, ref } from "vue";
import { onLoad, onUnload, onShow } from "@dcloudio/uni-app";
import { onLoad, onUnload } from "@dcloudio/uni-app";
import AppLoading from "@/components/AppLoading.vue";
import GenealogyPageBackground from "@/components/GenealogyPageBackground.vue";
import PageHeader from "@/components/PageHeader.vue";
@@ -332,26 +332,13 @@ const resultFixtures = [
const inviteTarget = computed(() => resultFixtures[0]);
const syncModeFromRoute = () => {
let requestedMode = "search";
let requestedState = "";
if (typeof location !== "undefined") {
const routeParams = new URLSearchParams(location.hash.split("?")[1] || "");
requestedMode = routeParams.get("mode") || "search";
requestedState = routeParams.get("state") || "";
} else {
const pages = getCurrentPages();
const routeOptions = pages[pages.length - 1]?.options || {};
requestedMode = routeOptions.mode || "search";
requestedState = routeOptions.state || "";
}
mode.value = requestedMode === "invite" ? "invite" : "search";
if (mode.value === "search" && requestedState === "loading")
const syncModeFromRoute = (query = {}) => {
mode.value = query?.mode === "invite" ? "invite" : "search";
if (mode.value === "search" && query?.state === "loading")
searchState.value = "loading";
};
onLoad(syncModeFromRoute);
onShow(syncModeFromRoute);
onLoad((query) => syncModeFromRoute(query));
onUnload(() => {
if (searchTimer) clearTimeout(searchTimer);
});