1
This commit is contained in:
@@ -82,6 +82,7 @@
|
||||
// 标签样式
|
||||
.bubbleLabel {
|
||||
font-weight: 500;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
// 描述样式
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<UserInfoCardProps> = ({
|
||||
editable && handle_open_edit_modal("ntrp_level");
|
||||
}}
|
||||
>
|
||||
<Text className="tag_text">{`NTRP ${user_info.ntrp_level}`}</Text>
|
||||
<Text className="tag_text">{`NTRP ${formatNtrpDisplay(user_info.ntrp_level)}`}</Text>
|
||||
</View>
|
||||
) : is_current_user ? (
|
||||
<View
|
||||
|
||||
@@ -6,7 +6,7 @@ import { calculateDistance } from "@/utils";
|
||||
import { useUserInfo } from "@/store/userStore";
|
||||
import * as LoginService from "@/services/loginService";
|
||||
import img from "@/config/images";
|
||||
import { navto } from "@/utils/helper";
|
||||
import { navto, formatNtrpDisplay } from "@/utils/helper";
|
||||
import styles from "./index.module.scss";
|
||||
|
||||
function genRecommendGames(games, location, avatar) {
|
||||
@@ -44,10 +44,10 @@ function genRecommendGames(games, location, avatar) {
|
||||
checkedApplications: current_players,
|
||||
levelRequirements:
|
||||
skill_level_max !== skill_level_min
|
||||
? `${skill_level_min || "-"}-${skill_level_max || "-"}`
|
||||
? `${formatNtrpDisplay(skill_level_min) || "-"}-${formatNtrpDisplay(skill_level_max) || "-"}`
|
||||
: skill_level_min === "1"
|
||||
? "无要求"
|
||||
: `${skill_level_min}以上`,
|
||||
: `${formatNtrpDisplay(skill_level_min)}以上`,
|
||||
playType: play_type,
|
||||
};
|
||||
});
|
||||
@@ -125,7 +125,7 @@ export default function OrganizerInfo(props) {
|
||||
styles["organizer-avatar-name-message-stats-separator"]
|
||||
}
|
||||
/>
|
||||
<Text>NTRP {ntrp_level || "初学者"}</Text>
|
||||
<Text>NTRP {ntrp_level ? formatNtrpDisplay(ntrp_level) : "初学者"}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles["organizer-actions"]}>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: ''
|
||||
navigationBarTitleText: '',
|
||||
navigationStyle: 'custom',
|
||||
navigationBarBackgroundColor: '#FAFAFA'
|
||||
})
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -24,6 +25,10 @@ const ListSearch = () => {
|
||||
} = useListState()?.searchPageState || {};
|
||||
const ref = useRef<any>(null);
|
||||
|
||||
// 获取导航栏高度信息
|
||||
const { statusNavbarHeightInfo } = useGlobalState();
|
||||
const { totalHeight = 0 } = statusNavbarHeightInfo || {};
|
||||
|
||||
useEffect(() => {
|
||||
getSearchHistory();
|
||||
return () => {
|
||||
@@ -113,7 +118,15 @@ const ListSearch = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<View className="listSearchContainer">
|
||||
<GeneralNavbar
|
||||
title=""
|
||||
showBack={true}
|
||||
|
||||
/>
|
||||
<View
|
||||
className="listSearchContainer"
|
||||
style={{ paddingTop: `${totalHeight + 10}px` }}
|
||||
>
|
||||
{/* 搜索 */}
|
||||
<View className="topSearch">
|
||||
<Image className="searchIcon" src={img.ICON_LIST_SEARCH_SEARCH} />
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ const NewFollow = () => {
|
||||
refresherTriggered={refreshing}
|
||||
onRefresherRefresh={handleRefresh}
|
||||
>
|
||||
{followList.length > 0 ? (
|
||||
{!loading && followList.length > 0 ? (
|
||||
<View className="follow-list">
|
||||
{followList.map(renderFollowItem)}
|
||||
|
||||
@@ -231,9 +231,9 @@ const NewFollow = () => {
|
||||
<Text className="tip-text">到底了</Text>
|
||||
</View>
|
||||
</View>
|
||||
) : (
|
||||
) : !loading ? (
|
||||
<EmptyState text="暂无新增关注" />
|
||||
)}
|
||||
) : null}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -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() {
|
||||
</View>
|
||||
<View className={styles.levelWrap}>
|
||||
<Text>NTRP</Text>
|
||||
<Text className={styles.level}>{ntrp_level}</Text>
|
||||
<Text className={styles.level}>{formatNtrpDisplay(ntrp_level)}</Text>
|
||||
</View>
|
||||
<View className={styles.slogan}>
|
||||
<Text>变线+网前,下一步就是赢比赛!</Text>
|
||||
@@ -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() {
|
||||
</View>
|
||||
<View className={styles.levelWrap}>
|
||||
<Text>NTRP</Text>
|
||||
<Text className={styles.level}>{result?.ntrp_level}</Text>
|
||||
<Text className={styles.level}>{formatNtrpDisplay(result?.ntrp_level)}</Text>
|
||||
</View>
|
||||
<View className={styles.slogan}>
|
||||
<Text>变线+网前,下一步就是赢比赛!</Text>
|
||||
@@ -650,7 +651,7 @@ function Result() {
|
||||
</View>
|
||||
{userInfo.id ? (
|
||||
<View className={styles.updateTip}>
|
||||
<Text>你的 NTRP 水平已更新为 {result?.ntrp_level} </Text>
|
||||
<Text>你的 NTRP 水平已更新为 {formatNtrpDisplay(result?.ntrp_level)} </Text>
|
||||
<Text className={styles.grayTip}>(可在个人信息中修改)</Text>
|
||||
</View>
|
||||
) : (
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user