21 lines
729 B
JavaScript
21 lines
729 B
JavaScript
// function connectSocketAfterLogin() {
|
|
// // 替换为你的Socket服务地址
|
|
// const socketUrl =
|
|
// 'ws://192.168.71.139:8080/resource/websocket?clientid=e5cd7e4891bf95d1d19206ce24a7b32e&Authorization=Bearer ' +
|
|
// this.$store.state.vuex_token;
|
|
// uni.connectSocket({
|
|
// url: socketUrl,
|
|
// header: {
|
|
// 'content-type': 'application/json'
|
|
// },
|
|
// protocols: ['protocol1'],
|
|
// method: 'GET'
|
|
// });
|
|
// uni.onSocketMessage(function(res) {
|
|
// console.log('收到服务器内容:' + res.data);
|
|
// });
|
|
// uni.onError(function(err){
|
|
// console.log('收到服务器错误内容:' + res.data);
|
|
// })
|
|
// }
|
|
// export connectSocketAfterLogin;
|