From cb897aaeed0f3a24f91dc4265b8ff0d2b31284c6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期日, 23 四月 2023 17:35:00 +0800 Subject: [PATCH] Merge pull request #829 from kairlec/wvp-28181-2.0 --- web_src/src/App.vue | 49 ++++++++++++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 19 deletions(-) diff --git a/web_src/src/App.vue b/web_src/src/App.vue index e114545..e7d45b7 100644 --- a/web_src/src/App.vue +++ b/web_src/src/App.vue @@ -5,6 +5,7 @@ </template> <script> +import userService from './components/service/UserService' export default { name: 'app', data(){ @@ -19,7 +20,7 @@ } }, created() { - if(!this.$cookies.get("session")){ + if (userService.getToken() == null){ //濡傛灉娌℃湁鐧诲綍鐘舵�佸垯璺宠浆鍒扮櫥褰曢〉 this.$router.push('/login'); } @@ -33,28 +34,14 @@ // this.getUserInfo(); }, methods: { - //璇锋眰鐢ㄦ埛鐨勪竴浜涗俊鎭� - getUserInfo(){ - var userinfo = this.$cookies.get("session"); - }, checkLogin(){ //妫�鏌ユ槸鍚﹀瓨鍦╯ession - //cookie鎿嶄綔鏂规硶鍦ㄦ簮鐮侀噷鏈夋垨鑰呭弬鑰冪綉涓婄殑鍗冲彲 - if(!this.$cookies.get("session")){ + if (userService.getToken() == null){ //濡傛灉娌℃湁鐧诲綍鐘舵�佸垯璺宠浆鍒扮櫥褰曢〉 - this.$router.push('/login'); + // this.$router.push('/login'); } + }, - getCookie: function (cname) { - var name = cname + "="; - var ca = document.cookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) == ' ') c = c.substring(1); - if (c.indexOf(name) != -1) return c.substring(name.length, c.length); - } - return ""; - } }, components: {} }; @@ -76,9 +63,33 @@ line-height: 60px; } .el-main { - background-color: #e9eef3; + background-color: #f0f2f5; color: #333; text-align: center; padding-top: 0px !important; } + +/*瀹氫箟婊氬姩鏉¢珮瀹藉強鑳屾櫙 楂樺鍒嗗埆瀵瑰簲妯珫婊氬姩鏉$殑灏哄*/ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +/*瀹氫箟婊氬姩鏉¤建閬� 鍐呴槾褰�+鍦嗚*/ +::-webkit-scrollbar-track { + border-radius: 4px; + background-color: #F5F5F5; +} + +/*瀹氫箟婊戝潡 鍐呴槾褰�+鍦嗚*/ +::-webkit-scrollbar-thumb { + border-radius: 4px; + background-color: #c8c8c8; + box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); +} +.table-header { + color: #727272; + font-weight: 600; +} </style> -- Gitblit v1.8.0