diff --git a/src/views/aboutpage.vue b/src/views/aboutpage.vue index 70785d7..1bd9ac9 100644 --- a/src/views/aboutpage.vue +++ b/src/views/aboutpage.vue @@ -103,11 +103,13 @@ left: 60px; z-index: 10; " - class="relative menu-dom"> + class="relative menu-dom" + @click="handleMenuClick()"> - -
+
关于 -
{ + state.showMenu = true +} +const handleSecMenuClick = () => { + state.showSecMenu = true +} diff --git a/src/views/commonpage.vue b/src/views/commonpage.vue index d62b8f3..8f34a3c 100644 --- a/src/views/commonpage.vue +++ b/src/views/commonpage.vue @@ -91,11 +91,13 @@ left: 60px; z-index: 10; " - class="relative menu-dom"> + class="relative menu-dom" + @click="handleMenuClick()"> - -
+ +
关于 -
{ const currentPath = route.path; state.activePage = currentPath; state.isH5 = localStorage.getItem("isH5"); }); +const pagepath = ref(window.location.pathname); +console.log('pagepath', pagepath.value); +watch( + () => route.path, + (to, from) => { + // 执行路由变化时的操作 + state.showMenu = false + state.showSecMenu = false + }, + { deep: true } +); const handleLink = (url) => { if (url) { @@ -212,6 +230,12 @@ const handleLink = (url) => { router.push("/common/staytuned"); } }; +const handleMenuClick = () => { + state.showMenu = true +} +const handleSecMenuClick = () => { + state.showSecMenu = true +} diff --git a/src/views/homepage.vue b/src/views/homepage.vue index 1ed862c..039fdfc 100644 --- a/src/views/homepage.vue +++ b/src/views/homepage.vue @@ -3,72 +3,67 @@ class="100vw">
- - +
@@ -79,14 +74,11 @@
帮助 -
+ @click="handleLink('')">帮助
隐私 -
+ @click="handleLink('')">隐私
条款 -
+ @click="handleLink('')">条款
copyright 2024 最终所有权归延庆博物馆
@@ -100,11 +92,13 @@ left: 60px; z-index: 10; " - class="relative menu-dom"> + class="relative menu-dom" + @click="handleMenuClick()"> + style="width: 32px" /> - -
+ +
关于 -
{ const currentPath = route.path; state.activePage = currentPath; state.isH5 = localStorage.getItem("isH5"); }); - +watch( + () => route.path, + (to, from) => { + // 执行路由变化时的操作 + state.showMenu = false + state.showSecMenu = false + }, + { deep: true } +); const handleLink = (url) => { if (url) { router.push(url); @@ -225,27 +228,22 @@ const handleLink = (url) => { router.push("/common/staytuned"); } }; +const handleMenuClick = () => { + state.showMenu = true +} +const handleSecMenuClick = () => { + state.showSecMenu = true +}