Skip to content

Commit

Permalink
虚假客户端添加token
Browse files Browse the repository at this point in the history
  • Loading branch information
HalcyonAlcedo committed Jun 29, 2024
1 parent c7142c1 commit 6d67fc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
21 changes: 6 additions & 15 deletions src/layouts/full/vertical-sidebar/VerticalSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,19 @@ try {
configStore.getConfigs()
} catch (error) {
snackbarStore.open(error, 'error')
}
}
const sidebar = computed(()=>{
const sidebar = computed(() => {
return configStore.sidebarItems
})
const version = computed(()=>{
const version = computed(() => {
return configStore.version
})
</script>

<template>
<v-navigation-drawer
left
v-model="customizer.Sidebar_drawer"
elevation="0"
rail-width="75"
mobile-breakpoint="lg"
app
class="leftSidebar"
:rail="customizer.mini_sidebar"
expand-on-hover
>
<v-navigation-drawer left v-model="customizer.Sidebar_drawer" elevation="0" rail-width="75" mobile-breakpoint="lg" app
class="leftSidebar" :rail="customizer.mini_sidebar" expand-on-hover>
<!---Logo part -->

<div class="pa-5">
Expand Down Expand Up @@ -65,7 +56,7 @@ const version = computed(()=>{
<!-- <ExtraBox /> -->
</div>
<div class="pa-4 text-center">
<v-chip color="inputBorder" size="small"> Karin v{{version}} </v-chip>
<v-chip color="inputBorder" size="small"> Karin v{{ version }} </v-chip>
</div>
</perfect-scrollbar>
</v-navigation-drawer>
Expand Down
5 changes: 4 additions & 1 deletion src/stores/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { defineStore } from 'pinia';
import { useServerStore } from './server';
import { request } from '@/utils/request';
import { adapterHandle } from '@/utils/adapter';
import { useAuthStore } from '@/stores/auth';

const authStore = useAuthStore();

export const useAdapterStore = defineStore({
id: 'adapter',
Expand Down Expand Up @@ -33,7 +36,7 @@ export const useAdapterStore = defineStore({
wsUrl = wsUrl.replace(/^(http)(s)?(:\/\/)/, function (match, p1, p2) {
return 'ws' + (p2 ? 's' : '') + '://';
})
const socket = new WebSocket(wsUrl)
const socket = new WebSocket(wsUrl,[authStore.user?.token || ''])
const _this = this
socket.onopen = function (event) {
_this.messages.push({
Expand Down

0 comments on commit 6d67fc7

Please sign in to comment.