|
@@ -113,7 +113,8 @@ export default {
|
|
|
if (typeof nodeRequire != "undefined") {
|
|
|
var that = this;
|
|
|
var fs = nodeRequire("fs");
|
|
|
- var config = fs.readFileSync(process.cwd() + "/" + "config.js", "utf-8");
|
|
|
+ var path = nodeRequire("path");
|
|
|
+ var config = fs.readFileSync(path.join(__dirname, "/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"
|
|
@@ -123,7 +124,7 @@ export default {
|
|
|
if (electronConfig.otherConfig.checkRomateControl) {
|
|
|
nodeRequire("node-cmd").get("Project1.exe", function(data) {
|
|
|
var applicationNames = fs.readFileSync(
|
|
|
- "remoteApplication.txt",
|
|
|
+ path.join(__dirname, "/remoteApplication.txt"),
|
|
|
"utf-8"
|
|
|
);
|
|
|
if (applicationNames && applicationNames.trim()) {
|