From e89ffd4416e6c3e1bf7522be871764e408859a16 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Mon, 12 Aug 2024 16:51:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5cf82e3..5c5797a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "1.0.6", + "version": "1.0.7", "description": "An Electron application with Vue", "main": "./out/main/index.js", "author": "example.com", From fe26d348fc2a2ed9e139ba508bc582add683f46f Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Tue, 13 Aug 2024 11:11:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8D=87=E7=BA=A7=E8=87=AA=E5=8A=A8=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=8F=90=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron.vite.config.mjs | 4 +-- src/main/update.js | 7 +++- src/renderer/src/views/login/index.vue | 50 +++++++++++++++++++------- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs index 9b9c503..c48cc00 100644 --- a/electron.vite.config.mjs +++ b/electron.vite.config.mjs @@ -24,8 +24,8 @@ export default defineConfig({ server: { proxy: { '/dev-api': { - // target: 'http://27.128.240.72:7865', - target: 'http://192.168.2.52:7863', + target: 'http://27.128.240.72:7865', + // target: 'http://192.168.2.52:7863', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') } diff --git a/src/main/update.js b/src/main/update.js index d59d155..e2f7332 100644 --- a/src/main/update.js +++ b/src/main/update.js @@ -42,6 +42,11 @@ const updateInit = (win) => { logger.error('检查更新失败') }) + // 监听下载进度 + autoUpdater.on('download-progress', (progressObj) => { + win.webContents.send('update-app-progress', progressObj.percent); + }); + // 跟新下载完毕 autoUpdater.on('update-downloaded', () => { dialog @@ -58,4 +63,4 @@ const updateInit = (win) => { }) } -export default updateInit \ No newline at end of file +export default updateInit diff --git a/src/renderer/src/views/login/index.vue b/src/renderer/src/views/login/index.vue index 5d98726..2828429 100644 --- a/src/renderer/src/views/login/index.vue +++ b/src/renderer/src/views/login/index.vue @@ -7,24 +7,47 @@