/** * 生产环境请求地址 * @type {string} */ const prodURL = '/api/' /** * 开发环境请求地址 * @type {string} */ let devURL = 'http://localhost:8080/api/' // #ifdef H5 // H5平台 devURL = 'http://localhost:8080/api/' // #endif // #ifndef H5 // 非H5平台 devURL = 'http://localhost:8080/api/' // #endif const selfURL = '' /** * 非APP静态图片资源使用网络地址 * 使用线上地址节省小程序包资源 */ let staticUrl = null // #ifdef APP-PLUS staticUrl = '/static/' // #endif // #ifndef APP-PLUS staticUrl = '/static/' // #endif // ----------------------------------------------------------------------------------------------------- /** * 计算请求地址 */ export const BASE_URL_FN = function(flag = false) { // 生产环境 if (process.env.NODE_ENV === 'production') { return prodURL } // 开发环境 return devURL } /** * 计算静态资源路径 * @param {Object} val */ export const STATIC_URL_FN = function(val) { const url = val.startsWith('/') ? val.replace('/', '') : val if (process.env.NODE_ENV === 'development') return '/static/' + url return staticUrl + url } /** * 导航默认配置 */ export const DEFAULT_NAV_CONFIG = { quick: [4, 11, 5, 3], // 快速新建 nav: [1, 2, 3, 11, 12], // 导航 common: [13, 7, 8, 9, 5, 17, 3, 1] // 常用功能 } /** * 地图WEB服务API密钥 * 主要用于扩展 uni 自带地图功能 * 高德地图参考:https://lbs.amap.com/api/webservice/summary/ * 腾讯地图参考:https://lbs.qq.com/service/webService/webServiceGuide/webServiceOverview */ export const mapKey = 'UIDBZ-2QUCR-C6CW5-WSLAN-NWUQO-SOFB7' // 腾讯地图 /** * app update log * @example ['优化用户体验', '修复已知bug', '新增***功能'] * @type {Array} */ export const versionLog = [] /** * app name * @type {string} */ export const appName = 'CRM' /** * app version * @type {string} */ export const appVersion = '12.0.0.20220317' /** * wukong business calls * @type {string} */ export const businessCalls = '0817-7777969' /** * 公钥 */ export const PUBLIC_KEY = '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXSsDQ5jiqzMBbDS8SdwXVyCByv5GwE13PnKipBJb2awmsc0THksjhKgcjW/HCT7GRhUOv4bv4pyTaE2f3xBVmZwut126M6xZvfuds1T10DF7jlUD14oJcpX5W7LKExoIPGYJMq83iyIV7rRT5+Bc80eHQ5hjWZ3lyv5upYWMkjwIDAQAB-----END PUBLIC KEY-----'