版本更新,分辨率开发(部分)
This commit is contained in:
parent
32a50bfa85
commit
1588233050
@ -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 = "<group>"; };
|
||||
1BC1F0D22E09389000B579A4 /* SPVerisionUpdateAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPVerisionUpdateAlertView.swift; sourceTree = "<group>"; };
|
||||
1BC1F0D42E093E9900B579A4 /* SPVersionUpdateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPVersionUpdateModel.swift; sourceTree = "<group>"; };
|
||||
1BC1F0D62E0A35EF00B579A4 /* SPVideoRevolutionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPVideoRevolutionManager.swift; sourceTree = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
@ -1032,6 +1034,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1BB91C8A2E04FD6A00A2C715 /* SPPlayerListViewModel.swift */,
|
||||
1BC1F0D62E0A35EF00B579A4 /* SPVideoRevolutionManager.swift */,
|
||||
);
|
||||
path = ViewModel;
|
||||
sourceTree = "<group>";
|
||||
@ -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 */,
|
||||
|
@ -29,3 +29,6 @@ let kSPVipAlertDateDefaultsKey = "kSPVipAlertDateDefaultsKey"
|
||||
|
||||
///更新提示
|
||||
let kSPVersionUpdateAlertDefaultsKey = "kSPVersionUpdateAlertDefaultsKey"
|
||||
|
||||
///视频清晰度
|
||||
let kSPVideoRevolutionDefaultsKey = "kSPVideoRevolutionDefaultsKey"
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 --------------
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)")
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
@ -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")
|
||||
|
||||
}
|
||||
|
22
ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Contents.json
vendored
Normal file
22
ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Contents.json
vendored
Normal file
@ -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
|
||||
}
|
||||
}
|
BIN
ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@2x.png
vendored
Normal file
BIN
ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 658 B |
BIN
ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@3x.png
vendored
Normal file
BIN
ThimraTV/Source/Assets.xcassets/icon/revolution_icon_01.imageset/Frame@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 961 B |
Loading…
x
Reference in New Issue
Block a user