Explorar el Código

更新二维码处理逻辑

Michael Wang hace 3 años
padre
commit
f9869f8ecc

+ 1 - 0
.env.development

@@ -7,3 +7,4 @@ VUE_APP_ROUTER_PATH=/oe-web/
 VUE_APP_PUBLIC_PATH=/oe-web/
 VUE_APP_SLS_STORE_NAME=student-client-test
 VUE_APP_GIT_REPO_VERSION=TO_BE_OVERRIDED
+VUE_APP_API_SERVER=http://192.168.10.39:8003

+ 6 - 1
src/features/OnlineExam/CheckComputer.vue

@@ -805,7 +805,12 @@ export default {
           testEnv: true,
         }
       );
-      this.wechat.qrValue = response.data;
+      let origin = window.location.origin;
+      if (process.env.NODE_ENV === "development") {
+        origin = process.env.VUE_APP_API_SERVER;
+      }
+      this.wechat.qrValue =
+        response.data + encodeURIComponent("&apiServer=" + origin);
       const trueExamRecordDataId = decodeURIComponent(response.data).match(
         /&examRecordDataId=(\d+)/
       )[1];

+ 6 - 1
src/features/OnlineExam/Examing/TextQuestionView.vue

@@ -408,7 +408,12 @@ export default {
             testEnv: false,
           }
         );
-        this.qrValue = response.data;
+        let origin = window.location.origin;
+        if (process.env.NODE_ENV === "development") {
+          origin = process.env.VUE_APP_API_SERVER;
+        }
+        this.qrValuee =
+          response.data + encodeURIComponent("&apiServer=" + origin);
       }
     },
     photoAdded(url) {