Commit 53cfe7d3 authored by 姬鋆屾's avatar 姬鋆屾

tui

parent 21f4e30c
...@@ -9,15 +9,10 @@ ...@@ -9,15 +9,10 @@
<i class="el-icon-menu" @click="showMobileMenu = !showMobileMenu"> <i class="el-icon-menu" @click="showMobileMenu = !showMobileMenu">
</i> </i>
<router-link to="/"> <router-link to="/">
<img <img :src="sysLogo" style="margin-bottom:5px" height="40" alt="" />
src="../assets/images/logo.png"
style="margin-bottom:5px"
height="40"
alt=""
/>
<b style="color:white;font-size:18px;" <b style="color:white;font-size:18px;"
>&nbsp;&nbsp;&nbsp; 智慧大厅精细化管理系统 >&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b {{ title }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b
> >
</router-link> </router-link>
</div> </div>
...@@ -146,7 +141,13 @@ export default { ...@@ -146,7 +141,13 @@ export default {
console.log("beforeDestroy"); console.log("beforeDestroy");
//window.removeEventListener("message", this.getsocketData, false); //window.removeEventListener("message", this.getsocketData, false);
}, },
mounted() { created() {
localStorage.getItem("sysName")
? (this.title = localStorage.getItem("sysName"))
: "";
localStorage.getItem("sysLogo")
? (this.sysLogo = require(localStorage.getItem("sysLogo")))
: (this.sysLogo = require("../assets/images/logo.png"));
// console.log("mounted"); // console.log("mounted");
// this.$nextTick(function () { // this.$nextTick(function () {
// console.log("login websocket:"+"ws://"+process.env.VUE_APP_WEBSOCKET_API +"/ws?accessToken="+ this.$store.state.userData.id) // console.log("login websocket:"+"ws://"+process.env.VUE_APP_WEBSOCKET_API +"/ws?accessToken="+ this.$store.state.userData.id)
...@@ -254,6 +255,8 @@ export default { ...@@ -254,6 +255,8 @@ export default {
return { return {
showMobileMenu: false, showMobileMenu: false,
portal: process.env.VUE_APP_PORTAL_URL + "/#/home/siteArrange", portal: process.env.VUE_APP_PORTAL_URL + "/#/home/siteArrange",
title: "智慧大厅精细化管理系统",
sysLogo: "",
}; };
}, },
}; };
......
...@@ -12,13 +12,23 @@ export default { ...@@ -12,13 +12,23 @@ export default {
if (token) { if (token) {
window.sessionStorage.setItem("token", token); window.sessionStorage.setItem("token", token);
window.sessionStorage.setItem("siteid", siteid); window.sessionStorage.setItem("siteid", siteid);
this.$route.query.sysName
? localStorage.setItem("sysName", this.$route.query.sysName)
: "";
this.$route.query.sysName
? (document.title = this.$route.query.sysName)
: "";
this.$route.query.sysLogo
? localStorage.setItem("sysLogo", this.$route.query.sysLogo)
: "";
this.$router.push("/index"); // 有token直接跳转首页 this.$router.push("/index"); // 有token直接跳转首页
} else { } else {
this.$message({ this.$message({
message: "没有权限,正在跳转登录页面...", message: "没有权限,正在跳转登录页面...",
center: true, center: true,
}); });
setTimeout(function () { setTimeout(function() {
window.location.href = window.location.href =
process.env.VUE_APP_PORTAL_URL == "undefined" process.env.VUE_APP_PORTAL_URL == "undefined"
? "http://192.168.0.98:11072" ? "http://192.168.0.98:11072"
...@@ -35,4 +45,4 @@ export default { ...@@ -35,4 +45,4 @@ export default {
width: 300px; width: 300px;
height: 100px; height: 100px;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment