lrf402788946 5 lat temu
rodzic
commit
378ea633bb
4 zmienionych plików z 24 dodań i 1 usunięć
  1. 1 0
      package.json
  2. 2 0
      src/main.js
  3. 20 0
      src/plugins/setting.js
  4. 1 1
      vue.config.js

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
     "@fullcalendar/daygrid": "^4.3.0",
     "@fullcalendar/daygrid": "^4.3.0",
     "@fullcalendar/interaction": "^4.3.0",
     "@fullcalendar/interaction": "^4.3.0",
     "@fullcalendar/vue": "^4.3.1",
     "@fullcalendar/vue": "^4.3.1",
+    "@stomp/stompjs": "^5.4.3",
     "axios": "^0.19.2",
     "axios": "^0.19.2",
     "core-js": "^3.4.4",
     "core-js": "^3.4.4",
     "element-ui": "^2.13.0",
     "element-ui": "^2.13.0",

+ 2 - 0
src/main.js

@@ -6,6 +6,7 @@ import '@/plugins/meta';
 import '@/plugins/axios';
 import '@/plugins/axios';
 import '@/plugins/check-res';
 import '@/plugins/check-res';
 import '@/plugins/element';
 import '@/plugins/element';
+import InitStomp from '@/plugins/stomp';
 Vue.config.productionTip = false;
 Vue.config.productionTip = false;
 
 
 new Vue({
 new Vue({
@@ -13,3 +14,4 @@ new Vue({
   store,
   store,
   render: h => h(App),
   render: h => h(App),
 }).$mount('#app');
 }).$mount('#app');
+InitStomp();

+ 20 - 0
src/plugins/setting.js

@@ -0,0 +1,20 @@
+import Vue from 'vue';
+
+Vue.config.weixin = {
+  // baseUrl: process.env.BASE_URL + 'weixin',
+  baseUrl: 'http://smart.cc-lotus.info/weixin',
+};
+
+Vue.config.stomp = {
+  // brokerURL: 'ws://192.168.1.190:15674/ws',
+  brokerURL: '/ws', // ws://${location.host}/ws
+  connectHeaders: {
+    host: 'smart',
+    login: 'web',
+    passcode: 'web123',
+  },
+  // debug: true,
+  reconnectDelay: 5000,
+  heartbeatIncoming: 4000,
+  heartbeatOutgoing: 4000,
+};

+ 1 - 1
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
         ws: true,
         ws: true,
       },
       },
       '/ws': {
       '/ws': {
-        target: 'http://smart.cc-lotus.info',
+        target: 'http://free.liaoningdoupo.com',
         ws: true,
         ws: true,
       },
       },
       '/weixin': {
       '/weixin': {