Skip to content

开放平台:新增用户反馈查看与处理状态修改 - #117

Merged
lengxi-root merged 2 commits into
ElainaCore:mainfrom
Philia093-root:feat/openapi-user-feedback
Nov 21, 2026
Merged

lengxi-root merged 2 commits into
ElainaCore:mainfrom
Philia093-root:feat/openapi-user-feedback

Conversation

@Philia093-root

@Philia093-root Philia093-root commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

本 PR 已合并(由 web@1d2bb3a 构建)。后续增强——状态内联菜单与「未处理」置灰——见源码 PR #118 与构建产物 PR #119。

变更内容

开放平台页新增「用户反馈」页签,支持查看用户反馈并修改处理状态。

列表

  • 时间范围(近 7 / 14 / 30 天)、类型(问题反馈 / 功能建议)、状态(未处理 / 已处理 / 暂不处理)筛选
  • 列为 反馈内容 / 反馈类型 / 处理状态 / 反馈时间,与 q.qq.com 后台一致
  • 行内勾选 + 批量标记,底部展示总数与分页(每页 20 条)

详情弹窗

点击单行弹出「反馈详情」:用户 OpenID、反馈类型、反馈时间(含秒)、处理状态、反馈内容、
对话信息截图(可点击在新窗口查看原图);底部可在「已处理 / 暂不处理」间切换。

处理状态

  • 单条:弹窗底部按钮;批量:勾选后「标记为…」
  • 接口复用现有 v2 代理通道:POST /cgi-bin/v2/feedback/list、POST /cgi-bin/v2/feedback/modify
    (/cgi-bin/v2/ 已在 _V2_ALLOWED_PREFIXES 白名单内,后端零改动)
  • success_count=0 时以刷新后的列表为准,避免界面与平台不一致

实现说明

  • 源码位于 web 分支(src/views/openapi/FeedbackPanel.vue、feedback-panel.css)
  • 本 PR 为该源码 1d2bb3a 的构建产物

验证

  • Playwright 在真实编译产物上跑通:列表渲染、弹窗内容、单条与批量改状态、success_count=0、
    筛选参数、分页、空态/错误态、414px 移动端、暗色主题,无 pageerror
  • 接口语义实测:feedback_type 1=问题反馈 2=功能建议,status 0=未处理 1=已处理 2=暂不处理
    (映射取自 q.qq.com 官方前端产物)

开放平台页新增「用户反馈」页签:
- 列表:时间范围 / 类型 / 状态筛选,批量选择与分页,列与 q.qq.com 后台一致
- 详情弹窗:用户 OpenID、反馈类型、反馈时间、处理状态、反馈内容、对话信息截图
- 处理状态:支持单条与批量标记「未处理 / 已处理 / 暂不处理」,
  复用现有 v2 代理通道 /cgi-bin/v2/feedback/list 与 /cgi-bin/v2/feedback/modify,后端无需改动
- 沿用面板设计变量,适配明暗主题与移动端布局

说明:仓库只随版本发布 web/dist 产物,故该页以独立 ES 模块 FeedbackPanel.js/.css
挂载到已编译的 OpenAPI 分块,3 个挂载锚点写在 FeedbackPanel.js 头部注释中,
前端源码重新构建后需按同样锚点重新挂载。
@Philia093-root
Philia093-root force-pushed the feat/openapi-user-feedback branch from d0c6fba to 250aa39 Compare November 21, 2026 16:47
lengxi-root added a commit that referenced this pull request Nov 21, 2026
Port the user feedback feature from PR #117 into the web source branch. Reload authoritative statuses after mutations, handle partial and zero-success results, and recover pagination when filtered records move off the last page.

Co-authored-by: Philia093-root <Philia093-root@users.noreply.github.com>
Build from ElainaCore/ElainaBot_v2 web commit 1d2bb3a. Replace the standalone compiled-module injection with the normal Vue/Vite build, including fixes for zero-success and partial-success mutations and filtered pagination.

Validation: production build and eight mocked-API browser scenarios passed in both development and production.
@lengxi-root
lengxi-root merged commit 8920cb2 into ElainaCore:main Nov 21, 2026
1 check passed
@Philia093-root

Copy link
Copy Markdown
Contributor Author

已按评审意见改为从 web 分支源码构建:

  • 源码改动:web 分支 PR 开放平台:反馈列表内联状态菜单(未处理置灰) #118(src/views/openapi/FeedbackPanel.vue、feedback-panel.css)
  • 本分支新增构建提交 f8cd37d,对应源码 f9f4a1c;仅 OpenAPI.js / OpenAPI.css 变化,其余分块与上游构建逐字节一致
  • 列表「处理状态」现为可点击菜单(当前项打勾),「未处理」因平台不接受 target_status=0 置灰并给出说明;补充了菜单/箭头/对勾过渡动画

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants