ezhizao_zx 3 月之前
父节点
当前提交
a8151b9a8b
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 3 2
      src/store/modules/message.js
  2. 3 2
      src/views/business/outsourceInspectionVerify/index.vue

+ 3 - 2
src/store/modules/message.js

@@ -1,7 +1,8 @@
-import { patternNginxWsUrl } from "../../utils/ws"
+import { patternNginxWsUrl, getWsUrl } from "../../utils/ws"
 
 // const webSocket = require('ws')
-const wsUrl = patternNginxWsUrl()
+// const wsUrl = patternNginxWsUrl()
+const wsUrl = getWsUrl()
 
 const useMessageStore = defineStore('message', {
   status: () => ({

+ 3 - 2
src/views/business/outsourceInspectionVerify/index.vue

@@ -153,7 +153,7 @@ import {
 import { nextTick } from "vue";
 import { getToken } from '@/utils/auth'
 import useUserStore from '@/store/modules/user'
-import { patternNginxExportWsUrl } from "@/utils/ws"
+import { patternNginxExportWsUrl, getWsExportUrl } from "@/utils/ws"
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 const { outsource_before_checkout_verify_status } = proxy.useDict(
@@ -406,7 +406,8 @@ async function createWebSocket(id, token) {
     // const options = { headers: { Authorization: 'Bearer ' + token } }
     // console.log(options)
     var itemUrl = document.location.origin;
-    var wsUrl = patternNginxExportWsUrl();
+    // var wsUrl = patternNginxExportWsUrl();
+    var wsUrl = getWsExportUrl()
     console.log(wsUrl)
     // if (itemUrl.includes(hostIp)) {
     //   wsUrl = innetUrl;