Compare commits
2 Commits
e11af80a18
...
iteration/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c911e9b1a8 | ||
|
|
ca064f2ee6 |
@@ -3,7 +3,6 @@ name: 构建并部署前端到生产环境
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- iteration/august
|
|
||||||
- dev
|
- dev
|
||||||
- test
|
- test
|
||||||
|
|
||||||
|
|||||||
3
env/.env
vendored
3
env/.env
vendored
@@ -7,6 +7,9 @@ VITE_APP_ENV=development
|
|||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_BASE_URL=https://cmp-api.boss160.cn
|
VITE_API_BASE_URL=https://cmp-api.boss160.cn
|
||||||
|
|
||||||
|
# 管理后台地址(代理分销码注册页所在站点)
|
||||||
|
VITE_ADMIN_BASE_URL=https://cmp-admin.boss160.cn
|
||||||
|
|
||||||
# 端口号
|
# 端口号
|
||||||
VITE_APP_PORT=9527
|
VITE_APP_PORT=9527
|
||||||
|
|
||||||
|
|||||||
3
env/.env.development
vendored
3
env/.env.development
vendored
@@ -4,6 +4,9 @@ VITE_APP_ENV=development
|
|||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_BASE_URL=https://cmp-api.boss160.cn
|
VITE_API_BASE_URL=https://cmp-api.boss160.cn
|
||||||
|
|
||||||
|
# 管理后台地址(代理分销码注册页所在站点)
|
||||||
|
VITE_ADMIN_BASE_URL=https://cmp-admin.boss160.cn
|
||||||
|
|
||||||
# 是否使用代理 (H5开发环境使用代理解决跨域)
|
# 是否使用代理 (H5开发环境使用代理解决跨域)
|
||||||
VITE_APP_PROXY=true
|
VITE_APP_PROXY=true
|
||||||
|
|
||||||
|
|||||||
3
env/.env.production
vendored
3
env/.env.production
vendored
@@ -4,6 +4,9 @@ VITE_APP_ENV=production
|
|||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_BASE_URL=https://cmp-api.xm-iot.cn
|
VITE_API_BASE_URL=https://cmp-api.xm-iot.cn
|
||||||
|
|
||||||
|
# 管理后台地址(代理分销码注册页所在站点)
|
||||||
|
VITE_ADMIN_BASE_URL=https://cmp-admin.xm-iot.cn
|
||||||
|
|
||||||
# 是否使用代理 (生产环境不使用代理)
|
# 是否使用代理 (生产环境不使用代理)
|
||||||
VITE_APP_PROXY=false
|
VITE_APP_PROXY=false
|
||||||
|
|
||||||
|
|||||||
3
env/.env.test
vendored
3
env/.env.test
vendored
@@ -4,6 +4,9 @@ VITE_APP_ENV=staging
|
|||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_BASE_URL=https://cmp-api.boss160.cn
|
VITE_API_BASE_URL=https://cmp-api.boss160.cn
|
||||||
|
|
||||||
|
# 管理后台地址(代理分销码注册页所在站点)
|
||||||
|
VITE_ADMIN_BASE_URL=https://cmp-admin.boss160.cn
|
||||||
|
|
||||||
# 是否使用代理 (测试环境不使用代理)
|
# 是否使用代理 (测试环境不使用代理)
|
||||||
VITE_APP_PROXY=false
|
VITE_APP_PROXY=false
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ const distributionCode = ref('');
|
|||||||
const errorMessage = ref('');
|
const errorMessage = ref('');
|
||||||
|
|
||||||
function getRegistrationUrl(code: string) {
|
function getRegistrationUrl(code: string) {
|
||||||
return `https://cmp-admin.boss160.cn/agent-registration#/agent-registration?distribution_code=${encodeURIComponent(code)}`;
|
const adminBaseUrl = (import.meta.env.VITE_ADMIN_BASE_URL || '').replace(/\/+$/, '');
|
||||||
|
return `${adminBaseUrl}/agent-registration#/agent-registration?distribution_code=${encodeURIComponent(code)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawQrCode(value: string) {
|
function drawQrCode(value: string) {
|
||||||
|
|||||||
2
types/env.d.ts
vendored
2
types/env.d.ts
vendored
@@ -5,6 +5,8 @@ interface ImportMetaEnv {
|
|||||||
VITE_APP_ENV: string;
|
VITE_APP_ENV: string;
|
||||||
/** 接口地址 */
|
/** 接口地址 */
|
||||||
VITE_API_BASE_URL: string;
|
VITE_API_BASE_URL: string;
|
||||||
|
/** 管理后台地址(代理分销码注册页所在站点) */
|
||||||
|
VITE_ADMIN_BASE_URL: string;
|
||||||
/** 端口号 */
|
/** 端口号 */
|
||||||
VITE_APP_PORT: string;
|
VITE_APP_PORT: string;
|
||||||
/** h5是否需要配置代理 */
|
/** h5是否需要配置代理 */
|
||||||
|
|||||||
Reference in New Issue
Block a user