feat: init fitness-coach (backend + miniprogram)

- backend: NestJS service with exercise/plan data
- miniprogram: WeChat mini program client
- exclude node_modules, dist, runtime data-store, local env
This commit is contained in:
2026-07-22 00:35:40 +08:00
commit b3b58e66fb
103 changed files with 154759 additions and 0 deletions

26
miniprogram/app.js Normal file
View File

@@ -0,0 +1,26 @@
const { BASE_URL } = require('./config');
App({
globalData: {
// 状态栏高度px由 onLaunch 读取,供自定义导航栏计算顶部留白
statusBarHeight: 20,
// 后端基础地址
baseUrl: BASE_URL
},
onLaunch() {
// 读取窗口信息以获取状态栏高度(兼容新旧 API
try {
const info = (typeof wx.getWindowInfo === 'function')
? wx.getWindowInfo()
: wx.getSystemInfoSync();
this.globalData.statusBarHeight = info.statusBarHeight || 20;
} catch (e) {
this.globalData.statusBarHeight = 20;
}
// 可选:静默登录(占位,不请求真实后端)
// const { getOpenid } = require('./utils/auth');
// getOpenid();
}
});