永川2打包

This commit is contained in:
朱浩 2024-12-10 10:08:18 +08:00
parent 519565f463
commit c093fbfd6a
5 changed files with 35 additions and 5 deletions

21
.env.yc2 Normal file
View File

@ -0,0 +1,21 @@
# 页面标题
VITE_APP_TITLE = 实训教学
# 生产环境配置
VITE_APP_ENV = 'production'
# AIx融合数字管理系统/生产环境
VITE_APP_BASE_API = 'https://prev.ysaix.com:7868/prod-api'
VITE_APP_DOMAIN = 'prev.ysaix.com'
VITE_APP_UPLOAD_API = 'https://prev.ysaix.com:7868/prod-api'
# 是否在打包时开启压缩,支持 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/'
VITE_SHOW_DEV_TOOLS = 'false'

View File

@ -17,6 +17,7 @@
"build:test": "electron-vite build --mode test && 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:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml",
"build:yc": "electron-vite build --mode yc && electron-builder --win --config ./electron-builder-yc.yml", "build:yc": "electron-vite build --mode yc && electron-builder --win --config ./electron-builder-yc.yml",
"build:yc2": "electron-vite build --mode yc2 && electron-builder --win --config ./electron-builder-yc.yml",
"build:mac": "electron-vite build --mode production && electron-builder --mac --config ./electron-builder-prod.yml", "build:mac": "electron-vite build --mode production && electron-builder --mac --config ./electron-builder-prod.yml",
"build:linux": "npm run build && electron-builder --linux" "build:linux": "npm run build && electron-builder --linux"
}, },

View File

@ -46,7 +46,7 @@ if(!gotTheLock){
function createLoginWindow() { function createLoginWindow() {
if (loginWindow) return if (loginWindow) return
loginWindow = new BrowserWindow({ loginWindow = new BrowserWindow({
width: import.meta.env.MODE==='yc'?1160:888, width: import.meta.env.MODE==='yc'||import.meta.env.MODE==='yc2'?1160:888,
height: 520, height: 520,
show: false, show: false,
frame: false, frame: false,

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

View File

@ -1,13 +1,13 @@
<template> <template>
<div class="login-container"> <div class="login-container">
<div class="login-yc"> <div class="login-yc">
<img class="welcome-img" :src="leftBg1" /> <img class="welcome-img" :src="buildMode === 'yc2?'?leftBg2:leftBg1" />
</div> </div>
<div class="box-item login"> <div class="box-item login">
<WindowTools :is-has-max="false" /> <WindowTools :is-has-max="false" />
<div style="display: flex;justify-content: center;"><img class="title-logo" :src="yclogo" /></div> <div style="display: flex;justify-content: center;"><img class="title-logo" :src="yclogo" /></div>
<div class="login-title">永川中小学</div> <div class="login-title">永川中小学</div>
<div class="login-title2">人工智能赋能科学素养与劳动技能系统</div> <div class="login-title2">{{buildMode === 'yc2?'?'重庆永川虚拟仿真AI实训教学管理系统':'人工智能赋能科学素养与劳动技能系统'}}</div>
<el-form ref="formRef" class="login-form" :model="loginForm" :rules="rules" size="large"> <el-form ref="formRef" class="login-form" :model="loginForm" :rules="rules" size="large">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model.trim="loginForm.username" placeholder="请输入用户名" /> <el-input v-model.trim="loginForm.username" placeholder="请输入用户名" />
@ -51,11 +51,12 @@ import { encrypt, decrypt } from '@/utils/jsencrypt'
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
import yclogo from '@/assets/images/login/yc-logo.png' import yclogo from '@/assets/images/login/yc-logo.png'
import leftBg1 from '@/assets/images/login/ycpeitu.png' import leftBg1 from '@/assets/images/login/ycpeitu.png'
import leftBg2 from '@/assets/images/login/ycpeitu2.jpg'
import WindowTools from '@/components/window-tools/index.vue' import WindowTools from '@/components/window-tools/index.vue'
import SelectSubject from '@/components/select-subject/index.vue' import SelectSubject from '@/components/select-subject/index.vue'
import Register from './components/Register.vue' import Register from './components/Register.vue'
import { sessionStore } from '@/utils/store' import { sessionStore } from '@/utils/store'
const buildMode = import.meta.env.MODE
const { session } = require('@electron/remote') const { session } = require('@electron/remote')
const downloadProp = ref(0) const downloadProp = ref(0)
const showDownLoading = ref(false) const showDownLoading = ref(false)
@ -171,7 +172,14 @@ onMounted(() => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
-webkit-app-region: drag; -webkit-app-region: drag;
.login-yc{
width: 100%;
height: 100%;
img{
width: 100%;
height: 100%;
}
}
.box-item { .box-item {
width: 444px; width: 444px;
height: 520px; height: 520px;