This commit is contained in:
张成
2025-12-06 20:47:51 +08:00
parent fdc8663bb2
commit 1f29e1d783
2 changed files with 20 additions and 5 deletions

View File

@@ -33,6 +33,8 @@ interface UserDetailData {
occupation: string;
birthday: string;
ntrp_level: string;
last_location_province: string;
last_location_city: string;
stats: {
followers_count: number;
following_count: number;
@@ -83,6 +85,8 @@ export interface UserInfoType {
personal_profile: string;
occupation: string;
ntrp_level: string;
last_location_province?: string;
last_location_city?: string;
bio?: string;
birthday?: string;
is_following?: boolean;
@@ -326,6 +330,7 @@ export class UserService {
if (response.code === 0) {
const userData = response.data;
return {
id: userData.id || "",
nickname: userData.nickname || "",
@@ -351,7 +356,11 @@ export class UserService {
country: userData.country || "",
province: userData.province || "",
city: userData.city || "",
last_location_province: userData.last_location_province || "",
last_location_city: userData.last_location_city || "",
};
} else {
throw new Error(response.message || "获取用户信息失败");
}