فهرست منبع

openWS 包含测试机构

Michael Wang 5 سال پیش
والد
کامیت
5500ca8378
1فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 8 1
      src/features/OnlineExam/Examing/ExamingHome.vue

+ 8 - 1
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -64,6 +64,13 @@ import { openWS, closeWsWithoutReconnect } from "./ws.js";
 import { createNamespacedHelpers } from "vuex";
 const { mapState, mapMutations } = createNamespacedHelpers("examingHomeModule");
 
+const DOMAINS_CAN_UPLOAD_PHOTOS = ["iepcc-ps.ecs.qmth.com.cn"];
+
+if (process.env.VUE_APP_CAN_UPLOAD_PHOTOS_FOR_TEST === "true") {
+  DOMAINS_CAN_UPLOAD_PHOTOS.push(
+    ...["ecs-dev.qmth.com.cn", "test.qmth.com.cn", "test.ecs-dev.qmth.com.cn"]
+  );
+}
 export default {
   name: "ExamingHome",
   data() {
@@ -403,7 +410,7 @@ export default {
 
       const shouldOpenWS =
         examQuestionList.find(v => v.answerType === "SINGLE_AUDIO") ||
-        this.$store.state.user.schoolDomain === "iepcc-ps.ecs.qmth.com.cn";
+        DOMAINS_CAN_UPLOAD_PHOTOS.includes(this.$store.state.user.schoolDomain);
 
       if (shouldOpenWS) {
         // console.log("have single");