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