perf: 清理无界缓存、合并收益走势查询、补齐组合索引并优化前端定时器/图片加载

- 移除只写不读的 verifyCodeCache(无界内存增长)

- 大神收益走势由 20 次逐日/逐周/逐月查询改为 3 次 GROUP BY 聚合

- 派单池地理编码改为并行,避免串行等待外部接口

- 补齐 orders/activities/participants/user_notifications/finance/withdrawals/posts 组合索引;修复 withdrawals 使用不存在 created_at 的失效索引

- 数据库连接池支持 MYSQL_CONNECTION_LIMIT/MYSQL_QUEUE_LIMIT

- 首页/弹窗定时器卸载清理,活动列表参与者按活动 id 查询,大厅组局按页取数,图片 lazy-load

- 121 套件/792 用例全绿;已部署并验证新索引与 9ms 走势查询
这个提交包含在:
xcbyy
2026-10-23 15:31:37 +08:00
父节点 0d574b6420
当前提交 94cf6cdc69
共有 10 个文件被更改,包括 187 次插入 和 100 次删除

查看文件

@@ -129,6 +129,7 @@
v-for="(img, idx) in post.images"
:key="idx"
class="post-img"
lazy-load
:src="img"
mode="aspectFill"
@click.stop="previewImage(post.images, idx)"

查看文件

@@ -397,8 +397,9 @@ const loadHallData = async () => {
}
}).catch(() => {}),
getActivities().then((list) => {
const arr = Array.isArray(list) ? list : [];
getActivities({ page: 1, pageSize: 20 }).then((res) => {
// 大厅只展示最近 5 个可报名组局,按页取数避免每 30 秒拉全量活动与参与者
const arr = Array.isArray(res) ? res : (res && Array.isArray(res.list) ? res.list : []);
nearbyActivities.value = arr
.filter((a) => a && (a.status === 'RECRUITING' || a.status === '招募中'))
.slice(0, 5);

查看文件

@@ -128,7 +128,7 @@
>
<!-- 封面图构图优化:高保真黄金比例与底部流光渐变 -->
<view class="card-cover-wrap">
<image class="card-cover" :src="expert.avatar" mode="aspectFill" />
<image class="card-cover" :src="expert.avatar" mode="aspectFill" lazy-load />
<view class="cover-gradient"></view>
<view class="status-tag" :class="expert.isOnline ? 'online' : 'offline'">
@@ -489,6 +489,15 @@ onShow(() => {
onUnmounted(() => {
uni.$off('theme-change', onThemeChanged);
if (searchTimer) {
clearTimeout(searchTimer);
searchTimer = null;
}
if (matchTimer) {
clearTimeout(matchTimer);
matchTimer = null;
}
matchSeq += 1;
try { if (homeVoiceAudio) { homeVoiceAudio.destroy(); homeVoiceAudio = null; } } catch (_) {}
});