From 1588233050bfe067b81ebbe12a173108f82ffdf5 Mon Sep 17 00:00:00 2001 From: zeng Date: Tue, 24 Jun 2025 10:19:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0=EF=BC=8C?= =?UTF-8?q?=E5=88=86=E8=BE=A8=E7=8E=87=E5=BC=80=E5=8F=91=EF=BC=88=E9=83=A8?= =?UTF-8?q?=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ThimraTV.xcodeproj/project.pbxproj | 4 ++ ThimraTV/Base/Define/SPUserDefaultsKey.swift | 3 + ThimraTV/Base/Extension/UIColor+SPAdd.swift | 4 ++ .../SPPlayerDetailViewController.swift | 41 ++++++++--- .../SPPlayerListViewController.swift | 19 +++-- .../Class/Player/Model/SPShortModel.swift | 29 ++++++++ .../Class/Player/View/SPPlayerListCell.swift | 1 + .../ViewModel/SPPlayerListViewModel.swift | 50 +++++++++++++ .../ViewModel/SPVideoRevolutionManager.swift | 68 ++++++++++++++++++ ThimraTV/Libs/Login/SPLoginManager.swift | 6 ++ .../revolution_icon_01.imageset/Contents.json | 22 ++++++ .../revolution_icon_01.imageset/Frame@2x.png | Bin 0 -> 658 bytes .../revolution_icon_01.imageset/Frame@3x.png | Bin 0 -> 961 bytes 13 files changed, 226 insertions(+), 21 deletions(-) create mode 100644 ThimraTV/Class/Player/ViewModel/SPVideoRevolutionManager.swift create mode 100644 ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Contents.json create mode 100644 ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@2x.png create mode 100644 ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@3x.png diff --git a/ThimraTV.xcodeproj/project.pbxproj b/ThimraTV.xcodeproj/project.pbxproj index 468507f..4d6944f 100644 --- a/ThimraTV.xcodeproj/project.pbxproj +++ b/ThimraTV.xcodeproj/project.pbxproj @@ -264,6 +264,7 @@ 1BB91E0F2E04FD6A00A2C715 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1BB91CDA2E04FD6A00A2C715 /* Localizable.strings */; }; 1BC1F0D32E09389000B579A4 /* SPVerisionUpdateAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BC1F0D22E09389000B579A4 /* SPVerisionUpdateAlertView.swift */; }; 1BC1F0D52E093E9900B579A4 /* SPVersionUpdateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BC1F0D42E093E9900B579A4 /* SPVersionUpdateModel.swift */; }; + 1BC1F0D72E0A35EF00B579A4 /* SPVideoRevolutionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BC1F0D62E0A35EF00B579A4 /* SPVideoRevolutionManager.swift */; }; 1BE7892B2DCB0E530001A8F1 /* FacebookCore in Frameworks */ = {isa = PBXBuildFile; productRef = 1BE7892A2DCB0E530001A8F1 /* FacebookCore */; }; 1BE7892D2DCB0E530001A8F1 /* FacebookLogin in Frameworks */ = {isa = PBXBuildFile; productRef = 1BE7892C2DCB0E530001A8F1 /* FacebookLogin */; }; 1BF22FD12DC2169B0082429A /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 1BF22FD02DC2169B0082429A /* FirebaseAnalytics */; }; @@ -557,6 +558,7 @@ 1BB91D0E2E04FD6A00A2C715 /* ThimraTV.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ThimraTV.entitlements; sourceTree = ""; }; 1BC1F0D22E09389000B579A4 /* SPVerisionUpdateAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPVerisionUpdateAlertView.swift; sourceTree = ""; }; 1BC1F0D42E093E9900B579A4 /* SPVersionUpdateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPVersionUpdateModel.swift; sourceTree = ""; }; + 1BC1F0D62E0A35EF00B579A4 /* SPVideoRevolutionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPVideoRevolutionManager.swift; sourceTree = ""; }; 1DBC40592DA4EDFC0093FCB0 /* ThimraTV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ThimraTV.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1F666DE0B12C863F26BE5027 /* Pods-MoviaBox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MoviaBox.debug.xcconfig"; path = "Target Support Files/Pods-MoviaBox/Pods-MoviaBox.debug.xcconfig"; sourceTree = ""; }; A1174E10BCF2C606F7818792 /* Pods-ThimraTV.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ThimraTV.release.xcconfig"; path = "Target Support Files/Pods-ThimraTV/Pods-ThimraTV.release.xcconfig"; sourceTree = ""; }; @@ -1032,6 +1034,7 @@ isa = PBXGroup; children = ( 1BB91C8A2E04FD6A00A2C715 /* SPPlayerListViewModel.swift */, + 1BC1F0D62E0A35EF00B579A4 /* SPVideoRevolutionManager.swift */, ); path = ViewModel; sourceTree = ""; @@ -1612,6 +1615,7 @@ 1BB91D312E04FD6A00A2C715 /* SPApnsAPI.swift in Sources */, 1BB91D322E04FD6A00A2C715 /* SPHomeAPI.swift in Sources */, 1BB91D332E04FD6A00A2C715 /* SPRewardsAPI.swift in Sources */, + 1BC1F0D72E0A35EF00B579A4 /* SPVideoRevolutionManager.swift in Sources */, 1BB91D342E04FD6A00A2C715 /* SPSettingAPI.swift in Sources */, 1BB91D352E04FD6A00A2C715 /* SPStatAPI.swift in Sources */, 1BB91D362E04FD6A00A2C715 /* SPUserAPI.swift in Sources */, diff --git a/ThimraTV/Base/Define/SPUserDefaultsKey.swift b/ThimraTV/Base/Define/SPUserDefaultsKey.swift index 419af4c..534d115 100644 --- a/ThimraTV/Base/Define/SPUserDefaultsKey.swift +++ b/ThimraTV/Base/Define/SPUserDefaultsKey.swift @@ -29,3 +29,6 @@ let kSPVipAlertDateDefaultsKey = "kSPVipAlertDateDefaultsKey" ///更新提示 let kSPVersionUpdateAlertDefaultsKey = "kSPVersionUpdateAlertDefaultsKey" + +///视频清晰度 +let kSPVideoRevolutionDefaultsKey = "kSPVideoRevolutionDefaultsKey" diff --git a/ThimraTV/Base/Extension/UIColor+SPAdd.swift b/ThimraTV/Base/Extension/UIColor+SPAdd.swift index 0371b18..f5d7575 100644 --- a/ThimraTV/Base/Extension/UIColor+SPAdd.swift +++ b/ThimraTV/Base/Extension/UIColor+SPAdd.swift @@ -556,5 +556,9 @@ extension UIColor { static func color94550E(alpha: CGFloat = 1) -> UIColor { return color(hex: 0x94550E, alpha: alpha) } + + static func colorE0E0E0(alpha: CGFloat = 1) -> UIColor { + return color(hex: 0xE0E0E0, alpha: alpha) + } } diff --git a/ThimraTV/Class/Player/Controller/SPPlayerDetailViewController.swift b/ThimraTV/Class/Player/Controller/SPPlayerDetailViewController.swift index e015673..fd49935 100644 --- a/ThimraTV/Class/Player/Controller/SPPlayerDetailViewController.swift +++ b/ThimraTV/Class/Player/Controller/SPPlayerDetailViewController.swift @@ -57,6 +57,13 @@ class SPPlayerDetailViewController: SPPlayerListViewController { return label }() + private lazy var revolutionButton: UIButton = { + let button = UIButton(type: .custom) + button.setImage(UIImage(named: "revolution_icon_01"), for: .normal) + button.addTarget(self, action: #selector(handleRevolutionButton), for: .touchUpInside) + return button + }() + private lazy var bottomView: UIView = { let view = UIView() view.backgroundColor = .color1C1C1E() @@ -71,6 +78,7 @@ class SPPlayerDetailViewController: SPPlayerListViewController { super.viewDidLoad() NotificationCenter.default.addObserver(self, selector: #selector(buyVipFinishNotification), name: SPIAPManager.buyVipFinishNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(reachabilityDidChangeNotification), name: SPNetworkReachabilityManager.reachabilityDidChangeNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(didChangeRevolutionNotification), name: SPVideoRevolutionManager.didChangeRevolutionNotification, object: nil) self.autoNextEpisode = true self.dataSource = self @@ -180,6 +188,7 @@ extension SPPlayerDetailViewController { view.addSubview(backButton) view.addSubview(titleLabel) view.addSubview(episodeLabel) +// view.addSubview(revolutionButton) view.addSubview(bottomView) backButton.snp.makeConstraints { make in @@ -200,6 +209,11 @@ extension SPPlayerDetailViewController { make.left.equalTo(titleLabel.snp.right).offset(16) } +// revolutionButton.snp.makeConstraints { make in +// make.right.equalToSuperview().offset(-22) +// make.centerY.equalTo(titleLabel) +// } + bottomView.snp.makeConstraints { make in make.left.right.bottom.equalToSuperview() make.top.equalTo(self.collectionView.snp.bottom) @@ -211,6 +225,10 @@ extension SPPlayerDetailViewController { self?.onEpisode() } + self.viewModel.updateDetailDataBlock = { [weak self] indexPath in + self?.requestDetailData(indexPath: indexPath) + } + } } @@ -220,7 +238,7 @@ extension SPPlayerDetailViewController { let view = SPEpisodeView() view.dataArr = detailModel?.episodeList ?? [] view.shortModel = detailModel?.shortPlayInfo - view.currentIndex = self.currentIndexPath.row + view.currentIndex = self.viewModel.currentIndexPath.row view.didSelectedIndex = { [weak self] (index) in self?.scrollToItem(indexPath: IndexPath(row: index, section: 0), animated: false) } @@ -230,16 +248,7 @@ extension SPPlayerDetailViewController { ///打开支付页面 private func onPlayBuy() { - guard let videoInfo = self.viewModel.currentPlayer?.videoInfo else { return } - - let view = SPPlayBuyView() - view.shortPlayId = videoInfo.short_play_id - view.videoId = videoInfo.short_play_video_id - view.buyFinishBlock = { [weak self] in - guard let self = self else { return } - self.requestDetailData(indexPath: self.currentIndexPath) - } - view.present(in: nil) + self.viewModel.onPlayBuy() } ///解锁视频 @@ -320,6 +329,16 @@ extension SPPlayerDetailViewController { self.isShowRecommand = true } + ///分辨率发生变化 + @objc private func didChangeRevolutionNotification() { + self.requestDetailData(indexPath: self.viewModel.currentIndexPath) + } + + @objc private func handleRevolutionButton() { + + spLog(message: "点击分辨率") + + } } //MARK: -------------- SPPlayerListViewControllerDataSource -------------- diff --git a/ThimraTV/Class/Player/Controller/SPPlayerListViewController.swift b/ThimraTV/Class/Player/Controller/SPPlayerListViewController.swift index bfe6952..b45237d 100644 --- a/ThimraTV/Class/Player/Controller/SPPlayerListViewController.swift +++ b/ThimraTV/Class/Player/Controller/SPPlayerListViewController.swift @@ -64,7 +64,6 @@ class SPPlayerListViewController: SPViewController { private(set) var viewModel = SPPlayerListViewModel() - private(set) var currentIndexPath = IndexPath(row: 0, section: 0) private lazy var collectionViewLayout: UICollectionViewLayout = { let layout = UICollectionViewFlowLayout() @@ -158,7 +157,7 @@ class SPPlayerListViewController: SPViewController { func clearDataArr() { self.dataArr.removeAll() self.viewModel.currentPlayer = nil - self.currentIndexPath = .init(row: 0, section: 0) + self.viewModel.currentIndexPath = .init(row: 0, section: 0) self.collectionView.contentOffset = .init(x: 0, y: 0) self.collectionView.reloadData() } @@ -171,7 +170,7 @@ class SPPlayerListViewController: SPViewController { self.viewModel.isPlaying = true - if getDataCount() - currentIndexPath.row <= 2 { + if getDataCount() - self.viewModel.currentIndexPath.row <= 2 { self.loadMoreData() } @@ -195,7 +194,7 @@ class SPPlayerListViewController: SPViewController { func reloadData(completion: (() -> Void)? = nil) { CATransaction.setCompletionBlock { [weak self] in guard let self = self else { return } - let cell = self.collectionView.cellForItem(at: self.currentIndexPath) as? SPPlayerListCell + let cell = self.collectionView.cellForItem(at: self.viewModel.currentIndexPath) as? SPPlayerListCell self.viewModel.currentPlayer = cell completion?() @@ -213,7 +212,7 @@ class SPPlayerListViewController: SPViewController { CATransaction.setCompletionBlock { [weak self] in guard let self = self else { return } if !animated { - if self.currentIndexPath != indexPath { + if self.viewModel.currentIndexPath != indexPath { self.skip(indexPath: indexPath) } else { self.play() @@ -331,8 +330,8 @@ extension SPPlayerListViewController: UICollectionViewDelegate, UICollectionView } - if self.viewModel.currentPlayer == nil, indexPath == currentIndexPath, let playerProtocol = cell as? SPPlayerProtocol { - self.currentIndexPath = indexPath + if self.viewModel.currentPlayer == nil, indexPath == self.viewModel.currentIndexPath, let playerProtocol = cell as? SPPlayerProtocol { + self.viewModel.currentIndexPath = indexPath self.viewModel.currentPlayer = playerProtocol didChangeIndexPathForVisible() } @@ -367,7 +366,7 @@ extension SPPlayerListViewController: UICollectionViewDelegate, UICollectionView for indexPath in indexPaths { guard let cell = self.collectionView.cellForItem(at: indexPath) else { continue } if floor(offsetY) == floor(cell.frame.origin.y) { - if self.currentIndexPath != indexPath { + if self.viewModel.currentIndexPath != indexPath { self.skip(indexPath: indexPath) } } @@ -375,7 +374,7 @@ extension SPPlayerListViewController: UICollectionViewDelegate, UICollectionView } private func skip(indexPath: IndexPath) { - currentIndexPath = indexPath + self.viewModel.currentIndexPath = indexPath guard let currentPlayer = self.collectionView.cellForItem(at: indexPath) as? SPPlayerProtocol else { return } self.viewModel.currentPlayer = currentPlayer // currentCell = self.collectionView.cellForItem(at: indexPath) as? BCListPlayerCell @@ -419,6 +418,6 @@ extension SPPlayerListViewController { } private func didChangeIndexPathForVisible() { - self.delegate?.sp_playerListViewController?(self, didChangeIndexPathForVisible: self.currentIndexPath) + self.delegate?.sp_playerListViewController?(self, didChangeIndexPathForVisible: self.viewModel.currentIndexPath) } } diff --git a/ThimraTV/Class/Player/Model/SPShortModel.swift b/ThimraTV/Class/Player/Model/SPShortModel.swift index 5851eab..1a3a10a 100644 --- a/ThimraTV/Class/Player/Model/SPShortModel.swift +++ b/ThimraTV/Class/Player/Model/SPShortModel.swift @@ -10,6 +10,32 @@ import SmartCodable class SPShortModel: SPModel, SmartCodable { + enum VideoRevolution: String, SmartCaseDefaultable { + case r_540 = "540" + case r_720 = "720" + case r_1080 = "1080" + + var needLogin: Bool { + if self == .r_720 { + return true + } else { + return false + } + } + + var needVip: Bool { + if self == .r_1080 { + return true + } else { + return false + } + } + + var toString: String { + return "\(self.rawValue)P" + } + } + enum TagType: String, SmartCaseDefaultable { case hot = "hot" case new = "new" @@ -38,6 +64,9 @@ class SPShortModel: SPModel, SmartCodable { var current_episode: String? var video_url: String? + ///视频分辨率 + var revolution: VideoRevolution? + @IgnoredKey var titleAttributedString: NSAttributedString? @IgnoredKey diff --git a/ThimraTV/Class/Player/View/SPPlayerListCell.swift b/ThimraTV/Class/Player/View/SPPlayerListCell.swift index b5fa3d7..55e6bed 100644 --- a/ThimraTV/Class/Player/View/SPPlayerListCell.swift +++ b/ThimraTV/Class/Player/View/SPPlayerListCell.swift @@ -216,6 +216,7 @@ extension SPPlayerListCell: SPPlayerDelegate { func sp_playerReadyToPlay(_ player: SPPlayer) { self.seekToTime(toTime: (videoInfo?.play_seconds ?? 0) / 1000) + player.rate = self.viewModel?.speedModel.getRate() ?? 1 // spLog(message: "play_seconds ====== \(videoInfo?.play_seconds ?? 0)") } diff --git a/ThimraTV/Class/Player/ViewModel/SPPlayerListViewModel.swift b/ThimraTV/Class/Player/ViewModel/SPPlayerListViewModel.swift index 9eb00e5..ec4ae53 100644 --- a/ThimraTV/Class/Player/ViewModel/SPPlayerListViewModel.swift +++ b/ThimraTV/Class/Player/ViewModel/SPPlayerListViewModel.swift @@ -11,6 +11,8 @@ class SPPlayerListViewModel: NSObject { @objc dynamic var isPlaying: Bool = true + var currentIndexPath = IndexPath(row: 0, section: 0) + private var _currentPlayer: SPPlayerProtocol? var currentPlayer: SPPlayerProtocol? { set { @@ -50,5 +52,53 @@ class SPPlayerListViewModel: NSObject { var handlePlayTimeDidChange: ((_ time: Int) -> Void)? ///选集 var handleEpisode: (() -> Void)? + ///更新数据 + var updateDetailDataBlock: ((_ toIndexPath: IndexPath?) -> Void)? } + +extension SPPlayerListViewModel { + ///选择分辨路 + func selectedRevolution(revolution: SPShortModel.VideoRevolution) { + guard SPVideoRevolutionManager.manager.revolution != revolution else { return } + let userInfo = SPLoginManager.manager.userInfo + + + if revolution.needLogin, userInfo?.is_tourist != false, userInfo?.is_vip != true { + +// SPLoginManager.manager.openLogin { [weak self] in +// guard let _ = self else { return } +// VPVideoRevolutionManager.manager.setVideoRevolution(revolution: revolution) +// } + + } else if revolution.needVip, userInfo?.is_vip != true { +// let alert = VPAlertView(title: "veloria_vip_activate_title".localized, subtitle: "veloria_vip_activate_content".localized, icon: UIImage(named: "alert_icon_06"), normalButtonText: "veloria_later".localized, highlightButtonText: "veloria_go".localized).show() +// alert.clickHighlightButton = { [weak self] in +// DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) { +// } +// } +// self?.showRechargeView(revolution: revolution) + + } else { + SPVideoRevolutionManager.manager.setVideoRevolution(revolution: revolution) + } + + } + + + ///打开支付页面 + func onPlayBuy() { + guard let videoInfo = self.currentPlayer?.videoInfo else { return } + + let view = SPPlayBuyView() + view.shortPlayId = videoInfo.short_play_id + view.videoId = videoInfo.short_play_video_id + view.buyFinishBlock = { [weak self] in + guard let self = self else { return } +// self.requestDetailData(indexPath: self.currentIndexPath) + self.updateDetailDataBlock?(self.currentIndexPath) + } + view.present(in: nil) + } + +} diff --git a/ThimraTV/Class/Player/ViewModel/SPVideoRevolutionManager.swift b/ThimraTV/Class/Player/ViewModel/SPVideoRevolutionManager.swift new file mode 100644 index 0000000..48cf81c --- /dev/null +++ b/ThimraTV/Class/Player/ViewModel/SPVideoRevolutionManager.swift @@ -0,0 +1,68 @@ +// +// SPVideoRevolutionManager.swift +// ThimraTV +// +// Created by 长沙佳儿 on 2025/6/24. +// + +import UIKit + +class SPVideoRevolutionManager: NSObject { + + static let manager = SPVideoRevolutionManager() + + ///当前分辨率 + lazy var revolution: SPShortModel.VideoRevolution = { + let userInfo = SPLoginManager.manager.userInfo + + if let revolution = UserDefaults.standard.object(forKey: kSPVideoRevolutionDefaultsKey) as? String { + var revolution = verify(revolution: SPShortModel.VideoRevolution.init(rawValue: revolution) ?? .r_540) + return revolution + } + return .r_540 + }() + + override init() { + super.init() + NotificationCenter.default.addObserver(self, selector: #selector(userInfoUpdateNotification), name: SPLoginManager.userInfoUpdateNotification, object: nil) + } + + @objc private func userInfoUpdateNotification() { + self.setVideoRevolution(revolution: self.revolution) + } + + func setVideoRevolution(revolution: SPShortModel.VideoRevolution) { + let newRevolution = verify(revolution: revolution) + + if newRevolution != self.revolution { + self.revolution = newRevolution + NotificationCenter.default.post(name: SPVideoRevolutionManager.didChangeRevolutionNotification, object: nil) + UserDefaults.standard.set(newRevolution.rawValue, forKey: kSPVideoRevolutionDefaultsKey) + } + } +} + +extension SPVideoRevolutionManager { + + ///校验分辨率是否可用,并返回可用分辨率 + func verify(revolution: SPShortModel.VideoRevolution) -> SPShortModel.VideoRevolution { + let userInfo = SPLoginManager.manager.userInfo + var newRevolution = revolution + if userInfo?.is_vip != true { + if newRevolution == .r_1080 { + newRevolution = .r_720 + } + if userInfo?.is_tourist != false, revolution != .r_540 { + newRevolution = .r_540 + } + } + return newRevolution + } + +} + +extension SPVideoRevolutionManager { + + ///分辨率发生变化 + @objc static let didChangeRevolutionNotification = NSNotification.Name(rawValue: "SPVideoRevolutionManager.didChangeRevolutionNotification") +} diff --git a/ThimraTV/Libs/Login/SPLoginManager.swift b/ThimraTV/Libs/Login/SPLoginManager.swift index 3f6f6e6..203eaae 100644 --- a/ThimraTV/Libs/Login/SPLoginManager.swift +++ b/ThimraTV/Libs/Login/SPLoginManager.swift @@ -87,6 +87,7 @@ class SPLoginManager: NSObject { SPStatAPI.requestEnterApp() SPStatAPI.requestStatOnLine() completer?(true) + NotificationCenter.default.post(name: SPLoginManager.userInfoUpdateNotification, object: nil) NotificationCenter.default.post(name: SPLoginManager.loginStateDidChangeNotification, object: nil) } else { completer?(false) @@ -107,6 +108,7 @@ class SPLoginManager: NSObject { SPStatAPI.requestEnterApp() SPStatAPI.requestStatOnLine() completer?(true) + NotificationCenter.default.post(name: SPLoginManager.userInfoUpdateNotification, object: nil) NotificationCenter.default.post(name: SPLoginManager.loginStateDidChangeNotification, object: nil) } else { completer?(false) @@ -122,6 +124,7 @@ class SPLoginManager: NSObject { if let userInfo = userInfo { self.userInfo = userInfo UserDefaults.jx_setObject(userInfo, forKey: kSPLoginUserInfoDefaultsKey) + NotificationCenter.default.post(name: SPLoginManager.userInfoUpdateNotification, object: nil) } completer?() } @@ -166,6 +169,7 @@ extension SPLoginManager { SPStatAPI.requestEnterApp() SPStatAPI.requestStatOnLine() completer?(true) + NotificationCenter.default.post(name: SPLoginManager.userInfoUpdateNotification, object: nil) NotificationCenter.default.post(name: SPLoginManager.loginStateDidChangeNotification, object: nil) } @@ -177,5 +181,7 @@ extension SPLoginManager { ///登录状态发生变化 @objc static let loginStateDidChangeNotification = NSNotification.Name(rawValue: "SPLoginManager.loginStateDidChangeNotification") + ///用户信息更新 + @objc static let userInfoUpdateNotification = NSNotification.Name(rawValue: "SPLoginManager.userInfoUpdateNotification") } diff --git a/ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Contents.json b/ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Contents.json new file mode 100644 index 0000000..5c4d3b1 --- /dev/null +++ b/ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Frame@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@2x.png b/ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ed1dce0bfab7e3107bbd8ceeb4ef53f3e52f57 GIT binary patch literal 658 zcmV;D0&V??P)AT2y}vW195`d3B(C(C(uq%ouE2_ZXiy8P9Pi94bnRj^uX8`pnXkz`QAH& z7b5vha)blGzCIQ9JwZj45P*jz1w$Peco*m+Y;{YL2dQgun& z0AG#UltWP|7AbSZV8}hRC)7o-vJSelhqI7J(?*>Hp-tfL;Jf_@47s@* zYnKtC?Z(@cx)10+?ZVo%jOZjtMWhRGZB3xNpdLFme%Q2f%Bd&ln7Q_*ZEamc^(i|u zY}aYZ{T87bk#Zk5glfiVUM4_HutCs3nGV_(y+Q+QopMD4MKOJ7NYfFbX!Fi4dW|`p z*FdVNr!?7C4x`H{+yo>jSH}@J3d>j>Nl-bLhu|(_Rc?#74Qw4b zC#u%}xOC2#bK*jPP|3v!>vyr6;IC82F=lNjMBAEtjG(&aml*1ki?dWdEEDdq5w)Cr spp!3Tmc{m5civ===ka(v9*?I5-!9=Dgf5S(82|tP07*qoM6N<$f(D%uU;qFB literal 0 HcmV?d00001 diff --git a/ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@3x.png b/ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..7f9b44d3d3e0f10239c888db3dd186f0b2928251 GIT binary patch literal 961 zcmV;y13vtTP)?;^QRmM^wJHU#T_ z@97!qBY{8CNjjYX1VIo4K@bE%5Cq}8NSX?@)+s)IVEPVm@q%faBuRd%0xKK}mf_+0qlsJT-m5SJ;RtGR=V|j$7AO&|8PdelXmXrE-L41%i>{io z*#+j^IOS^)PVwmcd`U{~9VJr`SUi)q2XE{u5Ln2rxk6ol&Ro1a0+#C4hhZXcF)qdL$+rH*4$7ub~$k_rZ`&n_`;Sq`-JL6jPUWNe8rjQwU@f!f}p9 zYh!76DzAt(?dvA*ZWl&7RIQj-U}jjKV0$-e8)u!4znCJL%~J?q^pk@fk~ve9LIAPM zs+`v+=pbsy$>A1USQ z=!LU>IK>p@5WuK~vkUMUQ?v|SqKv_BwEH4(`-72K*k^(op)}WciOQut=r~( zEQm)T9CY_|Oi{Go&;zl|syUdTz+OZnMrq?LWXovD@f7MN=Sb*`(0Tv%mhq1t!P%9q zA2z_Wqc*-5rD*ycI(TmBI}bx_>?>M%2e=A^lf-l&Js2WfM|{^530FApv0n&j!qw(L z!nqMWDF~-<&rh~~@bq3Lh&tMYvF;q5vNA-|jRW3*P{D?ZxuIjKEbuQuEc5_=`p*dJ z@Zf24=U3pa-((Oe+5|oR@iciZ%l+GfOQ;$_f>z?gg@m3TWvEzfCj@4{d)y7x?yG7O zW7})=;s|&|!74-a)J0zf#&b%(`dDop^{gi_LEyPxn6$OlW>Z~8JH`SH%c9LmAqavX j2!bF8f*=Tj5HJ4#7Z1&NJqz?~00000NkvXXu0mjf=(MSy literal 0 HcmV?d00001