瀏覽代碼

修改版本信息

[plg137200.] 1 年之前
父節點
當前提交
2503dd535e
共有 3 個文件被更改,包括 35 次插入7 次删除
  1. 1 1
      package.json
  2. 32 4
      src/main/index.js
  3. 2 2
      src/renderer/components/TopPage.vue

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "projectGy",
-  "version": "1.2.0",
+  "version": "1.2.1",
   "author": "",
   "description": "",
   "license": null,

+ 32 - 4
src/main/index.js

@@ -58,11 +58,11 @@ let loadingWindow
 //设置访问路径
 //打包访问的路径
 
-// let serveUrl = "./resources/exe"
-// let serveUrlJar = '\\resources\\exe'
+let serveUrl = "./resources/exe"
+let serveUrlJar = '\\resources\\exe'
 //本地访问的路径
-let serveUrl = "./exe"
-let serveUrlJar = '\\exe'
+// let serveUrl = "./exe"
+// let serveUrlJar = '\\exe'
 /**
  * Set `__static` path to static files in production
  * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
@@ -363,6 +363,27 @@ const starServer = function () {
 }
 
 
+const starBluetoothServer = function () {
+  let syncData = cmd.runSync('netstat -ano|findstr 8000')
+  if (syncData.data === null || syncData.data.trim().toUpperCase().indexOf('LISTENING') <= 0) {
+    let cp = require('child_process')
+    //execFile('./resources/exe/rpc_thrift.exe', function (err, data) {
+    // cp.spawn(serveUrl +'/rpc_thrift.exe', [])
+    let path = process.cwd() + serveUrlJar+'/ct1';
+    cp.spawn('start', ['/b', 'blueMain.exe'], { cwd: path, shell: true, windowsHide: true })
+    do {
+      syncData = cmd.runSync('netstat -ano|findstr 8000')
+      // console.log('find')
+    } while (syncData.data === null || syncData.data.trim().toUpperCase().indexOf('LISTENING') <= 0)
+    console.log('OK')
+  } else {
+    console.log('8000')
+  }
+}
+
+starBluetoothServer();
+
+
 
 // 配置thrift的connection信息
 // eslint-disable-next-line no-undef
@@ -481,6 +502,13 @@ ipcMain.on('window-close', function () {
         stopPid(syncData)
       }
     }
+    let syncBlueData = cmd.runSync("netstat -ano|findstr 8000");
+    //在的话判断是不是已经启动了是不是listening
+    if (syncBlueData.data != null) {
+      if (syncBlueData.data.includes("LISTENING")) {
+        stopPid(syncBlueData)
+      }
+    }
     wssSwitch = false
     cmd.runSync('taskkill /f /im javaw.exe')
     app.quit()

+ 2 - 2
src/renderer/components/TopPage.vue

@@ -107,9 +107,9 @@
             本计算机程序受著作权法和国际公约的保护,未经授权擅自复制或传播本程序的部分或全部,
             可能受到严厉的民事及刑事制裁,并将在法律许可的范围内受到最大可能的起诉.
           </p>
-          <p><span>Version:</span> 1.2.0</p>
+          <p><span>Version:</span> 1.2.1</p>
           <p><span>Build:</span>#fdfd1a6073</p>
-          <p><span>Build on:</span>2024/01/12</p>
+          <p><span>Build on:</span>2024/01/29</p>
           <p><span>Windows:</span>{{ windowsVersion }}</p>
         </el-col>
       </el-row>