From 804d59e162b72be684d0087a8cd74dbd6fecbf4d Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期五, 30 十二月 2022 16:57:18 +0800 Subject: [PATCH] 添加投影配置页面 --- src/pages/desktop/index/App.vue | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/pages/desktop/index/App.vue b/src/pages/desktop/index/App.vue index 4b2728b..97d9b3d 100644 --- a/src/pages/desktop/index/App.vue +++ b/src/pages/desktop/index/App.vue @@ -18,6 +18,7 @@ import { getServerName } from "./api.ts"; import { getApps } from "@/api/app"; +import { getDevInfo } from "@/api/login"; import config from "../../../../package.json"; @@ -48,11 +49,15 @@ return false; }, defaultBgUrl() { - return JSON.parse(sessionStorage.getItem("userInfo")).backgroundpic; + if (JSON.parse(sessionStorage.getItem("userInfo"))) { + return JSON.parse(sessionStorage.getItem("userInfo")).backgroundpic; + } + return ""; }, }, created() { this.getServerName(); + this.getDevInfo(); }, mounted() { document.getElementById("app").style.backgroundImage = `url(${ @@ -88,7 +93,6 @@ this.showApps(); } if (e.data.msg == "checkSN") { - debugger; this.$refs.desktop.validateSn(); } if (e.data.msg === "changeColor") { @@ -103,11 +107,11 @@ }); }, methods: { - quit(){ - this.$refs.tools.toLogout() + quit() { + this.$refs.tools.toLogout(); }, - onJumpToDock(name){ - this.$refs.dock_model.onJumpToDock(name) + onJumpToDock(name) { + this.$refs.dock_model.onJumpToDock(name); }, onChangeBg(v) { document.getElementById("app").style.backgroundImage = "url(" + v + ")"; @@ -214,6 +218,12 @@ sessionStorage.setItem("title", res.data.serverName); } }, + async getDevInfo() { + const res = await getDevInfo(); + if (res && res.success && res.data.deviceType.substr(0, 2) === "DS") { + sessionStorage.setItem("isShowPolling", "show"); + } + }, }, }; </script> -- Gitblit v1.8.0