From b80a74655c7cedd2170e801d02f53c9ee76b3435 Mon Sep 17 00:00:00 2001 From: lkddi Date: Thu, 26 Feb 2026 22:59:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=9A=E5=A5=B3=E7=94=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E6=98=BE=E7=A4=BA=E4=B8=BA=E7=8E=AB?= =?UTF-8?q?=E7=B2=89=E8=89=B2(#e91e8c)=20+=20=E4=BF=AE=E5=A4=8D=20sex=20?= =?UTF-8?q?=E6=95=B4=E6=95=B0=E6=AF=94=E8=BE=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 用户列表中女性(sex=2)名字颜色设为玫粉色 - 修复 scripts.blade.php 中 sex 从字符串比较改为整数比较 --- resources/views/chat/partials/scripts.blade.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/views/chat/partials/scripts.blade.php b/resources/views/chat/partials/scripts.blade.php index dba4289..238d72f 100644 --- a/resources/views/chat/partials/scripts.blade.php +++ b/resources/views/chat/partials/scripts.blade.php @@ -144,9 +144,11 @@ badges += `🛡️`; } + // 女生名字使用玫粉色 + const nameColor = (user.sex == 2) ? 'color:#e91e8c;' : ''; item.innerHTML = ` - ${username}${badges} + ${username}${badges} `; item.onclick = () => { @@ -226,7 +228,7 @@ const res = await fetch('/user/' + encodeURIComponent(username)); const info = await res.json(); - const sexText = info.sex === '女' ? '女' : '男'; + const sexText = info.sex == 2 ? '女' : (info.sex == 1 ? '男' : '保密'); const level = info.user_level || 0; const exp = info.exp_num || 0; const jjb = info.jjb || 0; @@ -351,7 +353,7 @@ renderUserList(); // 原版风格:完整句式的随机趣味欢迎语 - const gender = user.sex === '女' ? '美女' : '帅哥'; + const gender = user.sex == 2 ? '美女' : '帅哥'; const uname = user.username; const welcomeTemplates = [ `${gender}${uname}开着刚买不久的车,来到了,见到各位大虾,拱手曰:"众位大虾,小生有礼了"`,