/** * 环境配置文件 * * 开发环境(微信开发者工具)使用本地后端地址; * 生产环境使用线上域名。 */ const isDev = (function() { try { // 使用非废弃的 API(wx.getSystemInfoSync 在基础库 3.7.0+ 已废弃) const info = wx.getDeviceInfo ? wx.getDeviceInfo() : wx.getSystemInfoSync(); return info.platform === 'devtools'; } catch (e) { return false; } })(); module.exports = { API_BASE_URL: isDev ? 'http://localhost:8085/api/v1' : 'https://api.danyang-match.example.com/api/v1', IS_DEV: isDev, };