|
@@ -155,6 +155,13 @@ const { mapMutations, mapGetters, mapState } = createNamespacedHelpers(
|
|
|
import VueQrcode from "@chenfengyuan/vue-qrcode";
|
|
|
import UploadPhotos from "./UploadPhotos";
|
|
|
|
|
|
+const QR_DOMAIN_ARRAYS = ["iepcc-ps.ecs.qmth.com.cn"];
|
|
|
+
|
|
|
+if (process.env.NODE_ENV !== "production") {
|
|
|
+ QR_DOMAIN_ARRAYS.push(
|
|
|
+ ...["ecs-dev.qmth.com.cn", "test.qmth.com.cn", "test.ecs-dev.qmth.com.cn"]
|
|
|
+ );
|
|
|
+}
|
|
|
export default {
|
|
|
name: "TextQuestionView",
|
|
|
data() {
|
|
@@ -243,8 +250,7 @@ export default {
|
|
|
fetchQRCode() {
|
|
|
const shouldFetch =
|
|
|
this.examQuestion.answerType === "SINGLE_AUDIO" ||
|
|
|
- this.$store.state.user.schoolDomain === "ecs-dev.qmth.com.cn";
|
|
|
- this.$store.state.user.schoolDomain === "iepcc-ps.ecs.qmth.com.cn";
|
|
|
+ QR_DOMAIN_ARRAYS.includes(this.$store.state.user.schoolDomain);
|
|
|
if (shouldFetch) {
|
|
|
const transferFileType =
|
|
|
this.examQuestion.answerType === "SINGLE_AUDIO" ? "AUDIO" : "PIC";
|
|
@@ -337,16 +343,14 @@ export default {
|
|
|
shouldFetchQrCode() {
|
|
|
const shouldFetch =
|
|
|
this.examQuestion.answerType === "SINGLE_AUDIO" ||
|
|
|
- this.$store.state.user.schoolDomain === "ecs-dev.qmth.com.cn" ||
|
|
|
- this.$store.state.user.schoolDomain === "iepcc-ps.ecs.qmth.com.cn";
|
|
|
+ QR_DOMAIN_ARRAYS.includes(this.$store.state.user.schoolDomain);
|
|
|
|
|
|
return shouldFetch;
|
|
|
},
|
|
|
canAttachPhotos() {
|
|
|
return (
|
|
|
(this.$store.state.user.schoolDomain === "csu.ecs.qmth.com.cn" ||
|
|
|
- this.$store.state.user.schoolDomain === "ecs-dev.qmth.com.cn" ||
|
|
|
- this.$store.state.user.schoolDomain === "iepcc-ps.ecs.qmth.com.cn") &&
|
|
|
+ QR_DOMAIN_ARRAYS.includes(this.$store.state.user.schoolDomain)) &&
|
|
|
!this.isAudioAnswerType
|
|
|
);
|
|
|
},
|