feat(staffchat): 路由+API client+类型+relativeChatTime(还原旧页WIP+占位StaffChat)

- 还原 ChatTimeline.vue/api/index.ts 未提交 WIP(新页自建,旧文件回 HEAD)
- /staff-chat/:ownerId/:tab?/:talkerId? 路由 + 占位 StaffChat.vue(Task 9 替换)
- types: MomentsPost/MomentsList/StaffStatsCounts/StaffStatsDetail +
  ChatSession.pinned + Account.avatar
- api: getMoments/getStaffStatsCounts/getStaffStatsDetail + sessions
  is_del + messages msg_type/q 过滤
- format: relativeChatTime(今天HH:mm/昨天/M月D日/YYYY年M月D日) + 4 例
  vitest spec(全过,vitest 未入 devDependencies,npx 拉取运行)
- tsconfig.app.json exclude __tests__(vitest 未装,保持 vue-tsc 通过)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-25 16:44:47 +08:00
parent 4baa8639ba
commit f2bcac0a4d
7 changed files with 208 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
<!-- 占位组件: Task 8 只加路由, 五视图实现在后续任务替换本文件。 -->
<script setup lang="ts">
// Route props (/staff-chat/:ownerId/:tab?/:talkerId?) — see router/index.ts.
// tab=group 时 talkerId 语义为 roomId; ?msgid= 定位消息(红包转账明细跳转)。
const props = defineProps<{
ownerId: string
tab?: string
talkerId?: string
}>()
</script>
<template>
<div data-staff-chat :data-owner-id="props.ownerId" />
</template>