feat(msgcenter): 消息中心 WS 实时推送前端 + CI 接入 projman 自动链路
build / build (push) Failing after 13s

- Header.vue:铃铛未读角标 + WS 客户端(25s 心跳/断线 5s 重连换新票/newMessage 红点+1+Notice 弹提示)
- BaseApi.ts:getMsgCenterWsTicket(POST /api/msgCenter/wsTicket 代签一次性票据)
- index.html:修复 lodash 引用路径(./libs/lodash.min.js,dev 404 致白屏)
- CI:build.yml 照 notice/front 模板(构建→zip→Nexus front-hosted→webhook 建档);
  userhome deployMode=auto,webhook 后自动发布;凭据 prod.env+projman DB 直读(不走仓库 Secrets)
This commit is contained in:
chenxing
2026-09-19 13:48:32 +08:00
parent 0e3bd97c55
commit efd3b57826
4 changed files with 323 additions and 44 deletions
+47
View File
@@ -95,6 +95,53 @@ class Base extends Abstract {
return this.postRequest({ url });
}
// ===== 消息中心代理(§3.5:经后端签名代理 UserMsg,前端不直连)=====
/**
* 消息中心分页列表({total, list[]};元素含改写后的绝对 jumpUrl)
* @memberof Basic
*/
getMsgCenterList(params: PageParams) {
const url = path + "/msgCenter/list";
return this.getRequest<PageData>({ url, params });
}
/**
* 铃铛摘要:未读数 + 各应用待办角标
* @memberof Basic
*/
getMsgCenterSummary() {
const url = path + "/msgCenter/summary";
return this.getRequest<{ unreadCount: number; todos: { appKey: string; count: number }[] }>({ url });
}
/**
* WS 实时推送握手地址(UserMsg 一次性票据;url=null 表示未配置/不可达,走手动刷新兜底)
* @memberof Basic
*/
getMsgCenterWsTicket() {
const url = path + "/msgCenter/wsTicket";
return this.getRequest<{ url: string | null }>({ url });
}
/**
* 消息中心:已读某一条(按登录人代理)
* @memberof Basic
*/
readMsgCenter(msgId: number) {
const url = path + "/msgCenter/read";
return this.postRequest({ url, params: { msgId } });
}
/**
* 消息中心:全部已读
* @memberof Basic
*/
readMsgCenterAll() {
const url = path + "/msgCenter/readAll";
return this.postRequest({ url });
}
/**
* 修改密码
* @memberof Basic