             readPostVC.postInfo = PostInfo(urlString: url.absoluteString)
             show(readPostVC)
         case .redirect:
-            topVC?.showPromptInformation(of: .loading("正在解析链接..."))
-            HiPDAProvider.manager.delegate.taskWillPerformHTTPRedirectionWithCompletion = { (sesseion, task, response, request, completion) in
-                DispatchQueue.main.async {
-                    self.topVC?.hidePromptInformation()
-                    if let url = request.url?.absoluteString {
-                        URLDispatchManager.shared.linkActived(url)
-                    }
-                    HiPDAProvider.manager.delegate.taskWillPerformHTTPRedirectionWithCompletion = nil
-                    self.redirectDisposeBag = DisposeBag()
-                }
-            }
-            guard let index = url.absoluteString.range(of: "/forum/redirect.php?")?.lowerBound else {
-                topVC?.hidePromptInformation()
-                topVC?.showPromptInformation(of: .failure("链接解析错误！"))
-                return
-            }
-            HiPDAProvider.request(.redirect(url.absoluteString.substring(from: index))).asObservable().subscribe(onNext: { [ weak self] response in
-                self?.redirectDisposeBag = DisposeBag()
-            }).disposed(by: redirectDisposeBag)
+            openRedirectURL(url)
         case .userProfile:
-            do {
-                let uid = try HtmlParser.uid(from: url.absoluteString)
-                let userProfileVC = UserProfileViewController.load(from: .home)
-                userProfileVC.user = User(name: "", uid: uid)
-                show(userProfileVC)
-            } catch {
-                topVC?.showPromptInformation(of: .failure("\(error)"))
-            }
+            openUserProfile(url)
         case .internal:
             topVC?.showPromptInformation(of: .failure("暂不支持在APP内打开该链接!"))
         }

            topVC?.present(navi, animated: true, completion: nil)
        }
    }
    
    func showExternalURL(url: URL) {
        guard let scheme = url.scheme, scheme.contains("http") || scheme.contains("https") else {
            if #available(iOS 10.0, *) {
                UIApplication.shared.open(url, options: [:], completionHandler: nil)

        }).disposed(by: disposeBag)
    }
    
    fileprivate var topVC: UIViewController? {
        return UIApplication.topViewController()
    }
    
