diff --git a/src/user_pages/edit/index.scss b/src/user_pages/edit/index.scss index 2dc4714..3d0f08c 100644 --- a/src/user_pages/edit/index.scss +++ b/src/user_pages/edit/index.scss @@ -1,16 +1,12 @@ // 编辑资料页面样式 .edit_profile_page { height: 100vh; // position: relative; - background: radial-gradient(circle at 50% 0, - /* 光晕圆心在顶部中间 */ - rgba(191, 255, 239, 0.9) 0px, - /* 中间更深的浅蓝 */ - rgba(191, 255, 239, 0.5) 200px, - /* 100px 处开始淡化 */ - #fff 300px, - /* 到 200px 变成白色 */ - #fff 100% - /* 200px 以下全白 */ + background: radial-gradient( + circle at 50% 0, + /* 光晕圆心在顶部中间 */ rgba(191, 255, 239, 0.9) 0px, + /* 中间更深的浅蓝 */ rgba(191, 255, 239, 0.5) 200px, + /* 100px 处开始淡化 */ #fff 300px, + /* 到 200px 变成白色 */ #fff 100% /* 200px 以下全白 */ ); position: relative; // overflow: hidden; @@ -56,7 +52,7 @@ display: flex; justify-content: center; - &>.detail-navigator-back-icon { + & > .detail-navigator-back-icon { width: 32px; height: 32px; } @@ -95,7 +91,7 @@ } .navbar_title { - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 600; font-size: 17px; line-height: 1.4em; @@ -113,7 +109,7 @@ cursor: pointer; .save_text { - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 600; font-size: 16px; line-height: 1.4em; @@ -145,15 +141,14 @@ .avatar_container { position: relative; - - .avatar { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; cursor: pointer; - box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.12), 0px 0px 1px 0px rgba(0, 0, 0, 0.2); + box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.12), + 0px 0px 1px 0px rgba(0, 0, 0, 0.2); border: 0.5px solid rgba(255, 255, 255, 0.65); overflow: hidden; } @@ -183,14 +178,13 @@ // 表单区域 .form_section { margin-bottom: 16px; - box-shadow: 0px 4px 36px 0px rgba(0, 0, 0, 0.06); + border: 1px solid rgba(0, 0, 0, 0.12); + border-radius: 12px; + // box-shadow: 0px 4px 36px 0px rgba(0, 0, 0, 0.06); .form_group { - background: #FFFFFF; + background: #ffffff; border-radius: 12px; - overflow: hidden; - - .form_item { display: flex; @@ -201,11 +195,6 @@ box-sizing: border-box; gap: 20px; - - - - - .item_left { display: flex; align-items: center; @@ -218,7 +207,7 @@ } .item_label { - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 500; font-size: 14px; line-height: 1.71em; @@ -237,7 +226,7 @@ .item_input { flex: 1; text-align: right; - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 600; font-size: 14px; line-height: 1.71em; @@ -253,7 +242,7 @@ } .item_value { - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 600; font-size: 14px; line-height: 1.71em; @@ -268,7 +257,7 @@ .bio_textarea { flex: 1; text-align: right; - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 600; font-size: 14px; line-height: 1.71em; @@ -292,7 +281,7 @@ Button { padding: 0; - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 600; font-size: 14px; line-height: 1.71em; @@ -318,14 +307,14 @@ left: 36px; right: 12px; height: 0.5px; - background: rgba(0, 0, 0, 0.06); + background: rgba(0, 0, 0, 0.12); border-radius: 99px; } } .divider { - height: 1px; - background-color: rgba(0, 0, 0, 0.06); + height: 0.5px; + background-color: rgba(0, 0, 0, 0.12); margin-left: 35px; box-sizing: border-box; } @@ -337,8 +326,8 @@ margin-top: 16px; .logout_button { - background: #FFFFFF; - border: 1px solid rgba(0, 0, 0, 0.06); + background: #ffffff; + border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 16px; padding: 2px 6px; display: flex; @@ -348,7 +337,7 @@ min-height: 48px; .logout_text { - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 600; font-size: 16px; line-height: 1.4em; @@ -365,11 +354,11 @@ height: 200px; .loading_text { - font-family: 'PingFang SC'; + font-family: "PingFang SC"; font-weight: 400; font-size: 16px; line-height: 1.4em; color: rgba(0, 0, 0, 0.6); } } -} \ No newline at end of file +} diff --git a/src/user_pages/edit/index.tsx b/src/user_pages/edit/index.tsx index 5511e0f..d2a3a6c 100644 --- a/src/user_pages/edit/index.tsx +++ b/src/user_pages/edit/index.tsx @@ -345,7 +345,7 @@ const EditProfilePage: React.FC = () => { } return defaultOptions; - } + }; return ( @@ -591,7 +591,11 @@ const EditProfilePage: React.FC = () => { openType="getPhoneNumber" onGetPhoneNumber={onGetPhoneNumber} > - {form_data.phone ? form_data.phone.replace(/(\d{3})(\d{4})(\d{4})/, "$1 $2 $3") + {form_data.phone + ? form_data.phone.replace( + /(\d{3})(\d{4})(\d{4})/, + "$1 $2 $3" + ) : "未绑定"} { /> - + {/* */} @@ -688,7 +692,11 @@ const EditProfilePage: React.FC = () => { options={cities} visible={location_picker_visible} setvisible={setLocationPickerVisible} - value={form_data.country ? [form_data.country, form_data.province, form_data.city] : getDefaultOption(cities)} + value={ + form_data.country + ? [form_data.country, form_data.province, form_data.city] + : getDefaultOption(cities) + } onChange={handle_location_change} /> )} @@ -713,7 +721,9 @@ const EditProfilePage: React.FC = () => { // img={(user_info as UserInfoType)?.avatar_url} visible={ntrp_picker_visible} setvisible={setNtrpPickerVisible} - value={form_data.ntrp_level === "0" ? ["3.0"] : [form_data.ntrp_level]} + value={ + form_data.ntrp_level === "0" ? ["3.0"] : [form_data.ntrp_level] + } onChange={handle_ntrp_level_change} /> )} @@ -726,7 +736,11 @@ const EditProfilePage: React.FC = () => { options={professions} visible={occupation_picker_visible} setvisible={setOccupationPickerVisible} - value={form_data.occupation ? [...form_data.occupation.split(" ")] : getDefaultOption(professions)} + value={ + form_data.occupation + ? [...form_data.occupation.split(" ")] + : getDefaultOption(professions) + } onChange={handle_occupation_change} /> )} diff --git a/src/user_pages/other/index.scss b/src/user_pages/other/index.scss index 395c18c..2cac1a7 100644 --- a/src/user_pages/other/index.scss +++ b/src/user_pages/other/index.scss @@ -25,7 +25,7 @@ top: 0; z-index: 100; overflow: hidden; - background-color: rgb(238, 255, 220); + // background-color: rgb(238, 255, 220); } .detail-navigator {