Merge branch 'main' into dev

This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-11-26 10:47:28 +08:00
8 changed files with 153 additions and 158 deletions

2
.gitignore vendored
View File

@@ -6,7 +6,7 @@ yarn-debug.log*
yarn-error.log* yarn-error.log*
lerna-debug.log* lerna-debug.log*
.pnpm-debug.log* .pnpm-debug.log*
.pnpm-lock.yaml
# Diagnostic reports (https://nodejs.org/api/report.html) # Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

View File

@@ -12,39 +12,34 @@
log-lottery是一个可配置可定制化的抽奖应用炫酷3D球体可用于年会抽奖等活动支持奖品、人员、界面、图片音乐配置。 log-lottery是一个可配置可定制化的抽奖应用炫酷3D球体可用于年会抽奖等活动支持奖品、人员、界面、图片音乐配置。
> 因原域名到期,现将原域名 (https://24years.top/log-lottery) > 因原域名到期,现将原域名 (<https://24years.top/log-lottery>)
迁移到 (https://1kw20.fun/log-lottery) 。 迁移到 (<https://1kw20.fun/log-lottery>) 。
如果进入到新域名遇到图片无法访问的情况,请到【全局配置】-【界面配置】菜单中点击【重置所有数据】按钮进行更新 如果进入到新域名遇到图片无法访问的情况,请到【全局配置】-【界面配置】菜单中点击【重置所有数据】按钮进行更新
## 要求 ## 要求
使用PC端最新版Chrome或Edge浏览器。 使用PC端最新版Chrome或Edge浏览器。
访问地址: 访问地址:
https://1kw20.fun/log-lottery <https://1kw20.fun/log-lottery>
or or
https://log1997.github.io/log-lottery/ <https://log1997.github.io/log-lottery/>
## 功能描述
- 🕍 炫酷3D球体年会抽奖必备开箱即用
- 🧿 持久化存储,数据不丢失
- 🎁 奖品奖项配置
- 👱 抽奖名单设置管理
- 🛞 界面信息自定义
- 🎼 播放背景音乐
- 💾 图片、背景音乐管理,使用本地存储,有默认资源可直接使用
- 🖼️ excel表格导入人员名单、抽奖结果使用excel导出
- 🎈 可增加临时抽奖
## TODO ## TODO
- [x] 🕍 炫酷3D球体年会抽奖必备开箱即用
- [x] 💾 本地持久化存储
- [x] 🎁 奖品奖项配置
- [x] 👱 抽奖名单设置管理
- [x] 🎼 播放背景音乐
- [x] 🖼️ excel表格导入人员名单、抽奖结果使用excel导出
- [x] 🎈 可增加临时抽奖
- [x] 🧨 国际化多语言
- [ ] 添加docker构建部署和镜像 - [ ] 添加docker构建部署和镜像
- [ ] 国际化多语言 - [ ] 更换背景图片
... ...
需要更多功能请留言 需要更多功能请留言
@@ -124,7 +119,7 @@ pnpm dev
pnpm build pnpm build
``` ```
> 项目思路来源于 https://github.com/moshang-xc/lottery > 项目思路来源于 <https://github.com/moshang-xc/lottery>
## License ## License

View File

@@ -16,23 +16,23 @@
}, },
"dependencies": { "dependencies": {
"@tweenjs/tween.js": "^23.1.2", "@tweenjs/tween.js": "^23.1.2",
"@vueuse/core": "^10.11.0", "@vueuse/core": "^11.3.0",
"axios": "^1.7.2", "axios": "^1.7.8",
"canvas-confetti": "^1.9.3", "canvas-confetti": "^1.9.3",
"dayjs": "^1.11.11", "dayjs": "^1.11.13",
"github-markdown-css": "^5.6.1", "github-markdown-css": "^5.8.0",
"localforage": "^1.10.0", "localforage": "^1.10.0",
"markdown-it": "^14.1.0", "markdown-it": "^14.1.0",
"pinia": "^2.1.7", "pinia": "^2.2.6",
"pinia-plugin-persist": "^1.0.0", "pinia-plugin-persist": "^1.0.0",
"sparticles": "^1.3.1", "sparticles": "^1.3.1",
"theme-change": "^2.5.0", "theme-change": "^2.5.0",
"three": "^0.166.0", "three": "^0.166.0",
"three-css3d": "^1.0.6", "three-css3d": "^1.0.6",
"vue": "^3.4.31", "vue": "^3.5.13",
"vue-dompurify-html": "^5.1.0", "vue-dompurify-html": "^5.2.0",
"vue-i18n": "^10.0.4", "vue-i18n": "^10.0.4",
"vue-router": "^4.4.0", "vue-router": "^4.5.0",
"vue-toast-notification": "^3", "vue-toast-notification": "^3",
"vue3-colorpicker": "^2.3.0", "vue3-colorpicker": "^2.3.0",
"xlsx": "^0.18.5", "xlsx": "^0.18.5",
@@ -42,44 +42,44 @@
"@antfu/eslint-config": "^3.9.2", "@antfu/eslint-config": "^3.9.2",
"@eslint/eslintrc": "^3.2.0", "@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.15.0", "@eslint/js": "^9.15.0",
"@iconify-json/ep": "^1.1.15", "@iconify-json/ep": "^1.2.1",
"@iconify-json/fluent": "^1.1.58", "@iconify-json/fluent": "^1.2.8",
"@tailwindcss/typography": "^0.5.13", "@tailwindcss/typography": "^0.5.15",
"@testing-library/vue": "^8.1.0", "@testing-library/vue": "^8.1.0",
"@types/canvas-confetti": "^1.6.4", "@types/canvas-confetti": "^1.6.4",
"@types/markdown-it": "^14.1.1", "@types/markdown-it": "^14.1.2",
"@types/node": "^20.14.9", "@types/node": "^22.9.4",
"@types/three": "^0.166.0", "@types/three": "^0.166.0",
"@typescript-eslint/eslint-plugin": "^7.15.0", "@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^7.15.0", "@typescript-eslint/parser": "^8.16.0",
"@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue": "^5.2.0",
"@vitest/ui": "^1.6.0", "@vitest/ui": "^2.1.5",
"@vue/test-utils": "^2.4.6", "@vue/test-utils": "^2.4.6",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.20",
"daisyui": "^4.12.10", "daisyui": "^4.12.14",
"eslint": "^9.6.0", "eslint": "^9.15.0",
"eslint-plugin-vue": "^9.26.0", "eslint-plugin-vue": "^9.31.0",
"globals": "^15.12.0", "globals": "^15.12.0",
"happy-dom": "^14.12.3", "happy-dom": "^15.11.6",
"husky": "^9.0.11", "husky": "^9.1.7",
"jsdom": "^24.1.0", "jsdom": "^25.0.1",
"path": "^0.12.7", "path": "^0.12.7",
"postcss": "^8.4.39", "postcss": "^8.4.49",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.77.6", "sass": "^1.81.0",
"sass-loader": "^14.2.1", "sass-loader": "^16.0.3",
"tailwindcss": "^3.4.4", "tailwindcss": "^3.4.15",
"terser": "^5.31.1", "terser": "^5.36.0",
"typescript": "^5.5.3", "typescript": "5.5.3",
"unplugin-auto-import": "^0.17.6", "unplugin-auto-import": "^0.18.5",
"unplugin-icons": "^0.19.0", "unplugin-icons": "^0.20.1",
"unplugin-vue-components": "^0.27.2", "unplugin-vue-components": "^0.27.4",
"vite": "^5.3.2", "vite": "^5.4.11",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-inspect": "^0.8.4", "vite-plugin-inspect": "^0.8.8",
"vite-plugin-svg-icons": "^2.0.1", "vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-vue-devtools": "^7.3.5", "vite-plugin-vue-devtools": "^7.6.4",
"vitest": "^1.6.0", "vitest": "^2.1.5",
"vue-tsc": "^2.0.24" "vue-tsc": "^2.1.10"
} }
} }

View File

@@ -3,6 +3,7 @@
// @ts-nocheck // @ts-nocheck
// noinspection JSUnusedGlobalSymbols // noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import // Generated by unplugin-auto-import
// biome-ignore lint: disable
export {} export {}
declare global { declare global {

View File

@@ -45,7 +45,6 @@ function addCount() {
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
// @import "@/style/global.scss";
.read-the-docs { .read-the-docs {
color: #888; color: #888;
} }

View File

@@ -233,7 +233,7 @@ watch(() => prizeList.value, (val: IPrizeConfig[]) => {
<span class="label-text">{{ t('table.image') }}</span> <span class="label-text">{{ t('table.image') }}</span>
</div> </div>
<select v-model="item.picture" class="w-full max-w-xs select select-warning select-sm"> <select v-model="item.picture" class="w-full max-w-xs select select-warning select-sm">
<option v-if="item.picture.id" :value="{ id: '', name: '', url: '' }"><span></span></option> <option v-if="item.picture.id" :value="{ id: '', name: '', url: '' }"></option>
<option disabled selected>{{ t('table.selectPicture') }}</option> <option disabled selected>{{ t('table.selectPicture') }}</option>
<option v-for="picItem in localImageList" :key="picItem.id" :value="picItem">{{ picItem.name }} <option v-for="picItem in localImageList" :key="picItem.id" :value="picItem">{{ picItem.name }}
</option> </option>

View File

@@ -172,7 +172,7 @@ onMounted(() => {
<span class="label-text">{{ t('table.image') }}</span> <span class="label-text">{{ t('table.image') }}</span>
</div> </div>
<select v-model="temporaryPrize.picture" class="flex-1 w-12 select select-warning select-sm"> <select v-model="temporaryPrize.picture" class="flex-1 w-12 select select-warning select-sm">
<option v-if="temporaryPrize.picture.id" :value="{ id: '', name: '', url: '' }"><span></span> <option v-if="temporaryPrize.picture.id" :value="{ id: '', name: '', url: '' }">
</option> </option>
<option disabled selected>{{ t('table.selectPicture') }}</option> <option disabled selected>{{ t('table.selectPicture') }}</option>
<option v-for="picItem in localImageList" :key="picItem.id" class="w-auto" :value="picItem">{{ <option v-for="picItem in localImageList" :key="picItem.id" class="w-auto" :value="picItem">{{

View File

@@ -72,7 +72,7 @@ export default defineConfig(({ mode }) => {
css: { css: {
preprocessorOptions: { preprocessorOptions: {
scss: { scss: {
additionalData: '@import "@/style/global.scss";', additionalData: '@use "@/style/global.scss" as *;',
}, },
}, },
// postcss: { // postcss: {
@@ -91,7 +91,7 @@ export default defineConfig(({ mode }) => {
// 是否跨域 // 是否跨域
changeOrigin: true, changeOrigin: true,
// 路径重写 // 路径重写
rewrite: path => path.replace(/^\/api/, ''), rewrite: (path) => path.replace(/^\/api/, ''),
}, },
}, },
}, },
@@ -104,7 +104,7 @@ export default defineConfig(({ mode }) => {
minify: 'terser', minify: 'terser',
terserOptions: { terserOptions: {
compress: { compress: {
// 生产环境时移除console //生产环境时移除console
drop_console: true, drop_console: true,
drop_debugger: true, drop_debugger: true,
}, },
@@ -124,7 +124,7 @@ export default defineConfig(({ mode }) => {
.toString() .toString()
.split('node_modules/')[1] .split('node_modules/')[1]
.split('/')[0] .split('/')[0]
.toString() .toString();
} }
}, },
}, },
@@ -140,5 +140,5 @@ export default defineConfig(({ mode }) => {
web: [/\.[jt]sx$/], web: [/\.[jt]sx$/],
}, },
}, },
} };
}) });