From 76e49eb32372b05ecf3b3e4c63567c5a987430bd Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 09 八月 2023 09:27:17 +0800
Subject: [PATCH] 1.编码规格完成80%
---
src/layout/components/Navbar.vue | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 88cc92e..a9f42f4 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -172,6 +172,8 @@
import RightPanel from '@/components/RightPanel'
import Settings from '../components/Settings/index'
import * as signalR from '@aspnet/signalr'
+import { ButtonData } from '@/api/basicSettings'
+import Vue from 'vue'
export default {
components: {
@@ -236,10 +238,12 @@
// this.$signalr.start()
this.usercode = getCookie('navTabId')
this.username = getCookie('username')
- this.stu_torgname = getCookie('stu_torgname') === '' ? '绯荤粺绠$悊鍛�' : getCookie('stu_torgname')
+ this.stu_torgname = getCookie('stu_torgname')
},
mounted() {
- this.getHubConnectionBuilder()
+ // this.getHubConnectionBuilder()
+
+ this.getButtonData()
},
computed: {
...mapGetters([
@@ -271,6 +275,12 @@
}
},
methods: {
+ // 鑾峰彇鍏ㄥ眬鎸夐挳閿�煎
+ async getButtonData() {
+ const { data: res } = await ButtonData()
+ Vue.prototype.$ButtonData = res // 鐢ㄤ簬鍏ㄥ眬
+ },
+
// 寤虹珛hub杩炴帴
async getHubConnectionBuilder() {
const url = 'http://121.196.36.24:8019/chatHub'
@@ -332,11 +342,11 @@
this.$store.dispatch('app/toggleSideBar')
},
async logout() {
- localStorage.removeItem('token')
- await this.signalr.stop()
- this.signalr.off('SendCustomUserMessage')
+ // await this.signalr.stop()
+ // this.signalr.off('SendCustomUserMessage')
await this.$store.dispatch('user/logout')
- this.$message.success('閫�鍑烘垚鍔燂紒')
+ localStorage.removeItem('token')
+ this.$notify.success('閫�鍑烘垚鍔燂紒')
this.$router.push(`/login`)
},
editPassword() {
--
Gitblit v1.9.3