diff --git a/.env.production b/.env.production
new file mode 100644
index 0000000..5929a05
--- /dev/null
+++ b/.env.production
@@ -0,0 +1,15 @@
+# 页面标题
+VITE_APP_TITLE = AIx数字平台
+
+# 生产环境配置
+VITE_APP_ENV = 'production'
+
+# AIx融合数字管理系统/生产环境
+VITE_APP_BASE_API = 'http://192.168.2.52:7863'
+
+# 是否在打包时开启压缩,支持 gzip 和 brotli
+VITE_BUILD_COMPRESS = gzip
+
+VITE_APP_RES_FILE_PATH = 'https://prev.ysaix.com:7868/src/assets/textbook/booktxt/'
+
+VITE_APP_BUILD_BASE_PATH = 'https://prev.ysaix.com:7868/'
\ No newline at end of file
diff --git a/README.md b/README.md
index ae002ac..f453515 100644
--- a/README.md
+++ b/README.md
@@ -59,10 +59,72 @@ $ npm run build:linux
├── .prettierrc.yaml //prettier代码格式化配置文件
├── dev-app-update.yml
├── electron-builder.yml //打包配置文件
-├──electron.vite.config.mjs //electron-vite配置文件
+├── electron.vite.config.mjs //electron-vite配置文件
├── package-lock.json
├── package.json
-└──README.md //项目说明
+└── README.md //项目说明
```
+
+
+### electron-builder.yml配置说明
+
+```json
+appId: com.electron.test //appid 包名
+productName: 测试程序 //安装程序的名字
+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}'
+ - '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
+asarUnpack:
+ - resources
+win:
+ executableName: 测试程序
+ icon: build/icon/favicon.ico //程序图标
+nsis:
+ oneClick: false //是否一键安装
+ allowElevation: true //允许请求提升。若为false,则用户必须使用提升的权限重新启动安装程序。
+ allowToChangeInstallationDirectory: true //是否允许修改安装目录
+ createDesktopShortcut: true //卸载时图标
+ createStartMenuShortcut: true // 是否创建开始菜单图标
+ runAfterFinish: false //是否安装完成后运行
+ include: ../build/script/installer.nsh //我这里放的是将应用程序默认安装在哪个路径
+ artifactName: ${name}-${version}-setup.${ext}
+ uninstallDisplayName: ${productName}
+ installerIcon: ./build/icon.ico // 安装时图标
+ uninstallerIcon: ./build/icon.ico
+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://example.com/auto-updates //程序升级的验证地址
+electronDownload:
+ mirror: https://npmmirror.com/mirrors/electron/
+```
+
+
+
diff --git a/electron-builder.yml b/electron-builder.yml
index 5c1d02b..52741c5 100644
--- a/electron-builder.yml
+++ b/electron-builder.yml
@@ -1,5 +1,5 @@
appId: com.electron.app
-productName: electron-app
+productName: AIx
directories:
buildResources: build
files:
@@ -11,7 +11,7 @@ files:
asarUnpack:
- resources/**
win:
- executableName: electron-app
+ executableName: AIx
nsis:
oneClick: false
allowToChangeInstallationDirectory: true
diff --git a/src/renderer/src/api/system/user.js b/src/renderer/src/api/system/user.js
index c83e0f6..b7e9e23 100644
--- a/src/renderer/src/api/system/user.js
+++ b/src/renderer/src/api/system/user.js
@@ -7,7 +7,7 @@ export function getUserProfile() {
method: 'get'
})
}
-
+
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
@@ -16,7 +16,7 @@ export function getUserProfile() {
data: data
})
}
-
+
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
@@ -29,11 +29,14 @@ export function getUserProfile() {
params: data
})
}
-
+
// 用户头像上传
export function uploadAvatar(data) {
return request({
url: '/system/user/profile/avatar',
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ },
method: 'post',
data: data
})
@@ -46,4 +49,4 @@ export function updateUserInfo(data) {
method: 'put',
data: data
})
-}
\ No newline at end of file
+}
diff --git a/src/renderer/src/components/Versions.vue b/src/renderer/src/components/Versions.vue
deleted file mode 100644
index 35136c0..0000000
--- a/src/renderer/src/components/Versions.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- - Electron v{{ versions.electron }}
- - Chromium v{{ versions.chrome }}
- - Node v{{ versions.node }}
-
-
diff --git a/src/renderer/src/components/move-file/index.vue b/src/renderer/src/components/move-file/index.vue
index 71c7837..79926df 100644
--- a/src/renderer/src/components/move-file/index.vue
+++ b/src/renderer/src/components/move-file/index.vue
@@ -54,7 +54,7 @@
-
+
\ No newline at end of file
+
diff --git a/src/renderer/src/views/profile/userInfo.vue b/src/renderer/src/views/profile/userInfo.vue
index c560d39..808e344 100644
--- a/src/renderer/src/views/profile/userInfo.vue
+++ b/src/renderer/src/views/profile/userInfo.vue
@@ -11,16 +11,16 @@
- 男
- 女
+ 男
+ 女
-
- {{
- item.itemtitle
- }}
+
+
+ {{item.itemtitle }}
+
@@ -29,7 +29,7 @@
-
+
\ No newline at end of file
+