| | |
| | | import { getServerName } from "./api.ts"; |
| | | |
| | | import { getApps } from "@/api/app"; |
| | | import { getDevInfo } from "@/api/login"; |
| | | |
| | | import config from "../../../../package.json"; |
| | | |
| | |
| | | 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(${ |
| | |
| | | }); |
| | | }, |
| | | 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 + ")"; |
| | |
| | | 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> |