소스 검색

fix electron read file

Michael Wang 6 년 전
부모
커밋
84e990f1ee
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/features/Login/Login.vue

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

@@ -113,7 +113,7 @@ export default {
     if (typeof nodeRequire != "undefined") {
       var that = this;
       var fs = nodeRequire("fs");
-      var config = fs.readFileSync(process.cwd() + "/" + "config.js", "utf-8");
+      var config = fs.readFileSync("config.js", "utf-8");
       var nameJson = JSON.parse(config);
       const electronConfig = (await this.$http.get(
         "https://ecs.qmth.com.cn:8878/electron-config/" + nameJson.name + ".js"