发货方式优化及消息功能优化

This commit is contained in:
Dev
2026-10-08 20:34:08 +08:00
parent f21b010ced
commit 7e3e999b74
23 changed files with 371 additions and 455 deletions
+9 -1
View File
@@ -62,7 +62,15 @@ Component({
if (!force && now - (this._lastFetchAt || 0) < 5000) {
return;
}
//上一次请求尚未结束时不再发起,避免请求堆积占满并发导致页面假死
if (this._fetching) {
return;
}
this._lastFetchAt = now;
this._fetching = true;
const done = () => {
this._fetching = false;
};
fetchMessageUnreadCount().then((res) => {
if (res.code == 1) {
const unread = Number(res.data?.unread_count) || 0;
@@ -70,7 +78,7 @@ Component({
const app = getApp();
if (app) app.globalData.unread = unread;
}
}).catch(() => {});
}).catch(() => {}).then(done, done);
},
/**