From 4b5c6778565e2426313b0e47f3d6b93ad993a1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Sat, 15 Nov 2025 23:51:38 +0800 Subject: [PATCH] 1 --- src/components/Bubble/bubbleItem.module.scss | 1 + src/components/FilterPopup/index.module.scss | 8 +++++++ src/components/FollowUserCard/index.scss | 9 +++++--- src/components/HomeNavbar/index.scss | 2 ++ src/components/ListCard/index.scss | 21 +++++++++++++------ src/components/UserInfo/index.tsx | 3 ++- .../detail/components/OrganizerInfo/index.tsx | 8 +++---- src/game_pages/search/index.config.ts | 4 +++- src/game_pages/search/index.scss | 5 ++--- src/game_pages/search/index.tsx | 17 +++++++++++++-- src/other_pages/new_follow/index.scss | 9 +++++--- src/other_pages/new_follow/index.tsx | 6 +++--- src/other_pages/ntrp-evaluate/index.tsx | 9 ++++---- src/utils/helper.ts | 8 +++++-- 14 files changed, 78 insertions(+), 32 deletions(-) diff --git a/src/components/Bubble/bubbleItem.module.scss b/src/components/Bubble/bubbleItem.module.scss index bec69a4..b916494 100644 --- a/src/components/Bubble/bubbleItem.module.scss +++ b/src/components/Bubble/bubbleItem.module.scss @@ -82,6 +82,7 @@ // 标签样式 .bubbleLabel { font-weight: 500; + font-size: 12px !important; } // 描述样式 diff --git a/src/components/FilterPopup/index.module.scss b/src/components/FilterPopup/index.module.scss index 8fd5fa5..d6107fb 100644 --- a/src/components/FilterPopup/index.module.scss +++ b/src/components/FilterPopup/index.module.scss @@ -21,6 +21,14 @@ .btn { flex: 1; + font-size: 14pt !important; // 14pt 加粗 + font-weight: 600 !important; // 加粗 + + // 确保按钮内部文字也应用样式 + :global(.nut-button__text) { + font-size: 14pt !important; + font-weight: 600 !important; + } } --nutui-button-border-width: 0.5px; diff --git a/src/components/FollowUserCard/index.scss b/src/components/FollowUserCard/index.scss index 51f47db..cdaa6e2 100644 --- a/src/components/FollowUserCard/index.scss +++ b/src/components/FollowUserCard/index.scss @@ -60,19 +60,22 @@ white-space: nowrap; position: relative; background: transparent !important; + box-sizing: border-box; // 使用伪元素实现真正的 0.5px 边框 &::before { content: ''; position: absolute; - top: 0; - left: 0; + top: -50%; + left: -50%; + right: -50%; + bottom: -50%; width: 200%; height: 200%; border: 1px solid; border-radius: 40px; // 20px * 2 transform: scale(0.5); - transform-origin: 0 0; + transform-origin: center center; pointer-events: none; box-sizing: border-box; } diff --git a/src/components/HomeNavbar/index.scss b/src/components/HomeNavbar/index.scss index 61bd898..ee78448 100644 --- a/src/components/HomeNavbar/index.scss +++ b/src/components/HomeNavbar/index.scss @@ -119,6 +119,7 @@ letter-spacing: -0.22px; // -1.6428571734045228% min-width: 0; // 允许输入框缩小 height: 100%; // 输入框高度填满容器 + background: transparent; // 去掉输入框背景 :global(.nut-input-inner) { font-family: "PingFang SC"; @@ -128,6 +129,7 @@ letter-spacing: -0.22px; color: #000000; // 根据设计稿:文本颜色 fill_9WEVAH height: 100%; + background: transparent; // 去掉输入框内部背景 } :global(.nut-input-placeholder) { diff --git a/src/components/ListCard/index.scss b/src/components/ListCard/index.scss index e7f0b56..2bf960e 100644 --- a/src/components/ListCard/index.scss +++ b/src/components/ListCard/index.scss @@ -227,21 +227,30 @@ position: relative; .image-container { - width: 60%; - height: 60%; position: absolute; overflow: hidden; - top: 20%; + border: 1.5px solid #ffffff; + border-radius: 9px; + box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + // 设计稿尺寸 72.28px,按 100/122 比例缩放 + width: 59.2px; + height: 59.2px; &:first-child { + // 设计稿位置 top: 10.52px, left: 38.52px,按比例缩放 + top: 8.6px; + left: 31.6px; z-index: 2; - transform: translateX(4px) rotate(-10deg); + transform: rotate(8deg); } &:last-child { - right: 0; + // 设计稿位置 top: 38.62px, left: 10.62px,按比例缩放 + top: 31.7px; + left: 8.7px; z-index: 1; - transform: translateX(-4px) rotate(10deg); + transform: rotate(-8deg); } } } diff --git a/src/components/UserInfo/index.tsx b/src/components/UserInfo/index.tsx index f96a563..3fce108 100644 --- a/src/components/UserInfo/index.tsx +++ b/src/components/UserInfo/index.tsx @@ -9,6 +9,7 @@ import { PopupPicker } from "@/components/Picker/index"; import { useUserActions } from "@/store/userStore"; import { UserInfoType } from "@/services/userService"; import { useCities, useProfessions } from "@/store/pickerOptionsStore"; +import { formatNtrpDisplay } from "@/utils/helper"; // 用户信息接口 // export interface UserInfo { @@ -457,7 +458,7 @@ const UserInfoCardComponent: React.FC = ({ editable && handle_open_edit_modal("ntrp_level"); }} > - {`NTRP ${user_info.ntrp_level}`} + {`NTRP ${formatNtrpDisplay(user_info.ntrp_level)}`} ) : is_current_user ? ( - NTRP {ntrp_level || "初学者"} + NTRP {ntrp_level ? formatNtrpDisplay(ntrp_level) : "初学者"} diff --git a/src/game_pages/search/index.config.ts b/src/game_pages/search/index.config.ts index 0adc673..214013c 100644 --- a/src/game_pages/search/index.config.ts +++ b/src/game_pages/search/index.config.ts @@ -1,3 +1,5 @@ export default definePageConfig({ - navigationBarTitleText: '' + navigationBarTitleText: '', + navigationStyle: 'custom', + navigationBarBackgroundColor: '#FAFAFA' }) diff --git a/src/game_pages/search/index.scss b/src/game_pages/search/index.scss index b5256d3..8dbc222 100644 --- a/src/game_pages/search/index.scss +++ b/src/game_pages/search/index.scss @@ -1,6 +1,5 @@ .listSearchContainer { padding: 0 15px; - padding-top: 16px; background-color: #FAFAFA; min-height: 100vh; @@ -16,10 +15,10 @@ height: 44px; box-sizing: border-box; gap: 10px; - border-radius: 44px; + border-radius: 999px; border: 0.5px solid rgba(0, 0, 0, 0.06); background: #FFF; - box-shadow: 0 4px 48px 0 rgba(0, 0, 0, 0.08); + box-shadow: 0px 4px 48px 0px rgba(0, 0, 0, 0.08); .nut-input { padding: 0; diff --git a/src/game_pages/search/index.tsx b/src/game_pages/search/index.tsx index 361e355..314201c 100644 --- a/src/game_pages/search/index.tsx +++ b/src/game_pages/search/index.tsx @@ -2,8 +2,9 @@ import { View, Image, Text } from "@tarojs/components"; import { Input } from "@nutui/nutui-react-taro"; import { useEffect, useMemo, useRef } from "react"; import { useListState } from "@/store/listStore"; +import { useGlobalState } from "@/store/global"; +import { withAuth, GeneralNavbar } from "@/components"; import img from "@/config/images"; -import { withAuth } from "@/components"; import "./index.scss"; import Taro from "@tarojs/taro"; @@ -23,6 +24,10 @@ const ListSearch = () => { isShowSuggestion, } = useListState()?.searchPageState || {}; const ref = useRef(null); + + // 获取导航栏高度信息 + const { statusNavbarHeightInfo } = useGlobalState(); + const { totalHeight = 0 } = statusNavbarHeightInfo || {}; useEffect(() => { getSearchHistory(); @@ -113,7 +118,15 @@ const ListSearch = () => { return ( <> - + + {/* 搜索 */} diff --git a/src/other_pages/new_follow/index.scss b/src/other_pages/new_follow/index.scss index 831401c..3e9d45d 100644 --- a/src/other_pages/new_follow/index.scss +++ b/src/other_pages/new_follow/index.scss @@ -159,19 +159,22 @@ flex-shrink: 0; position: relative; background: transparent; + box-sizing: border-box; // 使用伪元素实现真正的 0.5px 边框 &::before { content: ''; position: absolute; - top: 0; - left: 0; + top: -50%; + left: -50%; + right: -50%; + bottom: -50%; width: 200%; height: 200%; border: 1px solid #000000; border-radius: 40px; // 20px * 2 transform: scale(0.5); - transform-origin: 0 0; + transform-origin: center center; pointer-events: none; box-sizing: border-box; } diff --git a/src/other_pages/new_follow/index.tsx b/src/other_pages/new_follow/index.tsx index a6c9ed7..3ebed4a 100644 --- a/src/other_pages/new_follow/index.tsx +++ b/src/other_pages/new_follow/index.tsx @@ -222,7 +222,7 @@ const NewFollow = () => { refresherTriggered={refreshing} onRefresherRefresh={handleRefresh} > - {followList.length > 0 ? ( + {!loading && followList.length > 0 ? ( {followList.map(renderFollowItem)} @@ -231,9 +231,9 @@ const NewFollow = () => { 到底了 - ) : ( + ) : !loading ? ( - )} + ) : null} ); diff --git a/src/other_pages/ntrp-evaluate/index.tsx b/src/other_pages/ntrp-evaluate/index.tsx index 249ce0a..e9119b3 100644 --- a/src/other_pages/ntrp-evaluate/index.tsx +++ b/src/other_pages/ntrp-evaluate/index.tsx @@ -14,6 +14,7 @@ import { useUserInfo, useUserActions } from "@/store/userStore"; import { useEvaluate, EvaluateScene } from "@/store/evaluateStore"; import { useGlobalState } from "@/store/global"; import { delay, getCurrentFullPath } from "@/utils"; +import { formatNtrpDisplay } from "@/utils/helper"; import CloseIcon from "@/static/ntrp/ntrp_close_icon.svg"; import DocCopy from "@/static/ntrp/ntrp_doc_copy.svg"; import ArrowRight from "@/static/ntrp/ntrp_arrow_right.svg"; @@ -224,7 +225,7 @@ function Intro() { NTRP - {ntrp_level} + {formatNtrpDisplay(ntrp_level)} 变线+网前,下一步就是赢比赛! @@ -524,7 +525,7 @@ function Result() { ctx.fillText("你的 NTRP 测试结果为", 20, 40); ctx.fillStyle = "#00E5AD"; ctx.font = "bold 22px sans-serif"; - ctx.fillText(`NTRP ${result?.ntrp_level}`, 20, 70); + ctx.fillText(`NTRP ${formatNtrpDisplay(result?.ntrp_level)}`, 20, 70); // 绘制雷达图 const img = canvas.createImage(); @@ -634,7 +635,7 @@ function Result() { NTRP - {result?.ntrp_level} + {formatNtrpDisplay(result?.ntrp_level)} 变线+网前,下一步就是赢比赛! @@ -650,7 +651,7 @@ function Result() { {userInfo.id ? ( - 你的 NTRP 水平已更新为 {result?.ntrp_level} + 你的 NTRP 水平已更新为 {formatNtrpDisplay(result?.ntrp_level)} (可在个人信息中修改) ) : ( diff --git a/src/utils/helper.ts b/src/utils/helper.ts index 6e3df48..0b8b4cf 100644 --- a/src/utils/helper.ts +++ b/src/utils/helper.ts @@ -41,8 +41,12 @@ export function insertDotInTags(tags: string[]) { return tags.join("-·-").split("-"); } -function formatNtrpDisplay(val) { - return Number(val).toFixed(1) +// 格式化NTRP水平显示,统一保留一位小数 +export function formatNtrpDisplay(val) { + if (!val || val === "0" || val === 0) return val; + const num = Number(val); + if (isNaN(num)) return val; + return num.toFixed(1); } export function genNTRPRequirementText(min, max) {