Prechádzať zdrojové kódy

更新 VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO 地址

Michael Wang 6 rokov pred
rodič
commit
4692d7414a

+ 1 - 0
.env.production

@@ -1,3 +1,4 @@
 VUE_APP_TK_SERVER_URL=http://ecs.qmth.com.cn
 VUE_APP_WK_SERVER_SOCKET=wss://ecs.qmth.com.cn:8878/oewebsocket/
+VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://ecs.qmth.com.cn:8878/audioAnswerWebSocket
 VUE_APP_GIT_REPO_VERSION=TO_BE_OVERRIDED

+ 2 - 1
.env.staging

@@ -1,2 +1,3 @@
 VUE_APP_TK_SERVER_URL=http://192.168.10.39:8868
-VUE_APP_WK_SERVER_SOCKET=wss://ecs-dev.qmth.com.cn:8878/oewebsocket/
+VUE_APP_WK_SERVER_SOCKET=wss://ecs-dev.qmth.com.cn:8878/oewebsocket/
+VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://ecs-dev.qmth.com.cn:8878/audioAnswerWebSocket

+ 2 - 0
src/constants/constants.js

@@ -2,3 +2,5 @@ export const FACEID_LINENESS_URL =
   "https://api.megvii.com/faceid/liveness/v2/do?token=";
 export const TK_SERVER_URL = process.env.VUE_APP_TK_SERVER_URL;
 export const VUE_APP_WK_SERVER_SOCKET = process.env.VUE_APP_WK_SERVER_SOCKET;
+export const VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO =
+  process.env.VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO;

+ 3 - 4
src/features/OnlineExam/Examing/ws.js

@@ -1,5 +1,6 @@
 import store from "@/store";
 import { Message } from "iview";
+import { VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO } from "@/constants/constants";
 
 let ws;
 let shouldReconnect = true;
@@ -12,10 +13,8 @@ export function openWS({ examRecordDataId }) {
   console.log("in openWS", examRecordDataId);
   try {
     ws = new WebSocket(
-      "ws://192.168.10.39:8010" +
-        `/audioAnswerWebSocket/${examRecordDataId}/${store.state.user.key}/${
-          store.state.user.token
-        }`
+      VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO +
+        `/${examRecordDataId}/${store.state.user.key}/${store.state.user.token}`
     );
   } catch {
     setTimeout(() => {