Use UUID models and soft deletion, persist file relationships with deduplicated monthly MinIO objects, and add admin file management. Update mini-program media handling and add local dev configuration.
14 lines
578 B
JavaScript
14 lines
578 B
JavaScript
// 开发工具使用本机服务;真机调试时把 dev.apiBase 改为电脑的局域网 IP。
|
|
const environments = {
|
|
dev: { apiBase: 'http://127.0.0.1:8080/api' },
|
|
trial: { apiBase: 'https://past.sundynix.cn/api' },
|
|
release: { apiBase: 'https://past.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 };
|