feat: 修改图片样式为aspectFill
This commit is contained in:
@@ -40,7 +40,7 @@ function NtrpPopupGuide(props: {
|
||||
<Image
|
||||
className={styles.avatarUrl}
|
||||
src={userInfo.avatar_url}
|
||||
mode="aspectFit"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</View>
|
||||
{/* avatar side */}
|
||||
|
||||
@@ -90,7 +90,7 @@ function NTRPTestEntryCard(props: {
|
||||
<Image
|
||||
className={styles.avatarUrl}
|
||||
src={userInfo.avatar_url}
|
||||
mode="aspectFit"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</View>
|
||||
{/* avatar side */}
|
||||
@@ -119,7 +119,7 @@ function NTRPTestEntryCard(props: {
|
||||
<Image
|
||||
className={styles.avatarUrl}
|
||||
src={userInfo.avatar_url}
|
||||
mode="aspectFit"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</View>
|
||||
{/* avatar side */}
|
||||
|
||||
@@ -231,7 +231,7 @@ export const UserInfoCard: React.FC<UserInfoCardProps> = ({
|
||||
{/* 头像和基本信息 */}
|
||||
<View className="basic_info">
|
||||
<View className="avatar_container">
|
||||
<Image className="avatar" src={user_info.avatar} />
|
||||
<Image className="avatar" src={user_info.avatar} mode="aspectFill" />
|
||||
</View>
|
||||
<View className="info_container">
|
||||
<Text className="nickname">{user_info.nickname}</Text>
|
||||
@@ -331,7 +331,12 @@ export const UserInfoCard: React.FC<UserInfoCardProps> = ({
|
||||
)}
|
||||
</View>
|
||||
) : is_current_user && user_info.gender !== "2" ? (
|
||||
<View className="button_edit" onClick={() => { handle_open_edit_modal('gender') }}>
|
||||
<View
|
||||
className="button_edit"
|
||||
onClick={() => {
|
||||
handle_open_edit_modal("gender");
|
||||
}}
|
||||
>
|
||||
<Text>选择性别</Text>
|
||||
</View>
|
||||
) : null}
|
||||
@@ -340,16 +345,28 @@ export const UserInfoCard: React.FC<UserInfoCardProps> = ({
|
||||
<Text className="tag_text">{`NTRP ${user_info.ntrp_level}`}</Text>
|
||||
</View>
|
||||
) : is_current_user ? (
|
||||
<View className="button_edit" onClick={() => { handle_open_edit_modal('ntrp_level') }}>
|
||||
<View
|
||||
className="button_edit"
|
||||
onClick={() => {
|
||||
handle_open_edit_modal("ntrp_level");
|
||||
}}
|
||||
>
|
||||
<Text>测测你的NTRP水平</Text>
|
||||
</View>
|
||||
) : null}
|
||||
{user_info.occupation ? (
|
||||
<View className="tag_item">
|
||||
<Text className="tag_text">{user_info.occupation.split(" ")[1]}</Text>
|
||||
<Text className="tag_text">
|
||||
{user_info.occupation.split(" ")[1]}
|
||||
</Text>
|
||||
</View>
|
||||
) : is_current_user ? (
|
||||
<View className="button_edit" onClick={() => { handle_open_edit_modal('occupation') }}>
|
||||
<View
|
||||
className="button_edit"
|
||||
onClick={() => {
|
||||
handle_open_edit_modal("occupation");
|
||||
}}
|
||||
>
|
||||
<Text>选择职业</Text>
|
||||
</View>
|
||||
) : null}
|
||||
@@ -358,7 +375,10 @@ export const UserInfoCard: React.FC<UserInfoCardProps> = ({
|
||||
<Text className="tag_text">{`${user_info.province}${user_info.city}`}</Text>
|
||||
</View>
|
||||
) : is_current_user ? (
|
||||
<View className="button_edit" onClick={() => handle_open_edit_modal('location')}>
|
||||
<View
|
||||
className="button_edit"
|
||||
onClick={() => handle_open_edit_modal("location")}
|
||||
>
|
||||
<Text>选择地区</Text>
|
||||
</View>
|
||||
) : null}
|
||||
@@ -601,7 +621,8 @@ export const GameTabs: React.FC<GameTabsProps> = ({
|
||||
<Text className="tab_text">{hosted_text}</Text>
|
||||
</View>
|
||||
<View
|
||||
className={`tab_item ${active_tab === "participated" ? "active" : ""
|
||||
className={`tab_item ${
|
||||
active_tab === "participated" ? "active" : ""
|
||||
}`}
|
||||
onClick={() => on_tab_change("participated")}
|
||||
>
|
||||
|
||||
@@ -176,7 +176,7 @@ function Intro() {
|
||||
<Image
|
||||
className={styles.avatarUrl}
|
||||
src={userInfo.avatar_url}
|
||||
mode="aspectFit"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</View>
|
||||
{/* avatar side */}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { clear_login_state } from "@/services/loginService";
|
||||
import { convert_db_gender_to_display } from "@/utils/genderUtils";
|
||||
import { EditModal } from "@/components";
|
||||
import img from "@/config/images";
|
||||
import CommonDialog from '@/components/CommonDialog'
|
||||
import CommonDialog from "@/components/CommonDialog";
|
||||
|
||||
const EditProfilePage: React.FC = () => {
|
||||
// 用户信息状态
|
||||
@@ -309,7 +309,7 @@ const EditProfilePage: React.FC = () => {
|
||||
// 注销账户
|
||||
const handle_close_account = () => {
|
||||
setShowLogoutDialog(true);
|
||||
}
|
||||
};
|
||||
|
||||
const onGetPhoneNumber = async (e) => {
|
||||
if (!e.detail || !e.detail.code) {
|
||||
@@ -362,7 +362,11 @@ const EditProfilePage: React.FC = () => {
|
||||
{/* 头像编辑区域 */}
|
||||
<View className="avatar_section">
|
||||
<View className="avatar_container" onClick={handle_avatar_upload}>
|
||||
<Image className="avatar" src={user_info.avatar} />
|
||||
<Image
|
||||
className="avatar"
|
||||
src={user_info.avatar}
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<View className="avatar_overlay">
|
||||
<Image
|
||||
className="upload_icon"
|
||||
@@ -699,7 +703,9 @@ const EditProfilePage: React.FC = () => {
|
||||
visible={showLogoutDialog}
|
||||
cancelText="确定注销"
|
||||
confirmText="再想想"
|
||||
onCancel={() => {UserService.logout()}}
|
||||
onCancel={() => {
|
||||
UserService.logout();
|
||||
}}
|
||||
onConfirm={() => setShowLogoutDialog(false)}
|
||||
contentTitle="确定要注销账号吗?"
|
||||
contentDesc="你的账号将会彻底删除,该操作不可恢复。"
|
||||
|
||||
Reference in New Issue
Block a user