chore: v1 整理 — 清理历史文件、DDL 合并、文档归档

- 清理 1155 个已删除的历史文件(废弃 prompt_logs、tmp、旧 ops 脚本)
- export/ 数据文件从 git 移除(已在 .gitignore)
- demo-miniprogram 从 tmp/ 移入 apps/,添加 CLAUDE.md 注解
- DDL 合并:完整 schema 定义填充到 db/*/schemas/(从 docs/database/ddl/ 复制)
- 39 个 v1 迁移脚本归档到 db/_archived/migrations_v1_merged/
- 4 个迁移变更类 BD_Manual 文档归档到 docs/database/_archived/
- .gitignore 补充 .vite/ 和 apps/*.zip
- settings.json 添加 effortLevel 默认配置
- scripts/ops/ 新增运维脚本入库

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Neo
2026-04-06 00:39:27 +08:00
parent 6f8f12314f
commit 779b2f6d52
1340 changed files with 9124 additions and 132087 deletions

View File

@@ -0,0 +1,58 @@
/**
* 自定义 tabBar 组件
*
* 微信 custom-tab-bar 机制tabBar 页面由框架自动挂载;
* 非 tabBar 页面(如 board-customer/board-coach可手动引用。
*
* 支持 2/3 按钮动态布局,权限数据由外部注入(当前 mock 为 3 按钮)。
*/
/** tab 路由映射key → url + 是否为 tabBar 页面) */
const TAB_ROUTES: Record<string, { url: string; isTabBarPage: boolean }> = {
task: { url: '/pages/task-list/task-list', isTabBarPage: true },
board: { url: '/pages/board-finance/board-finance', isTabBarPage: true },
my: { url: '/pages/my-profile/my-profile', isTabBarPage: true },
}
// TODO: 联调时从全局状态/接口获取权限,过滤可见 tab
// 示例const visibleKeys = getApp().globalData.visibleTabs || ['task', 'board', 'my']
const VISIBLE_KEYS = ['task', 'board', 'my']
/** 根据权限过滤后的 tab 列表 */
const TABS = [
{ key: 'task', label: '任务', icon: '/assets/icons/tab-task-nav.svg', activeIcon: '/assets/icons/tab-task-nav-active.svg' },
{ key: 'board', label: '看板', icon: '/assets/icons/tab-board-nav.svg', activeIcon: '/assets/icons/tab-board-nav-active.svg' },
{ key: 'my', label: '我的', icon: '/assets/icons/tab-my-nav.svg', activeIcon: '/assets/icons/tab-my-nav-active.svg' },
].filter((t) => VISIBLE_KEYS.includes(t.key))
Component({
properties: {
/** 当前激活的 tab key */
active: {
type: String,
value: '',
},
},
data: {
tabs: TABS,
tabCount: TABS.length,
},
methods: {
onTap(e: WechatMiniprogram.TouchEvent) {
const key = e.currentTarget.dataset.key as string
// 通过 properties 获取 active避免 this.data 类型推断问题
if (key === (this as unknown as { data: { active: string } }).data.active) return
const route = TAB_ROUTES[key]
if (!route) return
if (route.isTabBarPage) {
wx.switchTab({ url: route.url })
} else {
wx.navigateTo({ url: route.url })
}
},
},
})