更新用户登录功能
This commit is contained in:
7
miniprogram/env.js
Normal file
7
miniprogram/env.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const env = wx.getAccountInfoSync().miniProgram.envVersion; // 获取当前环境(develop/trial/release)
|
||||
const config = {
|
||||
develop: { apiBaseUrl: 'http://localhost:9096' }, // 开发环境(本地调试)
|
||||
trial: { apiBaseUrl: 'https://test-api.example.com' }, // 体验版(测试环境)
|
||||
release: { apiBaseUrl: 'https://api.example.com' } // 正式版(生产环境)
|
||||
};
|
||||
export default config[env];
|
||||
Reference in New Issue
Block a user