outside export default var stompClient = null;
methods
connection() {
//
this.socket = new SockJS("http://192.168.6.56:8081/endpoint");
stompClient = Stomp.over(this.socket);
//
stompClient.connect({}, (frame) => {
console.log("Connected:" + frame);
("/topic/getResponse")("/user/39/queue/getResponse")
stompClient.subscribe("/user/39/queue/getResponse",function(response){
console.log(123123123)
console.log(JSON.parse(response.body));
})
}, (err) => {
console.log(err)
});
},
mounted
this.connection()