|
@@ -132,26 +132,33 @@ public func kf_imageCacheImage(originUrl: String, completeHandle: @escaping (_ i
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-/** 打印 */
|
|
|
|
-public func BFLog<T>(message: T) {
|
|
|
|
-// if PQBFConfig.shared.enableBFLog {
|
|
|
|
|
|
|
|
-// let logger = NXLogger.shared
|
|
|
|
-//
|
|
|
|
-// logger.level = .info
|
|
|
|
-// logger.ouput = .debuggerConsole
|
|
|
|
-//
|
|
|
|
-// logger.d(message as? String ?? "")
|
|
|
|
-// } else {
|
|
|
|
-// BuglyLog.level(.warn, logs: message as? String)
|
|
|
|
-// }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-public func HHZPrint<T>(_ message:T,file:String = #file,funcName:String = #function,lineNum:Int = #line){
|
|
|
|
- #if DEBUG
|
|
|
|
- let file = (file as NSString).lastPathComponent;
|
|
|
|
- print("hhz-\(file):(\(lineNum))--\(message)");
|
|
|
|
- #endif
|
|
|
|
|
|
+/** 打印
|
|
|
|
+ type = 1 : 胡志强
|
|
|
|
+ type = 2 :王成
|
|
|
|
+ type = 3 : 文伟伟
|
|
|
|
+
|
|
|
|
+ */
|
|
|
|
+public func BFLog<T>( _ type : Int = 0, _ file:String = #file, _ line:Int = #line, message: T) {
|
|
|
|
+ let dateFmt = DateFormatter()
|
|
|
|
+ dateFmt.dateFormat = "HH:mm:ss:SSSS"
|
|
|
|
+ let file = (file as NSString).lastPathComponent;
|
|
|
|
+ let msg = "\(file) (L:\(line)) \(message)"
|
|
|
|
+ if type == 0{
|
|
|
|
+// BuglyLog.level(.warn, logs: msg)
|
|
|
|
+ print("\(dateFmt.string(from: Date())) \(msg)")
|
|
|
|
+ }
|
|
|
|
+#if DEBUG
|
|
|
|
+ if type == 1 {
|
|
|
|
+ print("hhz-\(dateFmt.string(from: Date())) \(msg)");
|
|
|
|
+ }else if type == 2 {
|
|
|
|
+ print("ak-\(dateFmt.string(from: Date())) \(msg)");
|
|
|
|
+ }else if type == 3 {
|
|
|
|
+ print("ww-\(dateFmt.string(from: Date())) \(msg)");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+#endif
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
// MARK: 获取公共参数
|
|
// MARK: 获取公共参数
|
|
@@ -945,3 +952,21 @@ public func getLaunchImage() -> UIImage {
|
|
}
|
|
}
|
|
return lauchImg
|
|
return lauchImg
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+public func currentBundlePath() -> Bundle?{
|
|
|
|
+// var associateBundleURL = Bundle.main.url(forResource: "Frameworks", withExtension: nil)
|
|
|
|
+// associateBundleURL = associateBundleURL?.appendingPathComponent("BFFramework")
|
|
|
|
+// associateBundleURL = associateBundleURL?.appendingPathExtension("framework")
|
|
|
|
+//
|
|
|
|
+// if associateBundleURL == nil {
|
|
|
|
+// print("获取bundle失败")
|
|
|
|
+// return nil
|
|
|
|
+// }
|
|
|
|
+// let associateBunle = Bundle(url: associateBundleURL!)
|
|
|
|
+ let associateBundleURL = Bundle.main.url(forResource: "BFFramework_Resources", withExtension: "bundle")
|
|
|
|
+ if associateBundleURL == nil {
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+ return Bundle(url: associateBundleURL!)
|
|
|
|
+}
|
|
|
|
+
|