|
|
@ -1,5 +1,6 @@
|
|
|
|
import { io } from "socket.io-client";
|
|
|
|
import { io } from "socket.io-client";
|
|
|
|
import { useToast } from "vue-toastification";
|
|
|
|
import { useToast } from "vue-toastification";
|
|
|
|
|
|
|
|
import jwt_decode from "jwt-decode";
|
|
|
|
const toast = useToast();
|
|
|
|
const toast = useToast();
|
|
|
|
|
|
|
|
|
|
|
|
let socket;
|
|
|
|
let socket;
|
|
|
@ -217,6 +218,15 @@ export default {
|
|
|
|
return (this.remember) ? localStorage : sessionStorage;
|
|
|
|
return (this.remember) ? localStorage : sessionStorage;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getJWTPayload() {
|
|
|
|
|
|
|
|
const jwtToken = this.$root.storage().token;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (jwtToken && jwtToken !== "autoLogin") {
|
|
|
|
|
|
|
|
return jwt_decode(jwtToken);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
getSocket() {
|
|
|
|
getSocket() {
|
|
|
|
return socket;
|
|
|
|
return socket;
|
|
|
|
},
|
|
|
|
},
|
|
|
|