// 开发工具使用本机服务;真机调试时把 dev.apiBase 改为电脑的局域网 IP。 const environments = { dev: { apiBase: 'http://127.0.0.1:8080/api' }, trial: { apiBase: 'https://we.sundynix.cn/api' }, release: { apiBase: 'https://we.sundynix.cn/api' } }; let version = 'release'; try { const account = wx.getAccountInfoSync(); version = account.miniProgram.envVersion || 'release'; } catch (e) {} const env = version === 'develop' ? 'dev' : version === 'trial' ? 'trial' : 'release'; module.exports = { env, API_BASE: environments[env].apiBase };