From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 20 七月 2022 15:05:58 +0800 Subject: [PATCH] 修复国标配置的bug --- src/pages/desktop/index/App.vue | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/pages/desktop/index/App.vue b/src/pages/desktop/index/App.vue index 235097f..023e7ee 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(${ @@ -103,16 +108,11 @@ }); }, methods: { -<<<<<<< HEAD - 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); ->>>>>>> ca43456ba7e5a27fdeaebb8293ddda90962ac42e }, onChangeBg(v) { document.getElementById("app").style.backgroundImage = "url(" + v + ")"; @@ -219,6 +219,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