// // LoadingPlugin.swift // SwiftBilibili // // Created by 罗文 on 2021/1/15. // Copyright © 2021年 罗文. All rights reserved. // import Moya //import Result class LoadingPlugin : PluginType { func willSend(_ request: RequestType, target: TargetType) { // if target is LoginAPI { // let api = target as! LoginAPI // if api.isShowLoading { // guard let curController = UIViewController.topMost else { return } //// curController.showLoadingAnimation(superView: curController.view) // QMUITips.showLoading(in: curController.view) // } // } } func didReceive(_ result: Result, target: TargetType) { // if target is LoginAPI { // let api = target as! LoginAPI // if api.isShowLoading { // guard let curController = UIViewController.topMost else { return } //// curController.hideLoadingAnimation(superView: curController.view) // QMUITips.hideAllTips() // } // } } }