liuyu 4 years ago
parent
commit
fd39883484
3 changed files with 3 additions and 3 deletions
  1. 1 1
      src/plugins/setting.js
  2. 1 1
      src/plugins/stomp.js
  3. 1 1
      vue.config.js

+ 1 - 1
src/plugins/setting.js

@@ -7,7 +7,7 @@ Vue.config.weixin = {
 
 Vue.config.stomp = {
   // brokerURL: 'ws://192.168.1.190:15674/ws',
-  brokerURL: '/wss', // ws://${location.host}/ws
+  brokerURL: '/ws', // ws://${location.host}/ws
   connectHeaders: {
     host: 'live',
     login: 'live',

+ 1 - 1
src/plugins/stomp.js

@@ -17,7 +17,7 @@ const Plugin = {
     }
     assert(_.isString(options.brokerURL));
     if (!options.brokerURL.startsWith('ws://')) {
-      options.brokerURL = `ws://${location.host}${options.brokerURL}`;
+      options.brokerURL = `wss://${location.host}${options.brokerURL}`;
     }
 
     // 3. 注入组件

+ 1 - 1
vue.config.js

@@ -33,7 +33,7 @@ module.exports = {
         changeOrigin: true,
         ws: true,
       },
-      '/wss': {
+      '/ws': {
         target: 'https://zb.liaoningdoupo.com',
         ws: true,
       },