|
@@ -112,7 +112,7 @@ export default {
|
|
|
|
|
|
if (typeof nodeRequire != "undefined") {
|
|
if (typeof nodeRequire != "undefined") {
|
|
var that = this;
|
|
var that = this;
|
|
- var fs = nodeRequire("fs");
|
|
|
|
|
|
+ var fs = window.nodeRequire("fs");
|
|
var config = fs.readFileSync("config.js", "utf-8");
|
|
var config = fs.readFileSync("config.js", "utf-8");
|
|
var nameJson = JSON.parse(config);
|
|
var nameJson = JSON.parse(config);
|
|
const electronConfig = (await this.$http.get(
|
|
const electronConfig = (await this.$http.get(
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
|
|
|
//如果配置中配置了 checkRemoteControl:true
|
|
//如果配置中配置了 checkRemoteControl:true
|
|
if (electronConfig.otherConfig.checkRemoteControl) {
|
|
if (electronConfig.otherConfig.checkRemoteControl) {
|
|
- nodeRequire("node-cmd").get("Project1.exe", function(data) {
|
|
|
|
|
|
+ window.nodeRequire("node-cmd").get("Project1.exe", function() {
|
|
var applicationNames = fs.readFileSync(
|
|
var applicationNames = fs.readFileSync(
|
|
"remoteApplication.txt",
|
|
"remoteApplication.txt",
|
|
"utf-8"
|
|
"utf-8"
|