From 82456a7f96e72da7265b63ffb7eaf0180e556697 Mon Sep 17 00:00:00 2001
From: zhuhao <979263092@qq.com>
Date: Wed, 7 Aug 2024 11:11:55 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E6=89=93?=
=?UTF-8?q?=E5=8C=85=E7=94=9F=E4=BA=A7=E9=85=8D=E7=BD=AE=E6=B7=BB=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.production | 10 ++++-----
.env.test | 19 ++++++++++++++++
electron-builder-prod.yml | 47 +++++++++++++++++++++++++++++++++++++++
package.json | 5 +++--
4 files changed, 74 insertions(+), 7 deletions(-)
create mode 100644 .env.test
create mode 100644 electron-builder-prod.yml
diff --git a/.env.production b/.env.production
index 993cace..3998cfc 100644
--- a/.env.production
+++ b/.env.production
@@ -5,15 +5,15 @@ VITE_APP_TITLE = AIx数字平台
VITE_APP_ENV = 'production'
# AIx融合数字管理系统/生产环境
-VITE_APP_BASE_API = 'https://file.ysaix.com:7868/prod-api'
+VITE_APP_BASE_API = 'https://prev.ysaix.com:7868/prod-api'
-VITE_APP_DOMAIN = 'file.ysaix.com'
+VITE_APP_DOMAIN = 'prev.ysaix.com'
-VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api'
+VITE_APP_UPLOAD_API = 'https://prev.ysaix.com:7868/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
-VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'
+VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktxt/'
-VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/'
+VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
diff --git a/.env.test b/.env.test
new file mode 100644
index 0000000..993cace
--- /dev/null
+++ b/.env.test
@@ -0,0 +1,19 @@
+# 页面标题
+VITE_APP_TITLE = AIx数字平台
+
+# 生产环境配置
+VITE_APP_ENV = 'production'
+
+# AIx融合数字管理系统/生产环境
+VITE_APP_BASE_API = 'https://file.ysaix.com:7868/prod-api'
+
+VITE_APP_DOMAIN = 'file.ysaix.com'
+
+VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api'
+
+# 是否在打包时开启压缩,支持 gzip 和 brotli
+VITE_BUILD_COMPRESS = gzip
+
+VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'
+
+VITE_APP_BUILD_BASE_PATH = 'https://file.ysaix.com:7868/'
diff --git a/electron-builder-prod.yml b/electron-builder-prod.yml
new file mode 100644
index 0000000..29c65e8
--- /dev/null
+++ b/electron-builder-prod.yml
@@ -0,0 +1,47 @@
+appId: com.electron.app
+productName: AIx
+directories:
+ buildResources: build
+files:
+ - '!**/.vscode/*'
+ - '!src/*'
+ - '!electron.vite.config.{js,ts,mjs,cjs}'
+ - '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
+ - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
+asarUnpack:
+ - resources/**
+win:
+ executableName: AIx
+ icon: resources/logo2.ico
+nsis:
+ oneClick: false
+ allowToChangeInstallationDirectory: true
+ artifactName: ${name}-${version}-setup.${ext}
+ shortcutName: ${productName}
+ uninstallDisplayName: ${productName}
+ createDesktopShortcut: always
+mac:
+ entitlementsInherit: build/entitlements.mac.plist
+ extendInfo:
+ - NSCameraUsageDescription: Application requests access to the device's camera.
+ - NSMicrophoneUsageDescription: Application requests access to the device's microphone.
+ - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
+ - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
+ notarize: false
+dmg:
+ artifactName: ${name}-${version}.${ext}
+linux:
+ target:
+ - AppImage
+ - snap
+ - deb
+ maintainer: electronjs.org
+ category: Utility
+appImage:
+ artifactName: ${name}-${version}.${ext}
+npmRebuild: false
+publish:
+ provider: generic
+ url: https://prev.ysaix.com:7868/src/assets/smarttalk/
+electronDownload:
+ mirror: https://npmmirror.com/mirrors/electron/
diff --git a/package.json b/package.json
index 3abf345..faed0b1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "aix-win",
- "version": "1.0.2",
+ "version": "1.0.4",
"description": "An Electron application with Vue",
"main": "./out/main/index.js",
"author": "example.com",
@@ -14,7 +14,8 @@
"postinstall": "electron-builder install-app-deps",
"build:unpack": "npm run build && electron-builder --dir",
"build:dev": "npm run build && electron-builder --win --config ./electron-builder-test.yml",
- "build:test": "npm run build && electron-builder --win --config ./electron-builder.yml",
+ "build:test": "electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml",
+ "build:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml",
"build:mac": "npm run build && electron-builder --mac",
"build:linux": "npm run build && electron-builder --linux"
},
--
2.44.0.windows.1
From 528e7876a943daaabdbcfbf0d45c1c6faf0b12f6 Mon Sep 17 00:00:00 2001
From: zhuhao <979263092@qq.com>
Date: Wed, 7 Aug 2024 11:12:18 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E5=BB=B6?=
=?UTF-8?q?=E9=95=BF=E6=9C=AC=E5=9C=B0=E5=90=8C=E6=AD=A5=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E8=AE=A1=E6=97=B6=E9=80=9F=E7=8E=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/file.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/file.js b/src/main/file.js
index d10cb59..c671519 100644
--- a/src/main/file.js
+++ b/src/main/file.js
@@ -77,10 +77,10 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
console.error('Error uploading file:', err)
}
})
- }, 5000)
+ }, 20000)
}
})
- }, 1000)
+ }, 10000)
})
function getFileMD5(path) {
--
2.44.0.windows.1
From a55a662ce93b5f999b3247cc828d97b852916e86 Mon Sep 17 00:00:00 2001
From: zhuhao <979263092@qq.com>
Date: Wed, 7 Aug 2024 11:12:38 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E5=A4=A7=E5=B0=8F=E6=94=B9=E4=B8=BA500M?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/layout/components/Uploader.vue | 2 +-
src/renderer/src/store/modules/uploader.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/renderer/src/layout/components/Uploader.vue b/src/renderer/src/layout/components/Uploader.vue
index ce9c275..43ee118 100644
--- a/src/renderer/src/layout/components/Uploader.vue
+++ b/src/renderer/src/layout/components/Uploader.vue
@@ -118,7 +118,7 @@ export default {
file.callback(res)
},
beforeUpload(file) {
- const MAX_SIZE = 100 * 1024 * 1024 // 2MB
+ const MAX_SIZE = 500 * 1024 * 1024 // 2MB
if (file.size > MAX_SIZE) {
this.$message.error('文件大小不能超过 100MB!')
return false
diff --git a/src/renderer/src/store/modules/uploader.js b/src/renderer/src/store/modules/uploader.js
index 445aea6..1f2d01a 100644
--- a/src/renderer/src/store/modules/uploader.js
+++ b/src/renderer/src/store/modules/uploader.js
@@ -17,7 +17,7 @@ const uploaderStore = defineStore('uploader', {
pushFile(payload) {
let _this = this
let arr = payload.filter((item) => {
- const MAX_SIZE = 100 * 1024 * 1024; // 2MB
+ const MAX_SIZE = 500 * 1024 * 1024; // 2MB
if (item.size > MAX_SIZE) {
ElMessage.error('文件大小不能超过 100MB!');
return false;
--
2.44.0.windows.1
From 9018abb67343af2304e0f030462755aec93adea0 Mon Sep 17 00:00:00 2001
From: zhuhao <979263092@qq.com>
Date: Wed, 7 Aug 2024 11:12:51 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9A=E9=A2=84?=
=?UTF-8?q?=E7=BA=A6=E8=AF=BE=E7=A8=8B=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/upload-dialog/index.vue | 6 +-
.../src/views/prepare/container/reserv.vue | 129 ++++++++++++++++++
src/renderer/src/views/prepare/index.vue | 16 ++-
3 files changed, 144 insertions(+), 7 deletions(-)
create mode 100644 src/renderer/src/views/prepare/container/reserv.vue
diff --git a/src/renderer/src/components/upload-dialog/index.vue b/src/renderer/src/components/upload-dialog/index.vue
index 4615780..9b06e8d 100644
--- a/src/renderer/src/components/upload-dialog/index.vue
+++ b/src/renderer/src/components/upload-dialog/index.vue
@@ -96,9 +96,9 @@ const hanleFileChange = (file) => {
return false
}
// 验证文件大小
- // B < KB < MB < GB
+ // B < KB < MB < GB
// file.raw.size 单位是B
- const fileSize = file.raw.size / 1024 / 1024 > 100
+ const fileSize = file.raw.size / 1024 / 1024 > 500
if (fileSize) {
ElMessage.error('文件大小错误! 请上传小于100M的文件!')
return false
@@ -126,7 +126,7 @@ const checkFile = (item, file) => {
else{
return false
}
-
+
}
// 删除
diff --git a/src/renderer/src/views/prepare/container/reserv.vue b/src/renderer/src/views/prepare/container/reserv.vue
new file mode 100644
index 0000000..1ab31db
--- /dev/null
+++ b/src/renderer/src/views/prepare/container/reserv.vue
@@ -0,0 +1,129 @@
+
+