ntrp默认值为2.5

This commit is contained in:
2025-12-01 13:04:31 +08:00
parent 675ecb536d
commit 4c9a0da9ac
3 changed files with 8 additions and 9 deletions

View File

@@ -23,11 +23,12 @@ const EditProfilePage: React.FC = () => {
// 表单状态基于store中的用户信息初始化
const getInitialFormData = () => {
const info = user_info as UserInfoType;
debugger;
return {
nickname: info?.nickname ?? "",
personal_profile: info?.personal_profile ?? "",
occupation: info?.occupation ?? "",
ntrp_level: info?.ntrp_level ?? "4.0",
ntrp_level: info?.ntrp_level ?? "2.5",
phone: info?.phone ?? "",
gender: info?.gender ?? "",
birthday: info?.birthday ?? "2000-01-01",
@@ -68,7 +69,7 @@ const EditProfilePage: React.FC = () => {
nickname: info?.nickname ?? "",
personal_profile: info?.personal_profile ?? "",
occupation: info?.occupation ?? "",
ntrp_level: info?.ntrp_level ?? "4.0",
ntrp_level: info?.ntrp_level ?? "2.5",
phone: info?.phone ?? "",
gender: info?.gender ?? "",
birthday: info?.birthday ?? "2000-01-01",
@@ -851,9 +852,7 @@ const EditProfilePage: React.FC = () => {
// img={(user_info as UserInfoType)?.avatar_url}
visible={ntrp_picker_visible}
setvisible={setNtrpPickerVisible}
value={
form_data.ntrp_level === "0" ? ["2.5"] : [form_data.ntrp_level]
}
value={form_data.ntrp_level === "" ? ["2.5"] : [form_data.ntrp_level]}
onChange={handle_ntrp_level_change}
/>
)}