From da7cd51dbe237b963208edf11dc8630b77fe02e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Mon, 17 Nov 2025 00:22:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=20ntrp=20=E7=9A=84=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game_pages/detail/components/Participants/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game_pages/detail/components/Participants/index.tsx b/src/game_pages/detail/components/Participants/index.tsx index a761f77..9252487 100644 --- a/src/game_pages/detail/components/Participants/index.tsx +++ b/src/game_pages/detail/components/Participants/index.tsx @@ -1,6 +1,7 @@ import { View, Text, Image, ScrollView } from "@tarojs/components"; import dayjs from "dayjs"; import img from "@/config/images"; +import { formatNtrpDisplay } from "@/utils/helper"; import styles from "./index.module.scss"; // 参与者 @@ -65,10 +66,15 @@ export default function Participants(props) { avatar_url, nickname, level, + ntrp_level, id: participant_user_id, }, } = participant; const role = is_organizer ? "组织者" : "参与者"; + // 优先使用 ntrp_level,如果没有则使用 level + const ntrpValue = ntrp_level || level; + // 格式化显示 NTRP,如果没有值则显示"初学者" + const displayNtrp = ntrpValue ? formatNtrpDisplay(ntrpValue) : "初学者"; return ( - {level || "未知"} + {displayNtrp} {role}