| | |
| | | // 主进程获取配置项完成sockte注册和httpshu |
| | | ipcRenderer.on('getConfigData',(_event,...args)=>{ |
| | | console.log("config.json",...args) |
| | | if(args[0]===undefined){ |
| | | // alert("配置文件没有写入配置,请检查配置文件 文件路径:"+args[2]) |
| | | ElMessageBox.prompt('没有设定客户编号,请输入客户编号并保存', '警告', { |
| | | confirmButtonText: '保存', |
| | | showClose:false, |
| | | showCancelButton:false, |
| | | inputErrorMessage: 'Invalid Email', |
| | | }) |
| | | .then(({ value }) => { |
| | | const mode={ |
| | | clientCode:value, |
| | | machineName:os.hostname(), |
| | | screenTimeout: 60, |
| | | } |
| | | ipcRenderer.send('setConfingData',mode) |
| | | }) |
| | | |
| | | if(args!==null){ |
| | | if(args[0]===undefined){ |
| | | // alert("配置文件没有写入配置,请检查配置文件 文件路径:"+args[2]) |
| | | ElMessageBox.prompt('没有设定客户编号,请输入客户编号并保存', '警告', { |
| | | confirmButtonText: '保存', |
| | | showClose:false, |
| | | showCancelButton:false, |
| | | inputErrorMessage: 'Invalid Email', |
| | | }) |
| | | .then(({ value }) => { |
| | | const mode={ |
| | | clientCode:value, |
| | | machineName:os.hostname(), |
| | | screenTimeout: 60, |
| | | } |
| | | ipcRenderer.send('setConfingData',mode) |
| | | }) |
| | | |
| | | } |
| | | else if(args.length>0&&args[0].length>0){ |
| | | clientCode=args[0] |
| | | // 建立sockte 通讯 |
| | | creatorClient([],clientCode) |
| | | |
| | | } |
| | | } |
| | | else if(args.length>0&&args[0].length>0){ |
| | | clientCode=args[0] |
| | | // 建立sockte 通讯 |
| | | creatorClient([],clientCode) |
| | | |
| | | } |
| | | |
| | | }) |
| | | ipcRenderer.on("getScreenTimeout",(_event,args)=>{ |
| | | if(args!==undefined){ |