修改上传图片安全验证问题
This commit is contained in:
@@ -142,7 +142,7 @@ const EditProfilePage: React.FC = () => {
|
||||
// city: user_data.city || "",
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.error("加载用户信息失败:", error);
|
||||
// console.warn("加载用户信息失败:", error);
|
||||
// Taro.showToast({
|
||||
// title: "加载用户信息失败",
|
||||
// icon: "error",
|
||||
@@ -169,9 +169,9 @@ const EditProfilePage: React.FC = () => {
|
||||
icon: "success",
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("头像上传失败:", error);
|
||||
console.warn("头像上传失败:", error);
|
||||
Taro.showToast({
|
||||
title: "头像上传失败",
|
||||
title: error.message,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
@@ -246,7 +246,7 @@ const EditProfilePage: React.FC = () => {
|
||||
icon: "success",
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("保存失败:", error);
|
||||
console.warn("保存失败:", error);
|
||||
Taro.showToast({
|
||||
title: "保存失败",
|
||||
icon: "error",
|
||||
@@ -307,7 +307,7 @@ const EditProfilePage: React.FC = () => {
|
||||
icon: "success",
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("保存失败:", error);
|
||||
console.warn("保存失败:", error);
|
||||
Taro.showToast({
|
||||
title: "保存失败",
|
||||
icon: "error",
|
||||
@@ -438,7 +438,7 @@ const EditProfilePage: React.FC = () => {
|
||||
const phone = await UserService.parse_phone(e.detail.code);
|
||||
handle_field_edit("phone", phone);
|
||||
} catch (e) {
|
||||
console.error("解析手机号失败:", e);
|
||||
console.warn("解析手机号失败:", e);
|
||||
Taro.showToast({
|
||||
title: "解析手机号失败,请重试",
|
||||
icon: "none",
|
||||
@@ -564,9 +564,8 @@ const EditProfilePage: React.FC = () => {
|
||||
</View>
|
||||
<View className="item_right">
|
||||
<Text
|
||||
className={`item_value ${
|
||||
form_data.gender ? "" : "placeholder"
|
||||
}`}
|
||||
className={`item_value ${form_data.gender ? "" : "placeholder"
|
||||
}`}
|
||||
>
|
||||
{convert_db_gender_to_display(form_data.gender)}
|
||||
</Text>
|
||||
@@ -597,9 +596,8 @@ const EditProfilePage: React.FC = () => {
|
||||
</View>
|
||||
<View className="item_right">
|
||||
<Text
|
||||
className={`item_value ${
|
||||
form_data.birthday ? "" : "placeholder"
|
||||
}`}
|
||||
className={`item_value ${form_data.birthday ? "" : "placeholder"
|
||||
}`}
|
||||
>
|
||||
{form_data.birthday || "选择生日"}
|
||||
</Text>
|
||||
@@ -628,9 +626,8 @@ const EditProfilePage: React.FC = () => {
|
||||
</View>
|
||||
<View className="item_right">
|
||||
<Text
|
||||
className={`item_value ${
|
||||
form_data.personal_profile ? "" : "placeholder"
|
||||
}`}
|
||||
className={`item_value ${form_data.personal_profile ? "" : "placeholder"
|
||||
}`}
|
||||
>
|
||||
{form_data.personal_profile.replace(/\n/g, " ") ||
|
||||
"介绍一下自己"}
|
||||
@@ -661,17 +658,16 @@ const EditProfilePage: React.FC = () => {
|
||||
</View>
|
||||
<View className="item_right">
|
||||
<Text
|
||||
className={`item_value ${
|
||||
form_data.province ||
|
||||
className={`item_value ${form_data.province ||
|
||||
form_data.city ||
|
||||
form_data.district
|
||||
? ""
|
||||
: "placehoder"
|
||||
}`}
|
||||
? ""
|
||||
: "placehoder"
|
||||
}`}
|
||||
>
|
||||
{form_data.province ||
|
||||
form_data.city ||
|
||||
form_data.district
|
||||
form_data.city ||
|
||||
form_data.district
|
||||
? `${form_data.province} ${form_data.city} ${form_data.district}`
|
||||
: "选择所在地区"}
|
||||
</Text>
|
||||
@@ -697,9 +693,8 @@ const EditProfilePage: React.FC = () => {
|
||||
</View>
|
||||
<View className="item_right">
|
||||
<Text
|
||||
className={`item_value ${
|
||||
form_data.ntrp_level ? "" : "placeholder"
|
||||
}`}
|
||||
className={`item_value ${form_data.ntrp_level ? "" : "placeholder"
|
||||
}`}
|
||||
>
|
||||
{form_data.ntrp_level || "测测你的 NTRP 水平"}
|
||||
</Text>
|
||||
@@ -724,14 +719,12 @@ const EditProfilePage: React.FC = () => {
|
||||
<Text className="item_label">职业</Text>
|
||||
</View>
|
||||
<View
|
||||
className={`item_right ${
|
||||
form_data.occupation ? "" : "placeholder"
|
||||
}`}
|
||||
className={`item_right ${form_data.occupation ? "" : "placeholder"
|
||||
}`}
|
||||
>
|
||||
<Text
|
||||
className={`item_value ${
|
||||
form_data.occupation ? "" : "placeholder"
|
||||
}`}
|
||||
className={`item_value ${form_data.occupation ? "" : "placeholder"
|
||||
}`}
|
||||
>
|
||||
{form_data.occupation || "填写你的职业"}
|
||||
</Text>
|
||||
@@ -771,9 +764,9 @@ const EditProfilePage: React.FC = () => {
|
||||
>
|
||||
{form_data.phone
|
||||
? form_data.phone.replace(
|
||||
/(\d{3})(\d{4})(\d{4})/,
|
||||
"$1 $2 $3"
|
||||
)
|
||||
/(\d{3})(\d{4})(\d{4})/,
|
||||
"$1 $2 $3"
|
||||
)
|
||||
: "未绑定"}
|
||||
</Button>
|
||||
<Image
|
||||
|
||||
Reference in New Issue
Block a user