mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2026-01-13 06:03:51 +08:00
feat 拆分商户和管理端配置
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
# 名称
|
||||||
|
VITE_GLOB_APP_TITLE=DaxPay运营管理端
|
||||||
|
|
||||||
# 发布路径
|
# 发布路径
|
||||||
VITE_PUBLIC_PATH=/
|
VITE_PUBLIC_PATH=/
|
||||||
@@ -10,3 +12,6 @@ VITE_GLOB_API_URL_PREFIX =
|
|||||||
|
|
||||||
# 终端类型
|
# 终端类型
|
||||||
VITE_GLOB_APP_CLIENT=dax-pay
|
VITE_GLOB_APP_CLIENT=dax-pay
|
||||||
|
|
||||||
|
# 超时时间
|
||||||
|
VITE_GLOB_API_TIMEOUT=30000
|
||||||
18
.env.analyze
18
.env.analyze
@@ -1,18 +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 = 'none'
|
|
||||||
|
|
||||||
|
|
||||||
# Basic interface address SPA
|
|
||||||
VITE_GLOB_API_URL = /basic-api
|
|
||||||
|
|
||||||
|
|
||||||
# Interface prefix
|
|
||||||
VITE_GLOB_API_URL_PREFIX =
|
|
||||||
|
|
||||||
VITE_ENABLE_ANALYZE = true
|
|
||||||
17
.env.docker
17
.env.docker
@@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
# public path
|
|
||||||
VITE_PUBLIC_PATH = /
|
|
||||||
|
|
||||||
# timeout(seconds)
|
|
||||||
VITE_TIMEOUT = 15
|
|
||||||
# Delete console
|
|
||||||
VITE_DROP_CONSOLE = true
|
|
||||||
|
|
||||||
# Whether to enable gzip or brotli compression
|
|
||||||
# Optional: gzip | brotli | none
|
|
||||||
# If you need multiple forms, you can use `,` to separate
|
|
||||||
VITE_BUILD_COMPRESS = 'none'
|
|
||||||
VITE_GLOB_API_URL = "__vg_base_url"
|
|
||||||
|
|
||||||
# Interface prefix
|
|
||||||
VITE_GLOB_API_URL_PREFIX =
|
|
||||||
17
.env.merchant
Normal file
17
.env.merchant
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# 名称
|
||||||
|
VITE_GLOB_APP_TITLE=DaxPay商户管理端
|
||||||
|
|
||||||
|
# 发布路径
|
||||||
|
VITE_PUBLIC_PATH=/
|
||||||
|
|
||||||
|
# 接口地址
|
||||||
|
VITE_GLOB_API_URL=/server
|
||||||
|
|
||||||
|
# 接口前缀
|
||||||
|
VITE_GLOB_API_URL_PREFIX =
|
||||||
|
|
||||||
|
# 终端类型
|
||||||
|
VITE_GLOB_APP_CLIENT=dax-pay
|
||||||
|
|
||||||
|
# 超时时间
|
||||||
|
VITE_GLOB_API_TIMEOUT=30000
|
||||||
16
.env.test
16
.env.test
@@ -1,16 +0,0 @@
|
|||||||
NODE_ENV = production
|
|
||||||
|
|
||||||
# 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 = 'none'
|
|
||||||
|
|
||||||
# Basic interface address SPA
|
|
||||||
VITE_GLOB_API_URL = /basic-api
|
|
||||||
|
|
||||||
|
|
||||||
# Interface prefix
|
|
||||||
VITE_GLOB_API_URL_PREFIX =
|
|
||||||
@@ -14,3 +14,4 @@ dist
|
|||||||
/bin
|
/bin
|
||||||
Dockerfile
|
Dockerfile
|
||||||
package.json
|
package.json
|
||||||
|
*.less
|
||||||
|
|||||||
25
Dockerfile
25
Dockerfile
@@ -1,25 +0,0 @@
|
|||||||
# node 构建
|
|
||||||
FROM node:18-alpine as build-stage
|
|
||||||
# 署名
|
|
||||||
MAINTAINER Adoin 'adoin@qq.com'
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . ./
|
|
||||||
# 设置 node 阿里镜像
|
|
||||||
RUN npm config set registry https://registry.npmmirror.com
|
|
||||||
# 设置--max-old-space-size
|
|
||||||
ENV NODE_OPTIONS=--max-old-space-size=16384
|
|
||||||
# 设置阿里镜像、pnpm、依赖、编译
|
|
||||||
RUN npm install pnpm -g && \
|
|
||||||
pnpm install --frozen-lockfile && \
|
|
||||||
pnpm build:docker
|
|
||||||
# node部分结束
|
|
||||||
RUN echo "🎉 编 🎉 译 🎉 成 🎉 功 🎉"
|
|
||||||
# nginx 部署
|
|
||||||
FROM nginx:1.23.3-alpine as production-stage
|
|
||||||
COPY --from=build-stage /app/dist /usr/share/nginx/html/dist
|
|
||||||
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
|
|
||||||
EXPOSE 80
|
|
||||||
## 将/usr/share/nginx/html/dist/assets/index.js 和/usr/share/nginx/html/dist/_app.config.js中的"$vg_base_url"替换为环境变量中的VG_BASE_URL,$vg_sub_domain 替换成VG_SUB_DOMAIN,$vg_default_user替换成VG_DEFAULT_USER,$vg_default_password替换成VG_DEFAULT_PASSWORD 而后启动nginx
|
|
||||||
CMD sed -i "s|__vg_base_url|$VG_BASE_URL|g" /usr/share/nginx/html/dist/assets/entry/index-*.js /usr/share/nginx/html/dist/_app.config.js && \
|
|
||||||
nginx -g 'daemon off;'
|
|
||||||
RUN echo "🎉 架 🎉 设 🎉 成 🎉 功 🎉"
|
|
||||||
58
package.json
58
package.json
@@ -18,13 +18,11 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "pnpm install",
|
"bootstrap": "pnpm install",
|
||||||
"build": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build",
|
"build:analyze": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode admin",
|
||||||
"build:analyze": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode analyze",
|
"build:admin": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode admin",
|
||||||
"build:docker": "vite build --mode docker",
|
"build:merchant": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode merchant",
|
||||||
"build:no-cache": "pnpm store prune && npm run build",
|
"dev:admin": "pnpm vite --mode admin",
|
||||||
"build:test": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode test",
|
"dev:merchant": "pnpm vite --mode merchant",
|
||||||
"commit": "czg",
|
|
||||||
"dev": "pnpm vite",
|
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"postinstall": "turbo run stub",
|
"postinstall": "turbo run stub",
|
||||||
"lint": "turbo run lint",
|
"lint": "turbo run lint",
|
||||||
@@ -71,39 +69,39 @@
|
|||||||
"@ant-design/icons-vue": "^7.0.1",
|
"@ant-design/icons-vue": "^7.0.1",
|
||||||
"@iconify/iconify": "^3.1.1",
|
"@iconify/iconify": "^3.1.1",
|
||||||
"@vben/hooks": "workspace:*",
|
"@vben/hooks": "workspace:*",
|
||||||
"@vue/shared": "^3.4.25",
|
"@vue/shared": "^3.4.31",
|
||||||
"@vueuse/core": "^10.9.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"@zxcvbn-ts/core": "^3.0.4",
|
"@zxcvbn-ts/core": "^3.0.4",
|
||||||
"ant-design-vue": "^4.2.1",
|
"ant-design-vue": "^4.2.3",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.7.2",
|
||||||
"codemirror": "^5.65.16",
|
"codemirror": "^5.65.16",
|
||||||
"cropperjs": "^1.6.2",
|
"cropperjs": "^1.6.2",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.11",
|
||||||
"echarts": "^5.5.0",
|
"echarts": "^5.5.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"path-to-regexp": "^6.2.2",
|
"path-to-regexp": "^6.2.2",
|
||||||
"pinia": "2.1.7",
|
"pinia": "2.1.7",
|
||||||
"pinia-plugin-persistedstate": "^3.2.1",
|
"pinia-plugin-persistedstate": "^3.2.1",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3",
|
||||||
"qs": "^6.12.1",
|
"qs": "^6.12.2",
|
||||||
"resize-observer-polyfill": "^1.5.1",
|
"resize-observer-polyfill": "^1.5.1",
|
||||||
"showdown": "^2.1.0",
|
"showdown": "^2.1.0",
|
||||||
"sortablejs": "^1.15.2",
|
"sortablejs": "^1.15.2",
|
||||||
"unocss": "^0.59.4",
|
"unocss": "^0.59.4",
|
||||||
"vue": "^3.4.25",
|
"vue": "^3.4.31",
|
||||||
"vue-json-pretty": "^2.4.0",
|
"vue-json-pretty": "^2.4.0",
|
||||||
"vue-router": "^4.3.2",
|
"vue-router": "^4.4.0",
|
||||||
"vue-types": "^5.1.1",
|
"vue-types": "^5.1.2",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"vxe-table": "^4.7.31",
|
"vxe-table": "^4.7.40",
|
||||||
"xe-utils": "^3.5.28"
|
"xe-utils": "^3.5.28"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.3.0",
|
"@commitlint/cli": "^19.3.0",
|
||||||
"@commitlint/config-conventional": "^19.2.2",
|
"@commitlint/config-conventional": "^19.2.2",
|
||||||
"@iconify/json": "^2.2.203",
|
"@iconify/json": "^2.2.224",
|
||||||
"@purge-icons/generated": "^0.10.0",
|
"@purge-icons/generated": "^0.10.0",
|
||||||
"@types/codemirror": "^5.60.15",
|
"@types/codemirror": "^5.60.15",
|
||||||
"@types/crypto-js": "^4.2.2",
|
"@types/crypto-js": "^4.2.2",
|
||||||
@@ -118,22 +116,22 @@
|
|||||||
"@vben/ts-config": "workspace:*",
|
"@vben/ts-config": "workspace:*",
|
||||||
"@vben/types": "workspace:*",
|
"@vben/types": "workspace:*",
|
||||||
"@vben/vite-config": "workspace:*",
|
"@vben/vite-config": "workspace:*",
|
||||||
"@vue/compiler-sfc": "^3.4.25",
|
"@vue/compiler-sfc": "^3.4.31",
|
||||||
"@vue/test-utils": "^2.4.5",
|
"@vue/test-utils": "^2.4.6",
|
||||||
"conventional-changelog-cli": "^4.1.0",
|
"conventional-changelog-cli": "^4.1.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cz-git": "^1.9.1",
|
"cz-git": "^1.9.3",
|
||||||
"czg": "^1.9.1",
|
"czg": "^1.9.3",
|
||||||
"lint-staged": "15.2.2",
|
"lint-staged": "15.2.2",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.3.2",
|
||||||
"prettier-plugin-packagejson": "^2.5.0",
|
"prettier-plugin-packagejson": "^2.5.0",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.7",
|
||||||
"turbo": "^1.13.2",
|
"turbo": "^1.13.4",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.5.3",
|
||||||
"unbuild": "^2.0.0",
|
"unbuild": "^2.0.0",
|
||||||
"vite": "^5.2.10",
|
"vite": "^5.3.2",
|
||||||
"vite-plugin-vue-devtools": "^7.2.0",
|
"vite-plugin-vue-devtools": "^7.3.5",
|
||||||
"vue-tsc": "^2.0.14"
|
"vue-tsc": "^2.0.24"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.0.4",
|
"packageManager": "pnpm@9.0.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
2857
pnpm-lock.yaml
generated
2857
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -11,20 +11,21 @@ export default defineApplicationConfig({
|
|||||||
'qrcode',
|
'qrcode',
|
||||||
'@iconify/iconify',
|
'@iconify/iconify',
|
||||||
'ant-design-vue/es/locale/zh_CN',
|
'ant-design-vue/es/locale/zh_CN',
|
||||||
'ant-design-vue/es/locale/en_US',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/basic-api': {
|
// 运营管理端
|
||||||
target: 'http://localhost:3000',
|
'/admin': {
|
||||||
|
target: 'http://localhost:9000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
ws: true,
|
ws: true,
|
||||||
rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
|
rewrite: (path) => path.replace(new RegExp(`^/server`), ''),
|
||||||
// only https
|
// only https
|
||||||
// secure: false
|
// secure: false
|
||||||
},
|
},
|
||||||
'/server': {
|
// 商户端
|
||||||
|
'/merchant': {
|
||||||
target: 'http://localhost:9000',
|
target: 'http://localhost:9000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
ws: true,
|
ws: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user