Michael Wang hace 5 años
padre
commit
8f45212d79

+ 8 - 1
src/features/Login/Login.vue

@@ -808,7 +808,14 @@ export default {
       //   this.disableLoginBtnBecauseNotAllowedNative = false;
       //   return;
       // }
-      if (this.QECSConfig.LOGIN_SUPPORT.includes("NATIVE")) {
+      if (
+        this.QECSConfig.LOGIN_SUPPORT.includes("BROWSER") &&
+        this.QECSConfig.LOGIN_SUPPORT.includes("NATIVE")
+      ) {
+        // FIXME: 暂时允许选择浏览器的可以在浏览器中访问,后期浏览器应该跳转到移动端
+        this.disableLoginBtnBecauseNotAllowedNative = false;
+        return;
+      } else if (this.QECSConfig.LOGIN_SUPPORT.includes("NATIVE")) {
         // 检测是否是学生端。 检测是否有node。检测是否能node调用。
         const hasShell = UA.getBrowser().name === "electron-exam-shell";
         const hasNode = typeof nodeRequire !== "undefined";

+ 9 - 2
src/features/OfflineExam/OfflineExamUploadCug.vue

@@ -34,7 +34,7 @@
     </div>
     <Modal v-model="showPreview" fullscreen footer-hide :closable="false">
       <!-- <div slot="header"></div> -->
-      <img id="previewId" />
+      <img id="previewId" class="preview-image" />
     </Modal>
   </div>
 </template>
@@ -304,6 +304,7 @@ export default {
             });
           })
           .then(() => {
+            // return;
             return printCurrentPage()
               .then(filename => {
                 const fs = window.nodeRequire("fs");
@@ -392,8 +393,14 @@ export default {
 };
 </script>
 
-<style lang="postcss">
+<style scoped>
 .list .ivu-upload-select {
   width: 100%;
 }
+.preview-image {
+  max-width: 100vw;
+  max-height: 100vh;
+  margin: -16px;
+  object-fit: contain;
+}
 </style>