| | |
| | | // Vue.prototype.$ButtonData = JSON.parse(localStorage.getItem('ButtonData')) |
| | | }, |
| | | mounted() { |
| | | // this.getHubConnectionBuilder() |
| | | |
| | | this.getHubConnectionBuilder() |
| | | }, |
| | | computed: { |
| | | ...mapGetters([ |
| | |
| | | // }, |
| | | // 建立hub连接 |
| | | async getHubConnectionBuilder() { |
| | | const url = 'http://121.196.36.24:8019/chatHub' |
| | | const url = 'http://121.196.36.24:8048/chatHub' |
| | | this.signalr = new signalR.HubConnectionBuilder().withUrl(url, { |
| | | // skipNegotiation: true, |
| | | // transport: signalR.HttpTransportType.WebSockets |
| | |
| | | this.$notify({ offset: 80, type: 'warning', title: '消息提醒', message: res }) |
| | | this.$store.state.settings.isDot = true |
| | | }) |
| | | await this.signalr.invoke('AddUser', getCookie('admin')) |
| | | await this.signalr.invoke('AddUser', localStorage.getItem('account')) |
| | | }, |
| | | |
| | | systemSetting() { |