Files
bodyWeight/miniprogram/app.ts
T
17792275749andClaude Opus 4.7 d6e59df4e9 feat: 详细报告接入 v3 测量历史接口,设备列表接入设备接口
- 详细报告按 scaleType 区分 4/8 电极渲染,节段卡片 8 电极专属
- 设备列表改为接口驱动并新增空态
- 登录后统一跳首页,请求层兼容 code 0 返回风格

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-20 17:20:07 +08:00

33 lines
919 B
TypeScript

App<IAppOption>({
globalData: {},
onLaunch() {
// 已登录则跳过登录页
const token = wx.getStorageSync('token') || null;
// const userInfo = wx.getStorageSync('userInfo') || null;
const userInfo = true;
if (token && userInfo) {
wx.reLaunch({
url: '/pages/home/home'
})
}
},
getWxLoginCode(): Promise<string> {
return new Promise((resolve, reject) => {
wx.login({
success: (res) => {
if (res.code) {
resolve(res.code)
} else {
reject(new Error('获取登录凭证失败'))
}
},
fail: (err) => {
reject(new Error(err.errMsg || '获取登录凭证失败'))
},
})
})
},
})