From 86abf23d48aa096a85d59f1fa100521be4535ea5 Mon Sep 17 00:00:00 2001 From: DaxPay Date: Wed, 3 Jul 2024 20:53:17 +0800 Subject: [PATCH] =?UTF-8?q?build=20=E8=B0=83=E8=AF=95=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 - .env.admin | 9 +- .env.merchant | 7 +- .env.production | 15 -- internal/vite-config/src/plugins/index.ts | 2 +- internal/vite-config/src/utils/env.ts | 7 +- package.json | 22 +-- src/layouts/default/footer/index.vue | 14 +- src/locales/helper.ts | 37 ---- .../lang/zh-CN/antdLocale/DatePicker.json | 19 -- src/locales/lang/zh-CN/common.json | 20 --- src/locales/lang/zh-CN/component.json | 123 ------------- src/locales/lang/zh-CN/layout.json | 96 ----------- src/locales/lang/zh-CN/routes/basic.json | 4 - src/locales/lang/zh-CN/routes/dashboard.json | 6 - src/locales/lang/zh-CN/routes/demo.json | 162 ------------------ src/locales/lang/zh-CN/sys.json | 80 --------- src/locales/lang/zh_CN.ts | 18 -- types/config.d.ts | 4 + vite.config.ts | 8 +- 20 files changed, 29 insertions(+), 626 deletions(-) delete mode 100644 .env delete mode 100644 .env.production delete mode 100644 src/locales/helper.ts delete mode 100644 src/locales/lang/zh-CN/antdLocale/DatePicker.json delete mode 100644 src/locales/lang/zh-CN/common.json delete mode 100644 src/locales/lang/zh-CN/component.json delete mode 100644 src/locales/lang/zh-CN/layout.json delete mode 100644 src/locales/lang/zh-CN/routes/basic.json delete mode 100644 src/locales/lang/zh-CN/routes/dashboard.json delete mode 100644 src/locales/lang/zh-CN/routes/demo.json delete mode 100644 src/locales/lang/zh-CN/sys.json delete mode 100644 src/locales/lang/zh_CN.ts diff --git a/.env b/.env deleted file mode 100644 index 5b6fcbd1..00000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -# spa-title -VITE_GLOB_APP_TITLE = DaxPay多商户管理端 diff --git a/.env.admin b/.env.admin index f7446624..f54f91fa 100644 --- a/.env.admin +++ b/.env.admin @@ -1,17 +1,20 @@ # 名称 -VITE_GLOB_APP_TITLE=DaxPay运营管理端 +VITE_GLOB_APP_TITLE=DaxPay运营端 + +# 压缩方式 +VITE_BUILD_COMPRESS='gzip' # 发布路径 VITE_PUBLIC_PATH=/ # 接口地址 -VITE_GLOB_API_URL=/server +VITE_GLOB_API_URL=/admin # 接口前缀 VITE_GLOB_API_URL_PREFIX = # 终端类型 -VITE_GLOB_APP_CLIENT=dax-pay +VITE_GLOB_APP_CLIENT=admin # 超时时间 VITE_GLOB_API_TIMEOUT=30000 diff --git a/.env.merchant b/.env.merchant index f7cfcf70..696ebd2b 100644 --- a/.env.merchant +++ b/.env.merchant @@ -1,17 +1,20 @@ # 名称 VITE_GLOB_APP_TITLE=DaxPay商户管理端 +# 压缩方式 +VITE_BUILD_COMPRESS='gzip' + # 发布路径 VITE_PUBLIC_PATH=/ # 接口地址 -VITE_GLOB_API_URL=/server +VITE_GLOB_API_URL=/merchant # 接口前缀 VITE_GLOB_API_URL_PREFIX = # 终端类型 -VITE_GLOB_APP_CLIENT=dax-pay +VITE_GLOB_APP_CLIENT=merchant # 超时时间 VITE_GLOB_API_TIMEOUT=30000 diff --git a/.env.production b/.env.production deleted file mode 100644 index c252fd8c..00000000 --- a/.env.production +++ /dev/null @@ -1,15 +0,0 @@ - -# public path -VITE_PUBLIC_PATH = / - -# Whether to enable gzip or brotli compression -# Optional: gzip | brotli | none -# If you need multiple forms, you can use `,` to separate -VITE_BUILD_COMPRESS = 'gzip' - - -# Basic interface address SPA -VITE_GLOB_API_URL = /basic-api - -# Interface prefix -VITE_GLOB_API_URL_PREFIX = diff --git a/internal/vite-config/src/plugins/index.ts b/internal/vite-config/src/plugins/index.ts index 0dea375b..96664c92 100644 --- a/internal/vite-config/src/plugins/index.ts +++ b/internal/vite-config/src/plugins/index.ts @@ -25,7 +25,7 @@ async function createPlugins({ isBuild, root, compress, enableAnalyze }: Options const appConfigPlugin = await createAppConfigPlugin({ root, isBuild }) vitePlugins.push(appConfigPlugin) - vitePlugins.push(DevTools()) + vitePlugins.push(DevTools() as any) // vite-plugin-html vitePlugins.push(configHtmlPlugin({ isBuild })) diff --git a/internal/vite-config/src/utils/env.ts b/internal/vite-config/src/utils/env.ts index 3c9d2372..e18adbb6 100644 --- a/internal/vite-config/src/utils/env.ts +++ b/internal/vite-config/src/utils/env.ts @@ -10,11 +10,8 @@ function getConfFiles() { const script = process.env.npm_lifecycle_script as string const reg = new RegExp('--mode ([a-z_\\d]+)') const result = reg.exec(script) - if (result) { - const mode = result[1] - return ['.env', `.env.${mode}`] - } - return ['.env', '.env.production'] + const mode = result?.[1] + return [`.env.${mode}`] } /** diff --git a/package.json b/package.json index 8ab92b05..98889aac 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,14 @@ { - "name": "vben-admin", + "name": "daxpay-multi-ui", "version": "2.11.5", - "homepage": "https://github.com/vbenjs/vue-vben-admin", - "bugs": { - "url": "https://github.com/vbenjs/vue-vben-admin/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vbenjs/vue-vben-admin.git" - }, - "license": "MIT", - "author": { - "name": "vben", - "email": "anncwb@126.com", - "url": "https://github.com/anncwb" - }, + "homepage": "", + "license": "Apache License v2", "type": "module", "scripts": { "bootstrap": "pnpm install", "build:analyze": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode admin", - "build:admin": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode admin", - "build:merchant": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode merchant", + "build:admin": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode admin", + "build:merchant": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode merchant", "dev:admin": "pnpm vite --mode admin", "dev:merchant": "pnpm vite --mode merchant", "preinstall": "npx only-allow pnpm", diff --git a/src/layouts/default/footer/index.vue b/src/layouts/default/footer/index.vue index 027bf188..641ad0ac 100644 --- a/src/layouts/default/footer/index.vue +++ b/src/layouts/default/footer/index.vue @@ -1,24 +1,12 @@