Files
pda-cli/src/common/config.js
T

42 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
*/
// 判断是否为开发环境
export const isDevelopment = process.env.NODE_ENV === 'development'
const config = {
upgradeName: process.env.VUE_APP_UPGRADE_NAME || 'erp_pda',
// 产品名称
productName: '浩拓技术',
// 公司名称
companyName: '浩拓科技',
// 版本检查标识
appCode: 'android',
// 环境判断
isDevelopment: isDevelopment,
// 生产环境API URL(服务名段 hcscm_weave)
productionApiUrl: process.env.VUE_APP_PRODUCTION_API_URL || 'https://www.haotopai.com/hcscm_weave/mes/server/pda/v1',
// 开发环境API URL选项(仅替换 //域名/ 后第一个路径段 hcscm → hcscm_weave,不改域名)
devApiUrlOptions: [
{ label: '测试环境', value: 'https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1' },
{ label: '正式环境', value: process.env.VUE_APP_DEV_API_URL || process.env.VUE_APP_PRODUCTION_API_URL || 'https://www.haotopai.com/hcscm_weave/mes/server/pda/v1' },
{ label: '本地环境', value: 'http://192.168.1.66:7010/hcscm_weave/pda/v1' },
{ label: '自定义', value: 'custom' }
]
}
export function getTestApiUrl() {
const test = config.devApiUrlOptions.find(item => item.label === '测试环境');
return (test && test.value) || 'https://hcscmtest.zzfzyc.com/hcscm_weave/pda/v1';
}
export default config;