Compare commits

...
2 Commits
2 changed files with 23 additions and 2 deletions
+21
View File
@@ -344,6 +344,10 @@ function frameAppName(frame: any) {
}
function onNewMessage(frame: any) {
// 他校新消息对当前学校口径无信息量(不计未读、不打扰、也不触发 /msg 页重拉)
if (!bellVisibleForCurrentSchool(frame)) {
return;
}
store.incUnread();
// /msg 页开着时自刷新(页内监听该事件重拉第一页与摘要)
mittBus.emit("msgCenter:newMessage", frame);
@@ -354,6 +358,23 @@ function onNewMessage(frame: any) {
});
}
/**
* 铃铛按校过滤(消息按学校隔离 批次4):口径必须与批次3 服务端列表一致——
* 平台级消息(帧无 schId)任何身份都提醒;平台/超管身份(getCurSchId 非正数,含 schId=0
* 被 store 归一成 -1 的形态)看全部,一律提醒;其余只认当前激活身份学校。
*/
function bellVisibleForCurrentSchool(frame: any): boolean {
const frameSchId = frame ? frame.schId : null;
if (frameSchId === null || frameSchId === undefined) {
return true;
}
const curSchId = store.getCurSchId;
if (!curSchId || curSchId <= 0) {
return true;
}
return Number(frameSchId) === Number(curSchId);
}
function closeMsgWs() {
msgWsClosed = true;
clearTimeout(msgWsReconnectTimer);
+2 -2
View File
@@ -2502,7 +2502,7 @@ watch(
}
.logo-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 12px;
padding: 14px 0 4px;
}
@@ -2521,7 +2521,7 @@ watch(
flex-wrap: wrap;
}
.logo-item {
height: 72px;
aspect-ratio: 1 / 1; /* 正方形预览(LOGO 池缩略图,2026-10-09 用户反馈由长方形改方) */
border-radius: 6px;
border: 2px solid #eef0f3;
background: #fff;