提交 450d3027 authored 作者: 付康's avatar 付康

合并分支 'fk-dev' 到 'pre'

Fk dev 查看合并请求 !265
流水线 #169 已通过 于阶段
in 4 分 42 秒
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)" <div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)"
@mouseleave="handleHoverMenu(false)"> @mouseleave="handleHoverMenu(false)">
<div class="menu-content"> <div class="menu-content">
<div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item)"> <div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item, 1)">
<div class="icon"> <div class="icon">
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
</div> </div>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<div class="tool-box" v-show="isShowTool" @mouseenter="handleHoverTool(true)" <div class="tool-box" v-show="isShowTool" @mouseenter="handleHoverTool(true)"
@mouseleave="handleHoverTool(false)"> @mouseleave="handleHoverTool(false)">
<div class="menu-content"> <div class="menu-content">
<div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item)"> <div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item, 2)">
<div class="icon"> <div class="icon">
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
</div> </div>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</template> </template>
<script setup> <script setup>
import { ref, computed, onMounted, watchEffect } from "vue"; import { ref, computed, onMounted, watchEffect, onUnmounted } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { getPersonType } from "@/api/common/index"; import { getPersonType } from "@/api/common/index";
...@@ -226,30 +226,25 @@ const toolList = ref([ ...@@ -226,30 +226,25 @@ const toolList = ref([
{ {
title: "智能写报", title: "智能写报",
icon: Tool2, icon: Tool2,
path: "/writting" path: "/writtingAsstaint"
}, },
]) ])
const handleToModule = item => { const handleToModule = (item, index) => {
// const curRoute = router.resolve({ homeActiveTitleIndex.value = index
// path: item.path if (index === 1) {
// }); router.push({
// window.open(curRoute.href, "_blank"); path: item.path
router.push({ })
path: item.path } else {
}) const curRoute = router.resolve({
}; path: item.path
});
const searchText = ref(""); window.open(curRoute.href, "_blank");
}
const handleSearch = () => { isShowMenu.value = false
const curRoute = router.resolve({ isShowTool.value = false
path: "/searchResults",
query: {
searchText: searchText.value
}
});
window.open(curRoute.href, "_blank");
}; };
const handleClickTitle = (item, index) => { const handleClickTitle = (item, index) => {
...@@ -276,6 +271,10 @@ onMounted(() => { ...@@ -276,6 +271,10 @@ onMounted(() => {
handleGetPersonType(); handleGetPersonType();
homeActiveTitleIndex.value = Number(window.localStorage.getItem('homeActiveTitleIndex')) homeActiveTitleIndex.value = Number(window.localStorage.getItem('homeActiveTitleIndex'))
}); });
onUnmounted(() => {
window.localStorage.removeItem('homeActiveTitleIndex')
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论