chore: 更新 .gitignore 文件并删除过时的文档
主要变更: 1. 在 .gitignore 中添加了 Docs/ 文件夹,以忽略文档相关文件。 2. 删除了多个过时的文档,包括构建指南、编译修复指南和当前状态报告等。 此更新旨在清理项目文件,确保版本控制的整洁性。
This commit is contained in:
@@ -26,14 +26,15 @@ import Foundation
|
||||
|
||||
Api.momentsLatestList({ (data, code, msg) in
|
||||
if code == 200, let dict = data?.data as? NSDictionary {
|
||||
// 从返回数据中提取原始 dictionary 数组
|
||||
if let listArray = dict["dynamicList"] as? NSArray {
|
||||
// MJExtension 在 Swift 中的正确用法(返回 NSMutableArray)
|
||||
let modelsArray = MomentsInfoModel.mj_objectArray(withKeyValuesArray: listArray)
|
||||
let nextID = dict["nextDynamicId"] as? String ?? ""
|
||||
// 将 NSMutableArray 转换为 NSArray 传递给 OC
|
||||
completion(modelsArray as? [MomentsInfoModel] ?? [], nextID)
|
||||
// 使用 MomentsListInfoModel 序列化响应数据(标准化方式)
|
||||
// 参考: XPMomentsLatestPresenter.m line 25 / EPLoginService.swift line 34
|
||||
// Swift 中使用 mj_object(withKeyValues:) 而不是 model(withJSON:)
|
||||
if let listInfo = MomentsListInfoModel.mj_object(withKeyValues: dict) {
|
||||
let dynamicList = listInfo.dynamicList
|
||||
let nextDynamicId = listInfo.nextDynamicId
|
||||
completion(dynamicList, nextDynamicId)
|
||||
} else {
|
||||
// 序列化失败时返回空数据
|
||||
completion([], "")
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user