1
This commit is contained in:
@@ -82,6 +82,7 @@
|
|||||||
// 标签样式
|
// 标签样式
|
||||||
.bubbleLabel {
|
.bubbleLabel {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
font-size: 12px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 描述样式
|
// 描述样式
|
||||||
|
|||||||
@@ -21,6 +21,14 @@
|
|||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
flex: 1;
|
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;
|
--nutui-button-border-width: 0.5px;
|
||||||
|
|||||||
@@ -60,19 +60,22 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
// 使用伪元素实现真正的 0.5px 边框
|
// 使用伪元素实现真正的 0.5px 边框
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: -50%;
|
||||||
left: 0;
|
left: -50%;
|
||||||
|
right: -50%;
|
||||||
|
bottom: -50%;
|
||||||
width: 200%;
|
width: 200%;
|
||||||
height: 200%;
|
height: 200%;
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
border-radius: 40px; // 20px * 2
|
border-radius: 40px; // 20px * 2
|
||||||
transform: scale(0.5);
|
transform: scale(0.5);
|
||||||
transform-origin: 0 0;
|
transform-origin: center center;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,7 @@
|
|||||||
letter-spacing: -0.22px; // -1.6428571734045228%
|
letter-spacing: -0.22px; // -1.6428571734045228%
|
||||||
min-width: 0; // 允许输入框缩小
|
min-width: 0; // 允许输入框缩小
|
||||||
height: 100%; // 输入框高度填满容器
|
height: 100%; // 输入框高度填满容器
|
||||||
|
background: transparent; // 去掉输入框背景
|
||||||
|
|
||||||
:global(.nut-input-inner) {
|
:global(.nut-input-inner) {
|
||||||
font-family: "PingFang SC";
|
font-family: "PingFang SC";
|
||||||
@@ -128,6 +129,7 @@
|
|||||||
letter-spacing: -0.22px;
|
letter-spacing: -0.22px;
|
||||||
color: #000000; // 根据设计稿:文本颜色 fill_9WEVAH
|
color: #000000; // 根据设计稿:文本颜色 fill_9WEVAH
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
background: transparent; // 去掉输入框内部背景
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.nut-input-placeholder) {
|
:global(.nut-input-placeholder) {
|
||||||
|
|||||||
@@ -227,21 +227,30 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.image-container {
|
.image-container {
|
||||||
width: 60%;
|
|
||||||
height: 60%;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: hidden;
|
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 {
|
&:first-child {
|
||||||
|
// 设计稿位置 top: 10.52px, left: 38.52px,按比例缩放
|
||||||
|
top: 8.6px;
|
||||||
|
left: 31.6px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
transform: translateX(4px) rotate(-10deg);
|
transform: rotate(8deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
right: 0;
|
// 设计稿位置 top: 38.62px, left: 10.62px,按比例缩放
|
||||||
|
top: 31.7px;
|
||||||
|
left: 8.7px;
|
||||||
z-index: 1;
|
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 { useUserActions } from "@/store/userStore";
|
||||||
import { UserInfoType } from "@/services/userService";
|
import { UserInfoType } from "@/services/userService";
|
||||||
import { useCities, useProfessions } from "@/store/pickerOptionsStore";
|
import { useCities, useProfessions } from "@/store/pickerOptionsStore";
|
||||||
|
import { formatNtrpDisplay } from "@/utils/helper";
|
||||||
|
|
||||||
// 用户信息接口
|
// 用户信息接口
|
||||||
// export interface UserInfo {
|
// export interface UserInfo {
|
||||||
@@ -457,7 +458,7 @@ const UserInfoCardComponent: React.FC<UserInfoCardProps> = ({
|
|||||||
editable && handle_open_edit_modal("ntrp_level");
|
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>
|
</View>
|
||||||
) : is_current_user ? (
|
) : is_current_user ? (
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { calculateDistance } from "@/utils";
|
|||||||
import { useUserInfo } from "@/store/userStore";
|
import { useUserInfo } from "@/store/userStore";
|
||||||
import * as LoginService from "@/services/loginService";
|
import * as LoginService from "@/services/loginService";
|
||||||
import img from "@/config/images";
|
import img from "@/config/images";
|
||||||
import { navto } from "@/utils/helper";
|
import { navto, formatNtrpDisplay } from "@/utils/helper";
|
||||||
import styles from "./index.module.scss";
|
import styles from "./index.module.scss";
|
||||||
|
|
||||||
function genRecommendGames(games, location, avatar) {
|
function genRecommendGames(games, location, avatar) {
|
||||||
@@ -44,10 +44,10 @@ function genRecommendGames(games, location, avatar) {
|
|||||||
checkedApplications: current_players,
|
checkedApplications: current_players,
|
||||||
levelRequirements:
|
levelRequirements:
|
||||||
skill_level_max !== skill_level_min
|
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 === "1"
|
||||||
? "无要求"
|
? "无要求"
|
||||||
: `${skill_level_min}以上`,
|
: `${formatNtrpDisplay(skill_level_min)}以上`,
|
||||||
playType: play_type,
|
playType: play_type,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -125,7 +125,7 @@ export default function OrganizerInfo(props) {
|
|||||||
styles["organizer-avatar-name-message-stats-separator"]
|
styles["organizer-avatar-name-message-stats-separator"]
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Text>NTRP {ntrp_level || "初学者"}</Text>
|
<Text>NTRP {ntrp_level ? formatNtrpDisplay(ntrp_level) : "初学者"}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles["organizer-actions"]}>
|
<View className={styles["organizer-actions"]}>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
export default definePageConfig({
|
export default definePageConfig({
|
||||||
navigationBarTitleText: ''
|
navigationBarTitleText: '',
|
||||||
|
navigationStyle: 'custom',
|
||||||
|
navigationBarBackgroundColor: '#FAFAFA'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
.listSearchContainer {
|
.listSearchContainer {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
padding-top: 16px;
|
|
||||||
background-color: #FAFAFA;
|
background-color: #FAFAFA;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
||||||
@@ -16,10 +15,10 @@
|
|||||||
height: 44px;
|
height: 44px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
border-radius: 44px;
|
border-radius: 999px;
|
||||||
border: 0.5px solid rgba(0, 0, 0, 0.06);
|
border: 0.5px solid rgba(0, 0, 0, 0.06);
|
||||||
background: #FFF;
|
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 {
|
.nut-input {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ import { View, Image, Text } from "@tarojs/components";
|
|||||||
import { Input } from "@nutui/nutui-react-taro";
|
import { Input } from "@nutui/nutui-react-taro";
|
||||||
import { useEffect, useMemo, useRef } from "react";
|
import { useEffect, useMemo, useRef } from "react";
|
||||||
import { useListState } from "@/store/listStore";
|
import { useListState } from "@/store/listStore";
|
||||||
|
import { useGlobalState } from "@/store/global";
|
||||||
|
import { withAuth, GeneralNavbar } from "@/components";
|
||||||
import img from "@/config/images";
|
import img from "@/config/images";
|
||||||
import { withAuth } from "@/components";
|
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
|
|
||||||
@@ -24,6 +25,10 @@ const ListSearch = () => {
|
|||||||
} = useListState()?.searchPageState || {};
|
} = useListState()?.searchPageState || {};
|
||||||
const ref = useRef<any>(null);
|
const ref = useRef<any>(null);
|
||||||
|
|
||||||
|
// 获取导航栏高度信息
|
||||||
|
const { statusNavbarHeightInfo } = useGlobalState();
|
||||||
|
const { totalHeight = 0 } = statusNavbarHeightInfo || {};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getSearchHistory();
|
getSearchHistory();
|
||||||
return () => {
|
return () => {
|
||||||
@@ -113,7 +118,15 @@ const ListSearch = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<View className="listSearchContainer">
|
<GeneralNavbar
|
||||||
|
title=""
|
||||||
|
showBack={true}
|
||||||
|
|
||||||
|
/>
|
||||||
|
<View
|
||||||
|
className="listSearchContainer"
|
||||||
|
style={{ paddingTop: `${totalHeight + 10}px` }}
|
||||||
|
>
|
||||||
{/* 搜索 */}
|
{/* 搜索 */}
|
||||||
<View className="topSearch">
|
<View className="topSearch">
|
||||||
<Image className="searchIcon" src={img.ICON_LIST_SEARCH_SEARCH} />
|
<Image className="searchIcon" src={img.ICON_LIST_SEARCH_SEARCH} />
|
||||||
|
|||||||
@@ -159,19 +159,22 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
// 使用伪元素实现真正的 0.5px 边框
|
// 使用伪元素实现真正的 0.5px 边框
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: -50%;
|
||||||
left: 0;
|
left: -50%;
|
||||||
|
right: -50%;
|
||||||
|
bottom: -50%;
|
||||||
width: 200%;
|
width: 200%;
|
||||||
height: 200%;
|
height: 200%;
|
||||||
border: 1px solid #000000;
|
border: 1px solid #000000;
|
||||||
border-radius: 40px; // 20px * 2
|
border-radius: 40px; // 20px * 2
|
||||||
transform: scale(0.5);
|
transform: scale(0.5);
|
||||||
transform-origin: 0 0;
|
transform-origin: center center;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ const NewFollow = () => {
|
|||||||
refresherTriggered={refreshing}
|
refresherTriggered={refreshing}
|
||||||
onRefresherRefresh={handleRefresh}
|
onRefresherRefresh={handleRefresh}
|
||||||
>
|
>
|
||||||
{followList.length > 0 ? (
|
{!loading && followList.length > 0 ? (
|
||||||
<View className="follow-list">
|
<View className="follow-list">
|
||||||
{followList.map(renderFollowItem)}
|
{followList.map(renderFollowItem)}
|
||||||
|
|
||||||
@@ -231,9 +231,9 @@ const NewFollow = () => {
|
|||||||
<Text className="tip-text">到底了</Text>
|
<Text className="tip-text">到底了</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
) : (
|
) : !loading ? (
|
||||||
<EmptyState text="暂无新增关注" />
|
<EmptyState text="暂无新增关注" />
|
||||||
)}
|
) : null}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { useUserInfo, useUserActions } from "@/store/userStore";
|
|||||||
import { useEvaluate, EvaluateScene } from "@/store/evaluateStore";
|
import { useEvaluate, EvaluateScene } from "@/store/evaluateStore";
|
||||||
import { useGlobalState } from "@/store/global";
|
import { useGlobalState } from "@/store/global";
|
||||||
import { delay, getCurrentFullPath } from "@/utils";
|
import { delay, getCurrentFullPath } from "@/utils";
|
||||||
|
import { formatNtrpDisplay } from "@/utils/helper";
|
||||||
import CloseIcon from "@/static/ntrp/ntrp_close_icon.svg";
|
import CloseIcon from "@/static/ntrp/ntrp_close_icon.svg";
|
||||||
import DocCopy from "@/static/ntrp/ntrp_doc_copy.svg";
|
import DocCopy from "@/static/ntrp/ntrp_doc_copy.svg";
|
||||||
import ArrowRight from "@/static/ntrp/ntrp_arrow_right.svg";
|
import ArrowRight from "@/static/ntrp/ntrp_arrow_right.svg";
|
||||||
@@ -224,7 +225,7 @@ function Intro() {
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles.levelWrap}>
|
<View className={styles.levelWrap}>
|
||||||
<Text>NTRP</Text>
|
<Text>NTRP</Text>
|
||||||
<Text className={styles.level}>{ntrp_level}</Text>
|
<Text className={styles.level}>{formatNtrpDisplay(ntrp_level)}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.slogan}>
|
<View className={styles.slogan}>
|
||||||
<Text>变线+网前,下一步就是赢比赛!</Text>
|
<Text>变线+网前,下一步就是赢比赛!</Text>
|
||||||
@@ -524,7 +525,7 @@ function Result() {
|
|||||||
ctx.fillText("你的 NTRP 测试结果为", 20, 40);
|
ctx.fillText("你的 NTRP 测试结果为", 20, 40);
|
||||||
ctx.fillStyle = "#00E5AD";
|
ctx.fillStyle = "#00E5AD";
|
||||||
ctx.font = "bold 22px sans-serif";
|
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();
|
const img = canvas.createImage();
|
||||||
@@ -634,7 +635,7 @@ function Result() {
|
|||||||
</View>
|
</View>
|
||||||
<View className={styles.levelWrap}>
|
<View className={styles.levelWrap}>
|
||||||
<Text>NTRP</Text>
|
<Text>NTRP</Text>
|
||||||
<Text className={styles.level}>{result?.ntrp_level}</Text>
|
<Text className={styles.level}>{formatNtrpDisplay(result?.ntrp_level)}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.slogan}>
|
<View className={styles.slogan}>
|
||||||
<Text>变线+网前,下一步就是赢比赛!</Text>
|
<Text>变线+网前,下一步就是赢比赛!</Text>
|
||||||
@@ -650,7 +651,7 @@ function Result() {
|
|||||||
</View>
|
</View>
|
||||||
{userInfo.id ? (
|
{userInfo.id ? (
|
||||||
<View className={styles.updateTip}>
|
<View className={styles.updateTip}>
|
||||||
<Text>你的 NTRP 水平已更新为 {result?.ntrp_level} </Text>
|
<Text>你的 NTRP 水平已更新为 {formatNtrpDisplay(result?.ntrp_level)} </Text>
|
||||||
<Text className={styles.grayTip}>(可在个人信息中修改)</Text>
|
<Text className={styles.grayTip}>(可在个人信息中修改)</Text>
|
||||||
</View>
|
</View>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -41,8 +41,12 @@ export function insertDotInTags(tags: string[]) {
|
|||||||
return tags.join("-·-").split("-");
|
return tags.join("-·-").split("-");
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNtrpDisplay(val) {
|
// 格式化NTRP水平显示,统一保留一位小数
|
||||||
return Number(val).toFixed(1)
|
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) {
|
export function genNTRPRequirementText(min, max) {
|
||||||
|
|||||||
Reference in New Issue
Block a user