Skip to content

Commit

Permalink
fix getJiDataFirst
Browse files Browse the repository at this point in the history
  • Loading branch information
Finb committed Sep 22, 2018
1 parent 3db9705 commit 2082b31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Model/Moya/Observable+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ extension Observable where Element: Moya.Response {
/// 在将 Ji 对象转换成 Model 之前,可能需要先获取 Ji 对象的数据
/// 例如获取我的收藏帖子列表时,除了需要将 Ji 数据 转换成 TopicListModel
/// 还需要额外获取最大页码,这个最大页面就从这个方法中获得
func getJiDataFirst(hander:((_ ji: Ji) -> Void)) -> Observable<Ji> {
func getJiDataFirst(hander:@escaping ((_ ji: Ji) -> Void)) -> Observable<Ji> {
return filterJiResponseError().map({ (response: Ji) -> Ji in
hander(response)
return response
})
}
Expand Down

0 comments on commit 2082b31

Please sign in to comment.