feat(排名): 个性签名挂到排名上,领奖台上每人一句、「你」卡里就地改;全服排名只列到第 100 名,展开不再卡死

- 领奖台:头像旁边一个签名气泡(手机在头像上面),只露两行,长的指上去看全文
- 「你」卡:自己的签名带「改」,就地改不用跳设置页;没写的提示「写一句个性签名」;前一名、后一名名字下面带他们的签名
- 赛道:桌面有签名的名字后面一个引号,指上去看;手机直接写在名字后面
- 个性签名以后限 30 个字(老的长签名不动,榜上只露两行)
- 老师在名单「⋯」或台上气泡的「×」能清空不合适的签名(DELETE /rankings/mood/:userId)
- 全服名单最多列到第 100 名:原来展开会一次摊开一千五百多人把页面卡死

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-10 09:52:06 +08:00
1 parent 540d88355c
commit 2553c6ddfe
10 files changed
+588 -69

No files matched your search

+13 -1
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { MOOD_MAX } from "@oj2/contract"
import { updateProfile, uploadAvatar } from "oj/api"
import { useUserStore } from "shared/store/user"
@@ -25,6 +26,12 @@ async function upload({ file }: UploadCustomRequestOptions) {
}
async function saveProfile() {
// 以前限 256 字,老的长签名还在库里:输入框挡不住已有的字,存之前先说清楚
const length = userStore.profile?.mood?.trim().length ?? 0
if (length > MOOD_MAX) {
message.warning(`个性签名最多 ${MOOD_MAX} 个字,现在有 ${length} 个,删短一点再保存`)
return
}
try {
await updateProfile({
realName: userStore.profile?.realName ?? "",
@@ -55,7 +62,12 @@ async function saveProfile() {
<n-input v-model:value="userStore.profile.realName" />
</n-form-item> -->
<n-form-item label="个性签名">
<n-input v-model:value="userStore.profile.mood" />
<n-input
v-model:value="userStore.profile.mood"
:maxlength="MOOD_MAX"
show-count
placeholder="会显示在排名和个人主页上"
/>
</n-form-item>
<n-button @click="saveProfile">更改信息</n-button>
</n-form>