|
|
@@ -6,7 +6,7 @@
|
|
|
*
|
|
|
* 微信公众平台须为对应环境配置 request / 业务域名(HTTPS)
|
|
|
*/
|
|
|
-export const APP_ENV = 'prod' // 'local' | 'test' | 'prod'
|
|
|
+export const APP_ENV = 'local' // 'local' | 'test' | 'prod'
|
|
|
|
|
|
const ENV_PRESETS = {
|
|
|
local: {
|
|
|
@@ -53,3 +53,16 @@ export const MP_QRCODE_URL = '/static/mp-qrcode.png'
|
|
|
|
|
|
/** 绑定 H5 路径(相对 OA_H5_ORIGIN) */
|
|
|
export const MP_BIND_H5_PATH = '/oa-mp-bind/'
|
|
|
+
|
|
|
+/** 首页非生产环境色条描述(prod / 未知值不展示) */
|
|
|
+export function buildEnvBanner(appEnv) {
|
|
|
+ if (appEnv === 'local') {
|
|
|
+ return { show: true, label: '本地环境', tone: 'local' }
|
|
|
+ }
|
|
|
+ if (appEnv === 'test') {
|
|
|
+ return { show: true, label: '测试环境', tone: 'test' }
|
|
|
+ }
|
|
|
+ return { show: false, label: '', tone: '' }
|
|
|
+}
|
|
|
+
|
|
|
+export const ENV_BANNER = buildEnvBanner(APP_ENV)
|