主包超出 2MB 上限无法上传发布版,把训练相关全部移到独立分包。
目录调整:
- pages/training/* → training/pages/*
- hooks/use{Metronome,VoiceCoach,TrainingSession,TrainingBgm}.ts
→ training/hooks/*
- static/training/* → training/static/*
- 主包 hooks/ 目录已清空,所有 use* 都被分包独占
引用路径更新:
- 分包内 hook import 用相对路径 ../hooks/xxx,不依赖 @/ alias
- 资源路径 /static/training/audio/click.mp3
→ /training/static/audio/click.mp3
- useMetronome 默认 clickSrc / useVoiceCoach VOICE_BASE
/ useTrainingBgm BGM_BASE 全部对齐新路径
pages.json:
- 主包 pages 移除 training/index 和 training/metronome
- subPackages 新增 root="training",含 pages/index 和 pages/metronome
- 跟现有 TUIKit / doctor 分包风格一致
调用方:
- components/dev-training-entry navigateTo URL 更新成
/training/pages/metronome (此组件留在主包,主包跳分包是合法操作)
文档/工具同步:
- training/static/README.md 路径示例改为 training/static/...
- scripts/generate-voice.mjs VOICE_DIR 与提示输出对齐新路径
Git mv 检测到的全是 rename(R),历史完整保留。
分包总体 80K(pages 44K + hooks 20K + static 16K),主包瘦身明显。
Co-authored-by: Cursor <cursoragent@cursor.com>
155 lines
2.9 KiB
JSON
155 lines
2.9 KiB
JSON
{
|
|
"pages": [
|
|
{
|
|
"path": "pages/index/index",
|
|
"style": {
|
|
"navigationBarTitleText": "甄养堂"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/login/login",
|
|
"style": {
|
|
"navigationBarTitleText": "视频问诊"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/user/userinfo",
|
|
"style": {
|
|
"navigationBarTitleText": "个人资料"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/index/video",
|
|
"style": {
|
|
"navigationBarTitleText": "甄养堂"
|
|
}
|
|
},
|
|
{
|
|
"path": "TUICallKit/src/Components/TUICallKit",
|
|
"style": {
|
|
"navigationBarTitleText": "视频问诊",
|
|
"navigationBarHidden": true,
|
|
"navigationStyle": "custom"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/order/monad/monad",
|
|
"style": {
|
|
"navigationBarTitleText": "诊单确认",
|
|
"navigationBarHidden": true,
|
|
"navigationStyle": "custom"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/user/user",
|
|
"style": {
|
|
"navigationBarTitleText": "我的"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/Card/Card",
|
|
"style": {
|
|
"navigationBarTitleText": "就诊卡"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/Card/edit_card",
|
|
"style": {
|
|
"navigationBarTitleText": "修改就诊卡"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/Card/contact",
|
|
"style": {
|
|
"navigationBarTitleText": "服务"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/order/order",
|
|
"style": {
|
|
"navigationBarTitleText": "付款"
|
|
}
|
|
}
|
|
],
|
|
"subPackages": [
|
|
{
|
|
"root": "TUIKit",
|
|
"pages": [
|
|
{
|
|
"path": "pages/chat/chat",
|
|
"style": {
|
|
"navigationBarTitleText": "问诊"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"root": "doctor",
|
|
"pages": [
|
|
{
|
|
"path": "pages/doctor/doctor",
|
|
"style": {
|
|
"navigationBarTitleText": "医生信息"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/doctor/list/list",
|
|
"style": {
|
|
"navigationBarTitleText": "执业医生列表"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/article/article",
|
|
"style": {
|
|
"navigationBarTitleText": "健康百科"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"root": "training",
|
|
"pages": [
|
|
{
|
|
"path": "pages/index",
|
|
"style": {
|
|
"navigationBarTitleText": "练一练"
|
|
}
|
|
},
|
|
{
|
|
"path": "pages/metronome",
|
|
"style": {
|
|
"navigationBarTitleText": "节拍器",
|
|
"navigationBarBackgroundColor": "#f8fafc",
|
|
"navigationBarTextStyle": "black",
|
|
"backgroundColor": "#f8fafc",
|
|
"disableScroll": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"tabBar": {
|
|
"color": "#8a8a8a",
|
|
"selectedColor": "#204e2b",
|
|
"borderStyle": "black",
|
|
"backgroundColor": "#ffffff",
|
|
"list": [{
|
|
"pagePath": "pages/index/index",
|
|
"iconPath": "/static/user/home.png",
|
|
"selectedIconPath": "/static/user/home_no.png",
|
|
"text": "首页"
|
|
},{
|
|
"pagePath": "pages/user/user",
|
|
"iconPath": "/static/user/user.png",
|
|
"selectedIconPath": "/static/user/user_no.png",
|
|
"text": "我的"
|
|
}]
|
|
},
|
|
"globalStyle": {
|
|
"navigationBarTextStyle": "black",
|
|
"navigationBarTitleText": "甄养堂互联网医院",
|
|
"navigationBarBackgroundColor": "#F8F8F8",
|
|
"backgroundColor": "#F8F8F8"
|
|
}
|
|
}
|