refactor: 按 sample_in_harmonyos 多层模块化架构重构工程结构

- 新增 common/ 公共模块:模型、服务、组件、常量
- 新增 features/ 功能模块:graph(星图)、chat(聊天)、settings(设置)、commonbusiness
- 新增 products/phone 产品入口层:EntryAbility + Index + MainPage
- Index.ets 简化为纯路由入口,TabNavigation 移至 MainPage 统一管理
- 更新 build-profile.json5 注册所有新模块
- 迁移原始 entry/ 代码到分层架构,保持功能完整
This commit is contained in:
root
2026-05-01 08:35:07 +08:00
parent 67c6b38e50
commit 5916d2749c
31 changed files with 4096 additions and 2 deletions

View File

@ -24,13 +24,87 @@
]
},
"modules": [
{
"name": "common",
"srcPath": "./common",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "commonbusiness",
"srcPath": "./features/commonbusiness",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "graph",
"srcPath": "./features/graph",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "chat",
"srcPath": "./features/chat",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "settings",
"srcPath": "./features/settings",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "phone",
"srcPath": "./products/phone",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": ["default"]
"applyToProducts": [
"default"
]
}
]
},
@ -39,7 +113,10 @@
"srcPath": "./trulymem-core",
"targets": [
{
"name": "default"
"name": "default",
"applyToProducts": [
"default"
]
}
]
}