feat: 更新动态功能,新增我的动态视图及相关状态管理
- 在HomeFeature中添加MeDynamicFeature以管理用户动态状态。 - 在MainFeature中集成MeDynamicFeature,支持动态内容的加载与展示。 - 新增MeDynamicView以展示用户的动态列表,支持下拉刷新和上拉加载更多功能。 - 更新MeView以集成用户动态视图,提升用户体验。 - 在APIEndpoints中新增getMyDynamic端点以支持获取用户动态信息。 - 更新DynamicsModels以适应新的动态数据结构,确保数据解析的准确性。 - 在OptimizedDynamicCardView中优化图片处理逻辑,提升动态展示效果。 - 更新相关视图组件以支持动态内容的展示与交互,增强用户体验。
This commit is contained in:
@@ -146,29 +146,209 @@ struct IDLoginData: Codable, Equatable {
|
||||
|
||||
// MARK: - User Info Model
|
||||
struct UserInfo: Codable, Equatable {
|
||||
let userId: String?
|
||||
let username: String?
|
||||
let nickname: String?
|
||||
let uid: Int?
|
||||
let userId: String? // 兼容旧字段
|
||||
let nick: String?
|
||||
let nickname: String? // 兼容旧字段
|
||||
let avatar: String?
|
||||
let email: String?
|
||||
let phone: String?
|
||||
let status: String?
|
||||
let createTime: String?
|
||||
let updateTime: String?
|
||||
|
||||
let region: String?
|
||||
let regionDesc: String?
|
||||
let gender: Int?
|
||||
let birth: Int64?
|
||||
let userDesc: String?
|
||||
let userLevelVo: UserLevelVo?
|
||||
let userVipInfoVO: UserVipInfoVO?
|
||||
let medalsPic: [MedalsPic]?
|
||||
let userHeadwear: UserHeadwear?
|
||||
let privatePhoto: [PrivatePhoto]?
|
||||
let createTime: Int64?
|
||||
let phoneAreaCode: String?
|
||||
let erbanNo: Int?
|
||||
let isCertified: Bool?
|
||||
let isBindPhone: Bool?
|
||||
let isBindApple: Bool?
|
||||
let isBindPasswd: Bool?
|
||||
let isBindPaymentPwd: Bool?
|
||||
let banAccount: Bool?
|
||||
let visitNum: Int?
|
||||
let fansNum: Int?
|
||||
let followNum: Int?
|
||||
let visitHide: Bool?
|
||||
let visitListView: Bool?
|
||||
let newUser: Bool?
|
||||
let defUser: Int?
|
||||
let platformRole: Int?
|
||||
let bindType: Int?
|
||||
let showLimitCharge: Bool?
|
||||
let uploadGifAvatarPrice: Int?
|
||||
let hasRegPacket: Bool?
|
||||
let hasPrettyErbanNo: Bool?
|
||||
let hasSuperRole: Bool?
|
||||
let isRechargeUser: Bool?
|
||||
let isFirstCharge: Bool?
|
||||
let fromSayHelloChannel: Bool?
|
||||
let partitionId: Int?
|
||||
let useStatus: Int?
|
||||
let micNickColor: String?
|
||||
let micCircle: String?
|
||||
let audioCard: AudioCard?
|
||||
let userInfoSkillVo: UserInfoSkillVo?
|
||||
let userInfoCardPic: String?
|
||||
let iosBubbleUrl: String?
|
||||
let androidBubbleUrl: String?
|
||||
let status: String? // 兼容旧字段
|
||||
let username: String? // 兼容旧字段
|
||||
let email: String? // 兼容旧字段
|
||||
let phone: String? // 兼容旧字段
|
||||
let updateTime: String? // 兼容旧字段
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case uid
|
||||
case userId = "user_id"
|
||||
case username
|
||||
case nick
|
||||
case nickname
|
||||
case avatar
|
||||
case region
|
||||
case regionDesc
|
||||
case gender
|
||||
case birth
|
||||
case userDesc
|
||||
case userLevelVo
|
||||
case userVipInfoVO
|
||||
case medalsPic
|
||||
case userHeadwear
|
||||
case privatePhoto
|
||||
case createTime
|
||||
case phoneAreaCode
|
||||
case erbanNo
|
||||
case isCertified
|
||||
case isBindPhone
|
||||
case isBindApple
|
||||
case isBindPasswd
|
||||
case isBindPaymentPwd
|
||||
case banAccount
|
||||
case visitNum
|
||||
case fansNum
|
||||
case followNum
|
||||
case visitHide
|
||||
case visitListView
|
||||
case newUser
|
||||
case defUser
|
||||
case platformRole
|
||||
case bindType
|
||||
case showLimitCharge
|
||||
case uploadGifAvatarPrice
|
||||
case hasRegPacket
|
||||
case hasPrettyErbanNo
|
||||
case hasSuperRole
|
||||
case isRechargeUser
|
||||
case isFirstCharge
|
||||
case fromSayHelloChannel
|
||||
case partitionId
|
||||
case useStatus
|
||||
case micNickColor
|
||||
case micCircle
|
||||
case audioCard
|
||||
case userInfoSkillVo
|
||||
case userInfoCardPic
|
||||
case iosBubbleUrl
|
||||
case androidBubbleUrl
|
||||
case status
|
||||
case username
|
||||
case email
|
||||
case phone
|
||||
case status
|
||||
case createTime = "create_time"
|
||||
case updateTime = "update_time"
|
||||
case updateTime
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - 嵌套对象结构体
|
||||
struct UserLevelVo: Codable, Equatable {
|
||||
let experUrl: String?
|
||||
let charmLevelSeq: Int?
|
||||
let experLevelName: String?
|
||||
let charmLevelName: String?
|
||||
let charmAmount: Int?
|
||||
let experLevelGrp: String?
|
||||
let charmUrl: String?
|
||||
let experLevelSeq: Int?
|
||||
let experAmount: Int?
|
||||
let charmLevelGrp: String?
|
||||
}
|
||||
|
||||
struct UserVipInfoVO: Codable, Equatable {
|
||||
let vipIcon: String?
|
||||
let nameplateId: Int?
|
||||
let vipLogo: String?
|
||||
let userCardBG: String?
|
||||
let preventKick: Bool?
|
||||
let preventTrace: Bool?
|
||||
let preventFollow: Bool?
|
||||
let micNickColour: String?
|
||||
let micCircle: String?
|
||||
let enterRoomEffects: String?
|
||||
let medalSeat: Int?
|
||||
let friendNickColour: String?
|
||||
let visitHide: Bool?
|
||||
let visitListView: Bool?
|
||||
let privateChatLimit: Bool?
|
||||
let nameplateUrl: String?
|
||||
let roomPicScreen: Bool?
|
||||
let uploadGifAvatar: Bool?
|
||||
let expireTime: Int64?
|
||||
let enterHide: Bool?
|
||||
let vipLevel: Int?
|
||||
let vipName: String?
|
||||
}
|
||||
|
||||
struct MedalsPic: Codable, Equatable {
|
||||
let picUrl: String?
|
||||
let mp4Url: String?
|
||||
}
|
||||
|
||||
struct UserHeadwear: Codable, Equatable {
|
||||
let expireTime: Int64?
|
||||
let renewPrice: Int?
|
||||
let uid: Int?
|
||||
let comeFrom: Int?
|
||||
let labelType: Int?
|
||||
let limitDesc: String?
|
||||
let redirectLink: String?
|
||||
let headwearId: Int?
|
||||
let buyTime: Int64?
|
||||
let pic: String?
|
||||
let used: Bool?
|
||||
let price: Int?
|
||||
let originalPrice: Int?
|
||||
let type: Int?
|
||||
let days: Int?
|
||||
let headwearName: String?
|
||||
let effect: String?
|
||||
let expireDays: Int?
|
||||
let status: Int?
|
||||
}
|
||||
|
||||
struct PrivatePhoto: Codable, Equatable {
|
||||
let seqNo: Int?
|
||||
let photoUrl: String?
|
||||
let createTime: Int64?
|
||||
let review: Bool?
|
||||
let pid: Int?
|
||||
}
|
||||
|
||||
struct AudioCard: Codable, Equatable {
|
||||
let uid: Int?
|
||||
let status: Int?
|
||||
}
|
||||
|
||||
struct UserInfoSkillVo: Codable, Equatable {
|
||||
let liveTag: Bool?
|
||||
let liveSkillVoList: [LiveSkillVo]?
|
||||
}
|
||||
|
||||
struct LiveSkillVo: Codable, Equatable {
|
||||
// 具体字段根据API返回补充,这里暂留空
|
||||
}
|
||||
|
||||
// MARK: - Login Helper
|
||||
struct LoginHelper {
|
||||
|
||||
|
Reference in New Issue
Block a user