Эх сурвалжийг харах

防止 remoteApplication.txt 被设置为只读

Michael Wang 3 жил өмнө
parent
commit
52368a9e15

+ 6 - 0
src/features/Login/Login.vue

@@ -973,6 +973,12 @@ export default {
           const remoteAppName = REMOTE_APP_NAME;
           exe = `Project2.exe "${remoteAppName}" `;
         }
+        const fs = window.nodeRequire("fs");
+        try {
+          fs.unlinkSync("remoteApplication.txt");
+        } catch (error) {
+          console.log(error);
+        }
         await nativeExe(exe, checkRemoteAppTxt.bind(this));
       } else {
         this.disableLoginBtnBecauseRemoteApp = false;

+ 6 - 0
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -1085,6 +1085,12 @@ export default {
           const remoteAppName = REMOTE_APP_NAME;
           exe = `Project2.exe "${remoteAppName}" `;
         }
+        const fs = window.nodeRequire("fs");
+        try {
+          fs.unlinkSync("remoteApplication.txt");
+        } catch (error) {
+          console.log(error);
+        }
         await nativeExe(exe, checkRemoteAppTxt.bind(this));
       } else {
         this.disableExamingBecauseRemoteApp = false;