This commit is contained in:
张成
2025-12-04 10:45:25 +08:00
parent a67383d12c
commit c8b1739313
4 changed files with 23 additions and 30 deletions

View File

@@ -15,7 +15,7 @@ import {
useNicknameChangeStatus,
} from "@/store/userStore";
import { UserInfoType } from "@/services/userService";
import { useCities, useProfessions } from "@/store/pickerOptionsStore";
import { useCities, useProfessions, useNtrpLevels } from "@/store/pickerOptionsStore";
import { handleCustomerService } from "@/services/userService";
import evaluateService from "@/services/evaluateService";
@@ -24,6 +24,7 @@ const EditProfilePage: React.FC = () => {
// 直接从store获取用户信息确保响应式更新
const user_info = useUserInfo();
const nickname_change_status = useNicknameChangeStatus();
const ntrpLevels = useNtrpLevels();
// 表单状态基于store中的用户信息初始化
const getInitialFormData = () => {
@@ -894,16 +895,10 @@ const EditProfilePage: React.FC = () => {
title="选择 NTRP 自评水平"
confirmText="保存"
ntrpTested={ntrpTested}
options={[
{ text: "1.5", value: "1.5" },
{ text: "2.0", value: "2.0" },
{ text: "2.5", value: "2.5" },
{ text: "3.0", value: "3.0" },
{ text: "3.5", value: "3.5" },
{ text: "4.0", value: "4.0" },
{ text: "4.5", value: "4.5" },
{ text: "4.5+", value: "4.5+" },
]}
options={ntrpLevels.map((level) => ({
text: level,
value: level,
}))}
type="ntrp"
// img={(user_info as UserInfoType)?.avatar_url}
visible={ntrp_picker_visible}