Compare commits

1 Commits

Author SHA1 Message Date
邹进
e11af80a18 ci: 测试环境改由 iteration/8-11 分支部署,对接后端 Iteration/8-11
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Failing after 56m12s
2026-11-06 22:18:29 +09:00
7 changed files with 6 additions and 20 deletions

View File

@@ -1,8 +1,9 @@
name: 构建并部署前端到生产环境
name: 构建并部署前端到测试环境
on:
push:
branches:
- iteration/8-11
- dev
- test
@@ -26,7 +27,7 @@ jobs:
- name: 设置镜像标签
id: tag
run: |
if [ "${{ github.ref }}" = "refs/heads/iteration/august" ]; then
if [ "${{ github.ref }}" = "refs/heads/iteration/8-11" ]; then
echo "tag=latest" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/dev" ]; then
echo "tag=dev" >> $GITHUB_OUTPUT
@@ -50,8 +51,8 @@ jobs:
docker push ${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.tag }}
docker push ${{ env.IMAGE_NAME }}:${{ github.sha }}
- name: 部署到本地(仅 iteration/august 分支)
if: github.ref == 'refs/heads/iteration/august'
- name: 部署到测试环境(仅 iteration/8-11 分支)
if: github.ref == 'refs/heads/iteration/8-11'
run: |
mkdir -p ${{ env.DEPLOY_DIR }}

3
env/.env vendored
View File

@@ -7,9 +7,6 @@ VITE_APP_ENV=development
# 接口地址
VITE_API_BASE_URL=https://cmp-api.boss160.cn
# 管理后台地址(代理分销码注册页所在站点)
VITE_ADMIN_BASE_URL=https://cmp-admin.boss160.cn
# 端口号
VITE_APP_PORT=9527

View File

@@ -4,9 +4,6 @@ VITE_APP_ENV=development
# 接口地址
VITE_API_BASE_URL=https://cmp-api.boss160.cn
# 管理后台地址(代理分销码注册页所在站点)
VITE_ADMIN_BASE_URL=https://cmp-admin.boss160.cn
# 是否使用代理 (H5开发环境使用代理解决跨域)
VITE_APP_PROXY=true

3
env/.env.production vendored
View File

@@ -4,9 +4,6 @@ VITE_APP_ENV=production
# 接口地址
VITE_API_BASE_URL=https://cmp-api.xm-iot.cn
# 管理后台地址(代理分销码注册页所在站点)
VITE_ADMIN_BASE_URL=https://cmp-admin.xm-iot.cn
# 是否使用代理 (生产环境不使用代理)
VITE_APP_PROXY=false

3
env/.env.test vendored
View File

@@ -4,9 +4,6 @@ VITE_APP_ENV=staging
# 接口地址
VITE_API_BASE_URL=https://cmp-api.boss160.cn
# 管理后台地址(代理分销码注册页所在站点)
VITE_ADMIN_BASE_URL=https://cmp-admin.boss160.cn
# 是否使用代理 (测试环境不使用代理)
VITE_APP_PROXY=false

View File

@@ -52,8 +52,7 @@ const distributionCode = ref('');
const errorMessage = ref('');
function getRegistrationUrl(code: string) {
const adminBaseUrl = (import.meta.env.VITE_ADMIN_BASE_URL || '').replace(/\/+$/, '');
return `${adminBaseUrl}/agent-registration#/agent-registration?distribution_code=${encodeURIComponent(code)}`;
return `https://cmp-admin.boss160.cn/agent-registration#/agent-registration?distribution_code=${encodeURIComponent(code)}`;
}
function drawQrCode(value: string) {

2
types/env.d.ts vendored
View File

@@ -5,8 +5,6 @@ interface ImportMetaEnv {
VITE_APP_ENV: string;
/** 接口地址 */
VITE_API_BASE_URL: string;
/** 管理后台地址(代理分销码注册页所在站点) */
VITE_ADMIN_BASE_URL: string;
/** 端口号 */
VITE_APP_PORT: string;
/** h5是否需要配置代理 */