1.0.1提升

This commit is contained in:
zeng 2025-08-04 19:30:23 +08:00
parent a2dfc4aac5
commit 76ac6576d1
25 changed files with 283 additions and 46 deletions

View File

@ -2646,7 +2646,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = beereel/beereel.entitlements; CODE_SIGN_ENTITLEMENTS = beereel/beereel.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8NNUR9HPV3; DEVELOPMENT_TEAM = 8NNUR9HPV3;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@ -2667,7 +2667,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.breeltv.beereel; PRODUCT_BUNDLE_IDENTIFIER = com.breeltv.beereel;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -2752,7 +2752,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = beereel/beereel.entitlements; CODE_SIGN_ENTITLEMENTS = beereel/beereel.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8NNUR9HPV3; DEVELOPMENT_TEAM = 8NNUR9HPV3;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@ -2773,7 +2773,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.breeltv.beereel; PRODUCT_BUNDLE_IDENTIFIER = com.breeltv.beereel;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@ -6,6 +6,7 @@
// //
import UIKit import UIKit
import LYEmptyView
class BRViewController: UIViewController { class BRViewController: UIViewController {
@ -14,6 +15,14 @@ class BRViewController: UIViewController {
private(set) var isDidAppear = false private(set) var isDidAppear = false
private(set) var hasViewDidAppear = false private(set) var hasViewDidAppear = false
lazy var notNetworkEmptyView: LYEmptyView = {
let view = BREmpty.br_noNetworkEmptyView { [weak self] in
self?.handleNoNetworkEmptyButton()
}
view.autoShowEmptyView = false
return view
}()
var statusBarStyle: UIStatusBarStyle = .darkContent { var statusBarStyle: UIStatusBarStyle = .darkContent {
didSet { didSet {
self.setNeedsStatusBarAppearanceUpdate() self.setNeedsStatusBarAppearanceUpdate()
@ -64,6 +73,9 @@ class BRViewController: UIViewController {
func handleFooterRefresh(_ completer: (() -> Void)?) { func handleFooterRefresh(_ completer: (() -> Void)?) {
completer?() completer?()
} }
func handleNoNetworkEmptyButton() {
}
} }

View File

@ -18,6 +18,12 @@ class BRTabBar: UITabBar {
return size return size
} }
private lazy var bgView: UIView = {
let view = UIView()
view.backgroundColor = .color1C1C1C()
return view
}()
private lazy var topImageView: UIImageView = { private lazy var topImageView: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "tabbar_top_icon")) let imageView = UIImageView(image: UIImage(named: "tabbar_top_icon"))
return imageView return imageView
@ -31,11 +37,16 @@ class BRTabBar: UITabBar {
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
self.backgroundColor = .color1C1C1C()
self.br_setRoundedCorner(topLeft: 30, topRight: 30, bottomLeft: 0, bottomRight: 0) self.br_setRoundedCorner(topLeft: 30, topRight: 30, bottomLeft: 0, bottomRight: 0)
addSubview(bgView)
addSubview(topImageView) addSubview(topImageView)
bgView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
topImageView.snp.makeConstraints { make in topImageView.snp.makeConstraints { make in
make.top.equalToSuperview() make.top.equalToSuperview()
make.centerX.equalToSuperview() make.centerX.equalToSuperview()

View File

@ -63,16 +63,32 @@ class BRExploreViewController: BRPlayerListViewController {
return button return button
}() }()
deinit {
NotificationCenter.default.removeObserver(self)
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(networkStatusDidChangeNotification), name: BRNetworkStatusManager.networkStatusDidChangeNotification, object: nil)
self.view.backgroundColor = .color1C1C1C()
self.edgesForExtendedLayout = .all self.edgesForExtendedLayout = .all
self.collectionView.br_onRefrsh = true // self.collectionView.br_onRefrsh = true
self.collectionView.br_refreshDelegate = self self.collectionView.br_refreshDelegate = self
self.collectionView.br_addRefreshHeader { [weak self] in
self?.handleHeaderRefresh(nil)
}
self.collectionView.layer.cornerRadius = 20
self.collectionView.layer.masksToBounds = true
self.delegate = self self.delegate = self
self.dataSource = self self.dataSource = self
self.requestDataArr(page: 1) self.requestDataArr(page: 1)
br_setupUI() br_setupUI()
} }
@ -99,14 +115,45 @@ class BRExploreViewController: BRPlayerListViewController {
self.collectionView.insertItems(at: indexPaths) self.collectionView.insertItems(at: indexPaths)
CATransaction.commit() CATransaction.commit()
} }
override func handleHeaderRefresh(_ completer: (() -> Void)?) {
requestDataArr(page: 1) { [weak self] in
self?.collectionView.br_endHeaderRefreshing()
}
}
@objc private func networkStatusDidChangeNotification() {
guard BRNetworkStatusManager.manager.isReachable == true else { return }
br_setupUI()
if self.dataArr.isEmpty {
self.requestDataArr(page: 1)
}
}
override func handleNoNetworkEmptyButton() {
self.requestDataArr(page: 1)
}
} }
extension BRExploreViewController { extension BRExploreViewController {
private func br_setupUI() { private func br_setupUI() {
self.view.backgroundColor = .color1C1C1C() guard self.titleImageView.superview == nil else { return }
self.collectionView.layer.cornerRadius = 20
self.collectionView.layer.masksToBounds = true if BRNetworkStatusManager.manager.isReachable != true {
self.collectionView.isHidden = true
notNetworkEmptyView.titleLabTextColor = .colorFFFFFF()
notNetworkEmptyView.detailLabTextColor = .colorFFFFFF(alpha: 0.8)
notNetworkEmptyView.actionBtnTitleColor = .colorFFFFFF()
notNetworkEmptyView.actionBtnBorderColor = .colorFFFFFF()
self.view.ly_emptyView = self.notNetworkEmptyView
self.view.ly_showEmpty()
return
}
self.collectionView.isHidden = false
self.view.ly_hideEmpty()
view.addSubview(titleImageView) view.addSubview(titleImageView)
view.addSubview(searchButton) view.addSubview(searchButton)
@ -209,9 +256,9 @@ extension BRExploreViewController: BRPlayerListViewControllerDelegate, BRPlayerL
//MARK: BRPlayerCollectionViewDelegate //MARK: BRPlayerCollectionViewDelegate
extension BRExploreViewController: BRPlayerCollectionViewDelegate { extension BRExploreViewController: BRPlayerCollectionViewDelegate {
func br_loadNewData(collectionView: BRPlayerCollectionView) { func br_loadNewData(collectionView: BRPlayerCollectionView) {
requestDataArr(page: 1) { // requestDataArr(page: 1) {
collectionView.endRefresh() // collectionView.endRefresh()
} // }
} }
func br_upwardsScrollEnd(collectionView: BRPlayerCollectionView) { func br_upwardsScrollEnd(collectionView: BRPlayerCollectionView) {

View File

@ -10,6 +10,8 @@ import WMZPageController
class BRFavoritesPageViewController: BRViewController { class BRFavoritesPageViewController: BRViewController {
private var isSetupUI = false
private lazy var vcArr: [BRViewController] = { private lazy var vcArr: [BRViewController] = {
let arr = [ let arr = [
BRFavoritesViewController(), BRFavoritesViewController(),
@ -55,9 +57,15 @@ class BRFavoritesPageViewController: BRViewController {
return view return view
}() }()
deinit {
NotificationCenter.default.removeObserver(self)
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.edgesForExtendedLayout = [.top, .bottom]
self.navigationController?.isNavigationBarHidden = true self.navigationController?.isNavigationBarHidden = true
NotificationCenter.default.addObserver(self, selector: #selector(networkStatusDidChangeNotification), name: BRNetworkStatusManager.networkStatusDidChangeNotification, object: nil)
br_setupUI() br_setupUI()
} }
@ -68,14 +76,31 @@ class BRFavoritesPageViewController: BRViewController {
self.navigationController?.setNavigationBarHidden(true, animated: true) self.navigationController?.setNavigationBarHidden(true, animated: true)
} }
override func handleNoNetworkEmptyButton() {
br_setupUI()
}
@objc private func networkStatusDidChangeNotification() {
guard BRNetworkStatusManager.manager.isReachable == true else { return }
br_setupUI()
}
} }
extension BRFavoritesPageViewController { extension BRFavoritesPageViewController {
private func br_setupUI() { private func br_setupUI() {
guard !isSetupUI else { return }
if BRNetworkStatusManager.manager.isReachable != true {
self.view.ly_emptyView = self.notNetworkEmptyView
self.view.ly_showEmpty()
return
}
self.view.ly_hideEmpty()
view.addSubview(pageView) view.addSubview(pageView)
self.isSetupUI = true
} }
} }

View File

@ -144,6 +144,10 @@ class BRHomeViewController: BRViewController {
return button return button
}() }()
deinit {
NotificationCenter.default.removeObserver(self)
}
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.edgesForExtendedLayout = [.top, .bottom] self.edgesForExtendedLayout = [.top, .bottom]
@ -153,10 +157,8 @@ class BRHomeViewController: BRViewController {
br_setupUI() br_setupUI()
requestHomeData()
requestPlayHistorys()
setupPageView() requestAllData()
updateStatusBarStyle() updateStatusBarStyle()
} }
@ -202,14 +204,26 @@ class BRHomeViewController: BRViewController {
self.requestGroup.notify(queue: .main) { [weak self] in self.requestGroup.notify(queue: .main) { [weak self] in
self?.pageView.downSc?.br_endHeaderRefreshing() self?.pageView.downSc?.br_endHeaderRefreshing()
} }
} }
override func handleNoNetworkEmptyButton() {
self.requestAllData()
}
} }
extension BRHomeViewController { extension BRHomeViewController {
private func br_setupUI() { private func br_setupUI() {
guard self.pageView.superview == nil else { return }
if BRNetworkStatusManager.manager.isReachable != true {
self.view.ly_emptyView = self.notNetworkEmptyView
self.view.ly_showEmpty()
return
}
self.view.ly_hideEmpty()
view.addSubview(bgImageView) view.addSubview(bgImageView)
view.addSubview(pageView) view.addSubview(pageView)
menuLeftView.addSubview(searchButton) menuLeftView.addSubview(searchButton)
@ -225,6 +239,8 @@ extension BRHomeViewController {
make.left.equalToSuperview().offset(15) make.left.equalToSuperview().offset(15)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
setupPageView()
} }
/// ///
@ -262,6 +278,7 @@ extension BRHomeViewController {
guard BRNetworkStatusManager.manager.isReachable == true else { guard BRNetworkStatusManager.manager.isReachable == true else {
return return
} }
self.br_setupUI()
if self.viewModel.homeOldDataArr.isEmpty { if self.viewModel.homeOldDataArr.isEmpty {
self.handleHeaderRefresh(nil) self.handleHeaderRefresh(nil)
@ -278,6 +295,12 @@ extension BRHomeViewController {
extension BRHomeViewController { extension BRHomeViewController {
private func requestAllData() {
self.requestHomeData()
self.requestPlayHistorys()
}
private func requestHomeData(completer: (() -> Void)? = nil) { private func requestHomeData(completer: (() -> Void)? = nil) {
BRHomeAPI.requestHomeData { [weak self] list in BRHomeAPI.requestHomeData { [weak self] list in

View File

@ -61,6 +61,7 @@ class BRMineViewController: BRViewController {
super.viewDidLoad() super.viewDidLoad()
self.edgesForExtendedLayout = [.top, .bottom] self.edgesForExtendedLayout = [.top, .bottom]
NotificationCenter.default.addObserver(self, selector: #selector(userInfoUpdateNotification), name: BRLoginManager.userInfoUpdateNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(userInfoUpdateNotification), name: BRLoginManager.userInfoUpdateNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(networkStatusDidChangeNotification), name: BRNetworkStatusManager.networkStatusDidChangeNotification, object: nil)
br_setupUI() br_setupUI()
} }
@ -76,11 +77,25 @@ class BRMineViewController: BRViewController {
self.showVipAlert() self.showVipAlert()
} }
override func handleNoNetworkEmptyButton() {
br_setupUI()
BRLoginManager.manager.updateUserInfo(completer: nil)
}
} }
extension BRMineViewController { extension BRMineViewController {
private func br_setupUI() { private func br_setupUI() {
guard self.tableView.superview == nil else { return }
if BRNetworkStatusManager.manager.isReachable != true {
self.view.ly_emptyView = self.notNetworkEmptyView
self.view.ly_showEmpty()
return
}
self.view.ly_hideEmpty()
view.addSubview(lightImageView) view.addSubview(lightImageView)
view.addSubview(tableView) view.addSubview(tableView)
@ -104,6 +119,12 @@ extension BRMineViewController {
self.tableView.reloadData() self.tableView.reloadData()
} }
@objc private func networkStatusDidChangeNotification() {
guard BRNetworkStatusManager.manager.isReachable == true else { return }
br_setupUI()
BRLoginManager.manager.updateUserInfo(completer: nil)
}
private func showVipAlert() { private func showVipAlert() {
guard BRLoginManager.manager.userInfo?.is_vip != true else { return } guard BRLoginManager.manager.userInfo?.is_vip != true else { return }
guard BRVipAlert.isAllowShowAlert else { return } guard BRVipAlert.isAllowShowAlert else { return }

View File

@ -75,7 +75,7 @@ class BRPlayerListViewController: BRViewController {
collectionView.isPagingEnabled = true collectionView.isPagingEnabled = true
collectionView.showsVerticalScrollIndicator = false collectionView.showsVerticalScrollIndicator = false
collectionView.showsHorizontalScrollIndicator = false collectionView.showsHorizontalScrollIndicator = false
collectionView.bounces = false // collectionView.bounces = false
collectionView.scrollsToTop = false collectionView.scrollsToTop = false
collectionView.register(CellClass.self, forCellWithReuseIdentifier: "cell") collectionView.register(CellClass.self, forCellWithReuseIdentifier: "cell")
return collectionView return collectionView

View File

@ -60,15 +60,23 @@ class BRVideoDetailViewController: BRPlayerListViewController {
} }
override var previousVideoUrl: String? { override var previousVideoUrl: String? {
let index = self.viewModel.currentIndexPath.row - 1 guard self.viewModel.currentIndexPath.section < self.detailArr.count else { return nil }
guard index > 0 else { return nil }
let model = self.detailArr[self.viewModel.currentIndexPath.section] let model = self.detailArr[self.viewModel.currentIndexPath.section]
let index = self.viewModel.currentIndexPath.row - 1
guard index >= 0 else { return nil }
let epCount = model.episodeList?.count ?? 0
guard index < epCount else { return nil }
return model.episodeList?[index].video_url return model.episodeList?[index].video_url
} }
override var nextVideoUrl: String? { override var nextVideoUrl: String? {
let index = self.viewModel.currentIndexPath.row + 1 guard self.viewModel.currentIndexPath.section < self.detailArr.count else { return nil }
let model = self.detailArr[self.viewModel.currentIndexPath.section] let model = self.detailArr[self.viewModel.currentIndexPath.section]
let index = self.viewModel.currentIndexPath.row + 1
guard index < (model.episodeList?.count ?? 0) else { return nil } guard index < (model.episodeList?.count ?? 0) else { return nil }
return model.episodeList?[index].video_url return model.episodeList?[index].video_url
} }

View File

@ -134,14 +134,14 @@ extension BRPlayerCollectionView: UIGestureRecognizerDelegate {
override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
if gestureRecognizer == self.refreshPanGesture { if gestureRecognizer == self.refreshPanGesture {
if !br_onRefrsh { return false } // if !br_onRefrsh { return false }
let point = self.refreshPanGesture.translation(in: self) let point = self.refreshPanGesture.translation(in: self)
let state = gestureRecognizer.state let state = gestureRecognizer.state
if state == .began || state == .possible { if state == .began || state == .possible {
/// ///
if point.y > 0 && self.contentOffset.y == 0 { if point.y > 0 && self.contentOffset.y == 0, br_onRefrsh {
return true return true
} else if point.y < 0 && self.contentOffset.y + self.frame.height >= self.contentSize.height {// } else if point.y < 0 && self.contentOffset.y + self.frame.height >= self.contentSize.height {//
self.br_refreshDelegate?.br_upwardsScrollEnd?(collectionView: self) self.br_refreshDelegate?.br_upwardsScrollEnd?(collectionView: self)

View File

@ -25,7 +25,7 @@ class BRVideoDetailRecommendView: BRPanModalContentView {
} }
} }
private var currentCell: BRVideoDetailRecommendCell? { private weak var currentCell: BRVideoDetailRecommendCell? {
didSet { didSet {
oldValue?.isCurrent = false oldValue?.isCurrent = false
oldValue?.pause() oldValue?.pause()

View File

@ -56,6 +56,8 @@ class BRPlayerViewModel: NSObject {
} }
private lazy var payDataRequest = BRPayDataRequest() private lazy var payDataRequest = BRPayDataRequest()
private weak var rechargeView: BRVideoRechargeView?
} }
@ -156,6 +158,7 @@ extension BRPlayerViewModel {
/// ///
func openRechargeView() { func openRechargeView() {
guard let videoInfo = self.currentPlayer?.videoInfo else { return } guard let videoInfo = self.currentPlayer?.videoInfo else { return }
guard self.rechargeView == nil else { return }
self.payDataRequest.requestProducts(isLoding: true) { [weak self] model in self.payDataRequest.requestProducts(isLoding: true) { [weak self] model in
guard let self = self else { return } guard let self = self else { return }
@ -174,6 +177,7 @@ extension BRPlayerViewModel {
self.updateAllData(scrollTo: self.currentIndexPath) self.updateAllData(scrollTo: self.currentIndexPath)
} }
view.present(in: nil) view.present(in: nil)
self.rechargeView = view
} }
} }

View File

@ -84,6 +84,13 @@ extension BRConsumptionRecordViewController: UICollectionViewDelegate, UICollect
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.listArr.count return self.listArr.count
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let model = self.listArr[indexPath.row]
let vc = BRVideoDetailViewController()
vc.shortPlayId = model.short_play_id
self.navigationController?.pushViewController(vc, animated: true)
}
} }
extension BRConsumptionRecordViewController { extension BRConsumptionRecordViewController {

View File

@ -17,5 +17,6 @@ class BRRewardCoinRecordModel: BRModel, SmartCodable {
var created_at: String? var created_at: String?
var diff_datetime: String? var diff_datetime: String?
var expired_time: TimeInterval? var expired_time: TimeInterval?
var is_effective: Int?
} }

View File

@ -15,14 +15,14 @@ class BRRewardCoinsRecordCell: BRCollectionViewCell {
timeLabel.text = model?.created_at timeLabel.text = model?.created_at
coinView.setNeedsUpdateConfiguration() coinView.setNeedsUpdateConfiguration()
let expireDate = Date(timeIntervalSince1970: model?.expired_time ?? 0) // let expireDate = Date(timeIntervalSince1970: model?.expired_time ?? 0)
let nowDate = Date() // let nowDate = Date()
let days = nowDate.differenceDay(date: expireDate) // let days = nowDate.differenceDay(date: expireDate)
//
if days > 0 { if model?.is_effective == 1 {
contentLabel.text = "Expires in ## days".localizedReplace(text: "\(days)") contentLabel.text = "Expires in ##".localizedReplace(text: model?.diff_datetime ?? "")
} else { } else {
contentLabel.text = "Expired".localized contentLabel.text = model?.diff_datetime
} }
} }
} }

View File

@ -15,7 +15,7 @@ extension AppDelegate {
// //
MJRefreshConfig.default.languageCode = BRLocalizedManager.manager.mjLocalizedKey MJRefreshConfig.default.languageCode = BRLocalizedManager.manager.mjLocalizedKey
BRToast.config()
} }
} }

View File

@ -8,13 +8,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
BRNetworkStatusManager.manager.startMonitoring()
registThirdparty(application, didFinishLaunchingWithOptions: launchOptions) registThirdparty(application, didFinishLaunchingWithOptions: launchOptions)
BRAppTool.appDelegate = self BRAppTool.appDelegate = self
BRNetworkStatusManager.manager.startMonitoring()
NotificationCenter.default.addObserver(self, selector: #selector(networkStatusDidChangeNotification), name: BRNetworkStatusManager.networkStatusDidChangeNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(networkStatusDidChangeNotification), name: BRNetworkStatusManager.networkStatusDidChangeNotification, object: nil)
BRLoginManager.manager.updateUserInfo(completer: nil)
addConfig() addConfig()
@ -22,9 +21,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
setBadgeCount(0) setBadgeCount(0)
BRIAP.manager.restore(isLoding: false) { isFinish in DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.2) {
guard isFinish else { return } if BRNetworkStatusManager.manager.isReachable == true {
BRLoginManager.manager.updateUserInfo(completer: nil) BRLoginManager.manager.updateUserInfo(completer: nil)
BRIAP.manager.restore(isLoding: false) { isFinish in
guard isFinish else { return }
BRLoginManager.manager.updateUserInfo(completer: nil)
}
}
} }
return true return true

View File

@ -10,8 +10,11 @@ import LYEmptyView
class BREmpty: NSObject { class BREmpty: NSObject {
static func br_normalEmptyView(image: UIImage? = UIImage(named: "empty_normal_image"), title: String? = "kNormalRmptyTitle".localized, detailStr: String? = "kNormalRmptyDetail".localized) -> LYEmptyView { static func br_normalEmptyView(image: UIImage? = UIImage(named: "empty_normal_image"), title: String? = "kNormalRmptyTitle".localized, detailStr: String? = "kNormalRmptyDetail".localized, btnTitleStr: String? = nil, btnClickBlock: (() -> Void)? = nil) -> LYEmptyView {
let view = LYEmptyView.empty(with: image, titleStr: title, detailStr: detailStr) let view = LYEmptyView.emptyActionView(with: image, titleStr: title, detailStr: detailStr, btnTitleStr: btnTitleStr) {
btnClickBlock?()
}
view?.titleLabFont = .fontMedium(ofSize: 15) view?.titleLabFont = .fontMedium(ofSize: 15)
view?.titleLabTextColor = .color1C1C1C() view?.titleLabTextColor = .color1C1C1C()
view?.detailLabFont = .fontRegular(ofSize: 12) view?.detailLabFont = .fontRegular(ofSize: 12)
@ -21,4 +24,18 @@ class BREmpty: NSObject {
return view! return view!
} }
static func br_noNetworkEmptyView(btnClickBlock: (() -> Void)?) -> LYEmptyView {
let view = br_normalEmptyView(image: UIImage(named: "empty_network_image"), title: "kNetworkEmptyTitle".localized, detailStr: "kNetworkEmptyDetail".localized, btnTitleStr: "Try again".localized, btnClickBlock: btnClickBlock)
view.actionBtnFont = .fontRegular(ofSize: 14)
view.actionBtnTitleColor = .color1C1C1C()
view.actionBtnHeight = 42
view.actionBtnWidth = 128
view.actionBtnBorderWidth = 1
view.actionBtnBorderColor = .color1C1C1C()
view.actionBtnCornerRadius = 21
view.actionBtnBackGroundColor = .clear
view.actionBtnMargin = 16
return view
}
} }

View File

@ -171,6 +171,7 @@ extension BRIAP: JXIAPManagerDelegate {
NotificationCenter.default.post(name: BRIAP.buyVipFinishNotification, object: nil) NotificationCenter.default.post(name: BRIAP.buyVipFinishNotification, object: nil)
} }
} else { } else {
BRToast.show(text: "Purchase Failed".localized)
self.completionHandler?(false) self.completionHandler?(false)
} }
} }

View File

@ -92,9 +92,9 @@ class BRPlayer: NSObject {
init(controlView: BRPlayerControlProtocol?) { init(controlView: BRPlayerControlProtocol?) {
super.init() super.init()
self.br_controlView = controlView self.br_controlView = controlView
player.controlLayerNeedAppear()
setupPlayer() setupPlayer()
player.controlLayerNeedAppear()
} }
func setPlayUrl(url: String) { func setPlayUrl(url: String) {
@ -157,7 +157,7 @@ extension BRPlayer {
// //
player.controlLayerAppearObserver.onAppearChanged = { [weak self] manager in player.controlLayerAppearObserver.onAppearChanged = { [weak self] manager in
guard let self = self else { return } guard let self = self else { return }
self.controlView().isHidden = !manager.isAppeared self.controlView()?.isHidden = !self.player.isControlLayerAppeared
} }
// //
@ -213,7 +213,7 @@ extension BRPlayer {
//MARK: -------------- SJVideoPlayerControlLayerDataSource -------------- //MARK: -------------- SJVideoPlayerControlLayerDataSource --------------
extension BRPlayer: SJVideoPlayerControlLayerDataSource { extension BRPlayer: SJVideoPlayerControlLayerDataSource {
func controlView() -> UIView! { func controlView() -> UIView? {
return self.br_controlView as? UIView return self.br_controlView as? UIView
} }
} }

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "无网络@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "无网络@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -326,13 +326,13 @@
} }
} }
}, },
"Expires in ## days" : { "Expires in ##" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
"en" : { "en" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Expires in ## days" "value" : "Expires in ##"
} }
} }
} }
@ -480,6 +480,28 @@
} }
} }
}, },
"kNetworkEmptyDetail" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Check your WiFi or cellular data"
}
}
}
},
"kNetworkEmptyTitle" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Network Hiccup"
}
}
}
},
"kNormalRmptyDetail" : { "kNormalRmptyDetail" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@ -766,6 +788,17 @@
} }
} }
}, },
"Purchase Failed" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Purchase Failed"
}
}
}
},
"Purchase Single Episode" : { "Purchase Single Episode" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {

View File

@ -7,6 +7,7 @@ post_install do |installer|
config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
config.build_settings['EXCLUDED_ARCHITECTURES'] = 'i386' config.build_settings['EXCLUDED_ARCHITECTURES'] = 'i386'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end end
end end
end end