fix: 支持小程序本地API地址切换

This commit is contained in:
que01 committed 2026-09-20 11:43:26 +08:00
1 parent 1a9dc426f6
commit 17af0f6883
2 files changed
+22 -1

No files matched your search

+6 -1
View File
@@ -1,6 +1,11 @@
const DEFAULT_API_BASE_URL = "http://172.16.6.123:3001";
App({
onLaunch() {
this.globalData = { apiBaseUrl: "http://192.168.88.29:3001", brand: {} };
this.globalData = {
apiBaseUrl: wx.getStorageSync("apiBaseUrl") || DEFAULT_API_BASE_URL,
brand: {},
};
},
globalData: {},
});