From 945655d9f53293d7da9d2d11363b3230f6e53bbe Mon Sep 17 00:00:00 2001 From: younger_times <841720330@qq.com> Date: 星期三, 26 四月 2023 18:17:28 +0800 Subject: [PATCH] API 接入 --- BrokerDriver/Def.swift | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/BrokerDriver/Def.swift b/BrokerDriver/Def.swift index a2d15f3..4af840f 100644 --- a/BrokerDriver/Def.swift +++ b/BrokerDriver/Def.swift @@ -7,8 +7,12 @@ import Foundation import UIKit +import MBProgressHUD @_exported import JQTools @_exported import QMUIKit +@_exported import HandyJSON +@_exported import RxSwift + // MARK: -- Shorthand let app = UIApplication.shared.delegate as! AppDelegate @@ -58,3 +62,37 @@ let Def_NavFontColor:UIColor = .color(light: .color("#333333"), dark: .color("#333333")) let Def_backgroundColor:UIColor = .color(light: .white, dark: .white) let Def_ThemeColor:UIColor = .color(light: .color("#FED703"), dark: .color("#FED703")) + + + //提示框 +func alert(msg: String) { + let hud = MBProgressHUD.showAdded(to: screnDelegate!.window!, animated: true) + hud.mode = .text + hud.label.text = msg + // hud.backgroundColor = UIColor.RGBA(r: 228, g: 228, b: 228, a: 1) + hud.label.textColor = UIColor(hexString: "#343434") + hud.label.numberOfLines = 0 + hud.label.font = UIFont.boldSystemFont(ofSize: 14) + hud.hide(animated: true, afterDelay: 1.7) +} + + +//extension UICollectionView{ +// public func jq_setEmptyView( _ noticeStr:String? = nil,image:UIImage? = UIImage(named: "icon_empty"),foregroundColor:UIColor = UIColor.gray,clouse:((EmptyDataSetView)->Void)? = nil) { +// self.emptyDataSetView { (emptyDataSetView) in +// emptyDataSetView.titleLabelString(NSAttributedString.init(string: (noticeStr != nil) ? noticeStr! : Localized("暂无数据"), attributes: [.font:UIFont.systemFont(ofSize: 16,weight: .medium), .foregroundColor:foregroundColor as Any])) +// .image(image) +// .dataSetBackgroundColor(UIColor.white) +// .verticalOffset(-50) +// .verticalSpace(0) +// .shouldDisplay(true) +// .shouldFadeIn(true) +// .isTouchAllowed(true) +// .isScrollAllowed(true) +// .didTapContentView { +// +// } +// clouse?(emptyDataSetView) +// } +// } +//} -- Gitblit v1.7.1