feat: 新增首页、设备、数据、我的页面及底部 tabBar 导航

扩展应用结构,接入底部导航;完善个人信息页提交文案与校验代码风格。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-08-17 13:46:52 +08:00
co-authored by Claude Sonnet 4.6
parent 83d909b95b
commit b264205cf4
36 changed files with 1039 additions and 37 deletions
+36
View File
@@ -0,0 +1,36 @@
import { get } from '../../utils/request/index'
/** 将体重数字拆成整数 + 小数字符串 */
const splitWeight = (weight: number): { int: number; decimal: string } => {
const str = weight.toFixed(2)
const [intPart, decPart] = str.split('.')
return { int: Number(intPart), decimal: `.${decPart}` }
}
Page({
data: {
record: null,
},
onShow() {
},
onShareAppMessage(): WechatMiniprogram.Page.ICustomShareContent {
return {
title: '智能蓝牙秤',
path: '/pages/home/home',
imageUrl: '/images/share/share.jpg',
}
},
/** 跳转历史数据页 */
onTapHistory() {
wx.switchTab({ url: '/pages/data/data' })
},
/** 跳转设备列表页 */
onTapSwitchDevice() {
wx.switchTab({ url: '/pages/equipment/equipment' })
},
})