     /// - Parameter page: 页数
     /// - Returns: 返回帖子列表获取结果
     private func fetchThreads(at page: Int) -> Observable<HiPDAThreadsResult> {
+        let fid = self.fid
+        let typeid = self.typeid
         return Observable.create { observer in
-            HiPDAProvider.request(.threads(fid: self.fid, typeid: self.typeid, page: page))
+            HiPDAProvider.request(.threads(fid: fid, typeid: typeid, page: page))
                 .observeOn(ConcurrentDispatchQueueScheduler(qos: DispatchQoS.background))
                 .mapGBKString()
                 .map {

    /// disposeBag
    private var disposeBag = DisposeBag()
    
    /// 获取第一页帖子列表
    ///
    /// - Parameter completion: 返回帖子列表获取结果
    mutating func firstPageThreads(completion: @escaping HiPDAThreadsFetchCompletion = { _ in }) {
        disposeBag = DisposeBag()
        state = .refreshing
        fetchThreads(at: 1).subscribe { [`self` = self] event in
            var mutaingSelf = self
            mutaingSelf.handleThreadsFetch(event: event, at: 1, state: .refreshing, completion: completion)
        }.disposed(by: disposeBag)
    }
    
    /// 获取下一页帖子列表
    ///
    /// - Parameter completion: 返回帖子列表获取结果
    mutating func nextPageThreads(completion: @escaping HiPDAThreadsFetchCompletion = { _ in }) {
        disposeBag = DisposeBag()
        state = .loadingMore
        fetchThreads(at: page + 1).subscribe { [`self` = self] event in
            var mutaingSelf = self
            mutaingSelf.handleThreadsFetch(event: event, at: 1, state: .loadingMore, completion: completion)
        }.disposed(by: disposeBag)
    }
    

}

/// 帖子列表管理
class HiPDAThreadManager {
    /// 帖子列表
    fileprivate(set) var threads: [HiPDAThread]
    
