|
@@ -0,0 +1,143 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+import UIKit
|
|
|
+import Photos
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+public class PQSingletoMemoryUtil: NSObject {
|
|
|
+ public static let shared = PQSingletoMemoryUtil()
|
|
|
+ public var isShowAttendPoint: Bool = false
|
|
|
+ public var attendIdosUpdateCount: Int = 0
|
|
|
+ public var isLeftSlipRemind: Bool = false
|
|
|
+ public var needLogin: Bool = false
|
|
|
+ public var isFinishedCoging: Bool = false
|
|
|
+ public var isFinishedAlias: Bool = false
|
|
|
+ public var selectedTabIndex: String?
|
|
|
+ public var commandVideoItem: BFVideoItemProtocol?
|
|
|
+ public var commandLaunchParams: String = ""
|
|
|
+ public var commandReportParams: [String: Any]?
|
|
|
+ public var h5MsgVid: String?
|
|
|
+ public var isShowNoWiFiRemind: Bool = false
|
|
|
+ public var isNeedRefreshAttend: Bool = false
|
|
|
+ public var isNeedRefreshJoinTopic: Bool = false
|
|
|
+
|
|
|
+
|
|
|
+ public var isEmptyPasteContent: Bool = false {
|
|
|
+ didSet {
|
|
|
+ BFLog(message: "isEmptyPasteContent = \(isEmptyPasteContent)")
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public var isShowPasteNoServeView: Bool = false {
|
|
|
+ didSet {
|
|
|
+ BFLog(message: "isShowPasteNoServeView = \(isShowPasteNoServeView)")
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public var isLoadingSplashAdView: Bool = false {
|
|
|
+ didSet {
|
|
|
+ BFLog(message: "isLoadingSplashAdView = \(isLoadingSplashAdView)")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public var cutBoardInfo: String?
|
|
|
+ public var cutBoard: String?
|
|
|
+ public var isPushLoading: Bool = false
|
|
|
+
|
|
|
+ public var coldLaunchType: coldLaunchType?
|
|
|
+ public var isColdLaunch: Bool = false
|
|
|
+ public var coldLaunchStatus: Int = 0
|
|
|
+ public var deviceToken: String = ""
|
|
|
+ public var activityData: Dictionary<String,Any>?
|
|
|
+ public var isShowTodaySuccess: Bool = false
|
|
|
+ public var sessionId: String = getUniqueId(desc: "sessionId")
|
|
|
+ public var subSessionid: String?
|
|
|
+ public var isDefaultAtten: Bool = false
|
|
|
+ public var isDefaultMineSingleVideoDetail: Bool = false
|
|
|
+ public var playCount: Int = 0
|
|
|
+ public var uploadDatas: [BFVideoItemProtocol] = Array<BFVideoItemProtocol>.init()
|
|
|
+ public var isShowUpSlideGuide: Bool = false
|
|
|
+ public var showUpSlideData: BFVideoItemProtocol?
|
|
|
+ public var makeVideoProjectId: String?
|
|
|
+ public var draftboxId: String?
|
|
|
+
|
|
|
+ public var sdata: String?
|
|
|
+
|
|
|
+ public var title: String?
|
|
|
+
|
|
|
+ public var coverUrl: String?
|
|
|
+
|
|
|
+
|
|
|
+ public var unReadInfo: Dictionary<String,Any>?
|
|
|
+ public var abInfoData: [String: Any] = Dictionary<String, Any>.init()
|
|
|
+ public var allExportSession: [PHAsset:AVAssetExportSession] = [PHAsset:AVAssetExportSession].init()
|
|
|
+ public func updateTabPoint() {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public func createSesstionId() {
|
|
|
+ sessionId = getUniqueId(desc: "sessionId")
|
|
|
+ subSessionid = sessionId
|
|
|
+ BFLog(message: "生成的sessionId = \(sessionId)")
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public func createSubSesstionId() {
|
|
|
+ subSessionid = getUniqueId(desc: "subSessionid")
|
|
|
+ BFLog(message: "生成的subSessionid = \(String(describing: subSessionid))")
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public func createMakeVideoProjectId() {
|
|
|
+ makeVideoProjectId = cProjectIdPrefix + getUniqueId(desc: "makeVideoProjectId")
|
|
|
+ BFLog(message: "生成的projectId = \(String(describing: makeVideoProjectId))")
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public func parasABinfoData(abInfo: String?) {
|
|
|
+ if abInfo != nil, (abInfo?.count ?? 0) > 0, abInfo != "{}" {
|
|
|
+ guard let infoDic = jsonStringToDictionary(abInfo!) else { return }
|
|
|
+ abInfoData.merge(infoDic, uniquingKeysWith: { (key, _) -> Any in
|
|
|
+ key
|
|
|
+ })
|
|
|
+ BFLog(message: "=====abInfoData = \(abInfoData)")
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ override private init() {
|
|
|
+ super.init()
|
|
|
+ selectedTabIndex = getUserDefaults(key: cSelectedTabIndex) as? String
|
|
|
+ if selectedTabIndex == nil {
|
|
|
+ saveUserDefaults(key: cSelectedTabIndex, value: "categoryTab")
|
|
|
+ selectedTabIndex = "categoryTab"
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public override func copy() -> Any {
|
|
|
+ return self
|
|
|
+ }
|
|
|
+
|
|
|
+ public override func mutableCopy() -> Any {
|
|
|
+ return self
|
|
|
+ }
|
|
|
+}
|