|
|
@@ -4,7 +4,10 @@
|
|
|
[{
|
|
|
type:'ota'
|
|
|
}]"
|
|
|
- />
|
|
|
+ >
|
|
|
+
|
|
|
+ <template #title><div @click="handleSettingClick">首页</div></template>
|
|
|
+ </headerBar>
|
|
|
<div class="home-container" v-loading="loading">
|
|
|
<!-- 背景图片 -->
|
|
|
<img src="@/assets/images/home/bg.png" alt="背景图片" class="background-image" />
|
|
|
@@ -29,6 +32,8 @@ import { useRouter } from "vue-router";
|
|
|
import configInfo from '@/stores/modules/config';
|
|
|
import { ref, onMounted } from 'vue';
|
|
|
import axios from 'axios';
|
|
|
+import client from "@/stores/modules/client";
|
|
|
+import icpList from '@/utils/ipc';
|
|
|
|
|
|
const configInfoStore = configInfo();
|
|
|
const router = useRouter();
|
|
|
@@ -74,6 +79,37 @@ const checkHealth = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const settingClickCount = ref(0);
|
|
|
+// 修改headerBar的点击处理函数
|
|
|
+function handleSettingClick() {
|
|
|
+ console.log('handleSettingClickhandleSettingClick')
|
|
|
+ settingClickCount.value++;
|
|
|
+
|
|
|
+ if (settingClickCount.value >= 5) {
|
|
|
+ openResourceDirectory()
|
|
|
+ settingClickCount.value = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ settingClickCount.value = 0;
|
|
|
+ }, 3000); // 3秒内未再次点击则重置计数器
|
|
|
+}
|
|
|
+
|
|
|
+const clientStore = client();
|
|
|
+
|
|
|
+function openResourceDirectory() {
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.utils.shellFun);
|
|
|
+ let params = {
|
|
|
+ action: 'openPath',
|
|
|
+ params: configInfoStore.appConfig.userDataPath.replaceAll('/', '\\')
|
|
|
+ };
|
|
|
+ clientStore.ipc.send(icpList.utils.shellFun, params);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 在组件挂载时执行健康检查
|
|
|
onMounted(() => {
|
|
|
checkHealth();
|