This commit is contained in:
zeng 2025-07-30 11:29:42 +08:00
parent 318a4d9b7e
commit dac985f177
19 changed files with 354 additions and 119 deletions

View File

@ -215,6 +215,8 @@
F39855A32E38D25900E2D28D /* BRWaitRestoreModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855A22E38D25900E2D28D /* BRWaitRestoreModel.swift */; }; F39855A32E38D25900E2D28D /* BRWaitRestoreModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855A22E38D25900E2D28D /* BRWaitRestoreModel.swift */; };
F39855A52E38D2A800E2D28D /* BRIAP.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855A42E38D2A800E2D28D /* BRIAP.swift */; }; F39855A52E38D2A800E2D28D /* BRIAP.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855A42E38D2A800E2D28D /* BRIAP.swift */; };
F39855A72E38EE9800E2D28D /* BRRechargeRecordModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855A62E38EE9800E2D28D /* BRRechargeRecordModel.swift */; }; F39855A72E38EE9800E2D28D /* BRRechargeRecordModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855A62E38EE9800E2D28D /* BRRechargeRecordModel.swift */; };
F39855A92E39AD7300E2D28D /* BRConsumptionRecordsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855A82E39AD7300E2D28D /* BRConsumptionRecordsModel.swift */; };
F39855AB2E39ADEF00E2D28D /* BRRewardCoinRecordModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39855AA2E39ADEF00E2D28D /* BRRewardCoinRecordModel.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
@ -441,6 +443,8 @@
F39855A22E38D25900E2D28D /* BRWaitRestoreModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRWaitRestoreModel.swift; sourceTree = "<group>"; }; F39855A22E38D25900E2D28D /* BRWaitRestoreModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRWaitRestoreModel.swift; sourceTree = "<group>"; };
F39855A42E38D2A800E2D28D /* BRIAP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRIAP.swift; sourceTree = "<group>"; }; F39855A42E38D2A800E2D28D /* BRIAP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRIAP.swift; sourceTree = "<group>"; };
F39855A62E38EE9800E2D28D /* BRRechargeRecordModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRRechargeRecordModel.swift; sourceTree = "<group>"; }; F39855A62E38EE9800E2D28D /* BRRechargeRecordModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRRechargeRecordModel.swift; sourceTree = "<group>"; };
F39855A82E39AD7300E2D28D /* BRConsumptionRecordsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRConsumptionRecordsModel.swift; sourceTree = "<group>"; };
F39855AA2E39ADEF00E2D28D /* BRRewardCoinRecordModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BRRewardCoinRecordModel.swift; sourceTree = "<group>"; };
F70FA1F4169364C4C53534CE /* Pods-BeeReel.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BeeReel.release.xcconfig"; path = "Target Support Files/Pods-BeeReel/Pods-BeeReel.release.xcconfig"; sourceTree = "<group>"; }; F70FA1F4169364C4C53534CE /* Pods-BeeReel.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BeeReel.release.xcconfig"; path = "Target Support Files/Pods-BeeReel/Pods-BeeReel.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -1200,6 +1204,8 @@
F398553D2E336D3000E2D28D /* BRPayDateModel.swift */, F398553D2E336D3000E2D28D /* BRPayDateModel.swift */,
F39855532E34A49500E2D28D /* BRPayDataRequest.swift */, F39855532E34A49500E2D28D /* BRPayDataRequest.swift */,
F39855A62E38EE9800E2D28D /* BRRechargeRecordModel.swift */, F39855A62E38EE9800E2D28D /* BRRechargeRecordModel.swift */,
F39855A82E39AD7300E2D28D /* BRConsumptionRecordsModel.swift */,
F39855AA2E39ADEF00E2D28D /* BRRewardCoinRecordModel.swift */,
); );
path = Model; path = Model;
sourceTree = "<group>"; sourceTree = "<group>";
@ -1428,6 +1434,7 @@
F398554A2E33929C00E2D28D /* BRStoreCoinCell.swift in Sources */, F398554A2E33929C00E2D28D /* BRStoreCoinCell.swift in Sources */,
F39855842E37705700E2D28D /* AppDelegate+Thirdparty.swift in Sources */, F39855842E37705700E2D28D /* AppDelegate+Thirdparty.swift in Sources */,
BF3A568C2E30EBA2009E5CF9 /* BRHomePlayRecordButton.swift in Sources */, BF3A568C2E30EBA2009E5CF9 /* BRHomePlayRecordButton.swift in Sources */,
F39855A92E39AD7300E2D28D /* BRConsumptionRecordsModel.swift in Sources */,
BF692B162E0A7CD600A5C2DA /* BRHUD.swift in Sources */, BF692B162E0A7CD600A5C2DA /* BRHUD.swift in Sources */,
BF3338F72E16176900B10F76 /* BRDetailPlayerCell.swift in Sources */, BF3338F72E16176900B10F76 /* BRDetailPlayerCell.swift in Sources */,
BF3338EA2E152B8100B10F76 /* BRPlayerCache.swift in Sources */, BF3338EA2E152B8100B10F76 /* BRPlayerCache.swift in Sources */,
@ -1447,6 +1454,7 @@
BF692AEC2E0A475D00A5C2DA /* SceneDelegate.swift in Sources */, BF692AEC2E0A475D00A5C2DA /* SceneDelegate.swift in Sources */,
BF692B492E0A9D0E00A5C2DA /* UIView+BRAdd.swift in Sources */, BF692B492E0A9D0E00A5C2DA /* UIView+BRAdd.swift in Sources */,
BF02B7F82E2F211A00172177 /* BRHomeCategoriesMainCell.swift in Sources */, BF02B7F82E2F211A00172177 /* BRHomeCategoriesMainCell.swift in Sources */,
F39855AB2E39ADEF00E2D28D /* BRRewardCoinRecordModel.swift in Sources */,
F398559C2E38CF9700E2D28D /* JXIAPManager.swift in Sources */, F398559C2E38CF9700E2D28D /* JXIAPManager.swift in Sources */,
BF02B8192E2F8B1100172177 /* BRMineCell.swift in Sources */, BF02B8192E2F8B1100172177 /* BRMineCell.swift in Sources */,
BFC676812E122733006659E5 /* BRPlayerProtocol.swift in Sources */, BFC676812E122733006659E5 /* BRPlayerProtocol.swift in Sources */,
@ -1595,6 +1603,7 @@
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = ""; INFOPLIST_KEY_UIMainStoryboardFile = "";
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arm64;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 15.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
@ -1635,6 +1644,7 @@
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UIMainStoryboardFile = ""; INFOPLIST_KEY_UIMainStoryboardFile = "";
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arm64;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 15.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;

View File

@ -90,4 +90,31 @@ class BRStoreAPI {
completer?(response.data) completer?(response.data)
} }
} }
///
static func requestConsumptionRecords(page: Int, completer: ((_ listModel: BRListModel<BRConsumptionRecordsModel>?) -> Void)?) {
var param = BRNetworkParameters(path: "/getCustomerBuyRecords")
param.method = .get
param.parameters = [
"page_size" : 20,
"current_page" : page,
]
BRNetwork.request(parameters: param) { (response: BRNetworkResponse<BRListModel<BRConsumptionRecordsModel>>) in
completer?(response.data)
}
}
///
static func reuqestGiveCoinRecords(page: Int, completer: ((_ listModel: BRListModel<BRRewardCoinRecordModel>?) -> Void)?) {
var param = BRNetworkParameters(path: "/sendCoinList")
param.parameters = [
"page_size" : 20,
"current_page" : page
]
BRNetwork.request(parameters: param) { (response: BRNetworkResponse<BRListModel<BRRewardCoinRecordModel>>) in
completer?(response.data)
}
}
} }

View File

@ -5,7 +5,11 @@
<key>aps-environment</key> <key>aps-environment</key>
<string>development</string> <string>development</string>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array/> <array>
<string>applinks:beereel.go.link</string>
<string>applinks:www.breeltv.com</string>
<string>applinks:jyev.adj.st</string>
</array>
<key>keychain-access-groups</key> <key>keychain-access-groups</key>
<array/> <array/>
</dict> </dict>

View File

@ -26,6 +26,7 @@ class BRCoinOrderRecordViewController: BRViewController, WMZPageProtocol {
collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0) collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0)
collectionView.delegate = self collectionView.delegate = self
collectionView.dataSource = self collectionView.dataSource = self
collectionView.ly_emptyView = BREmpty.br_normalEmptyView()
collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in
self?.handleFooterRefresh(nil) self?.handleFooterRefresh(nil)
} }

View File

@ -9,6 +9,11 @@ import UIKit
class BRConsumptionRecordViewController: BRViewController, WMZPageProtocol { class BRConsumptionRecordViewController: BRViewController, WMZPageProtocol {
private lazy var listArr: [BRConsumptionRecordsModel] = []
private lazy var page = 1
private lazy var collectionViewLayout: UICollectionViewFlowLayout = { private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
let layout = UICollectionViewFlowLayout() let layout = UICollectionViewFlowLayout()
layout.itemSize = .init(width: UIScreen.width - 30, height: 80) layout.itemSize = .init(width: UIScreen.width - 30, height: 80)
@ -22,6 +27,7 @@ class BRConsumptionRecordViewController: BRViewController, WMZPageProtocol {
collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0) collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0)
collectionView.delegate = self collectionView.delegate = self
collectionView.dataSource = self collectionView.dataSource = self
collectionView.ly_emptyView = BREmpty.br_normalEmptyView()
collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in
self?.handleFooterRefresh(nil) self?.handleFooterRefresh(nil)
} }
@ -34,6 +40,8 @@ class BRConsumptionRecordViewController: BRViewController, WMZPageProtocol {
self.view.backgroundColor = .colorFFFFFF() self.view.backgroundColor = .colorFFFFFF()
br_setupUI() br_setupUI()
requestDataList(page: 1, completer: nil)
} }
func getMyScrollView() -> UIScrollView { func getMyScrollView() -> UIScrollView {
@ -41,11 +49,15 @@ class BRConsumptionRecordViewController: BRViewController, WMZPageProtocol {
} }
override func handleHeaderRefresh(_ completer: (() -> Void)?) { override func handleHeaderRefresh(_ completer: (() -> Void)?) {
completer?() self.requestDataList(page: 1) {
completer?()
}
} }
override func handleFooterRefresh(_ completer: (() -> Void)?) { override func handleFooterRefresh(_ completer: (() -> Void)?) {
self.collectionView.br_endFooterRefreshing() self.requestDataList(page: self.page + 1) { [weak self] in
self?.collectionView.br_endFooterRefreshing()
}
} }
} }
@ -65,10 +77,31 @@ extension BRConsumptionRecordViewController {
extension BRConsumptionRecordViewController: UICollectionViewDelegate, UICollectionViewDataSource { extension BRConsumptionRecordViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! BRConsumptionRecordCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! BRConsumptionRecordCell
cell.model = self.listArr[indexPath.row]
return cell return cell
} }
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 10 return self.listArr.count
} }
} }
extension BRConsumptionRecordViewController {
private func requestDataList(page: Int, completer: (() -> Void)?) {
BRStoreAPI.requestConsumptionRecords(page: page) { [weak self] listModel in
guard let self = self else { return }
if let list = listModel?.list {
if page == 1 {
self.listArr.removeAll()
}
self.listArr += list
self.page = page
self.collectionView.reloadData()
}
completer?()
}
}
}

View File

@ -9,6 +9,9 @@ import UIKit
class BRRewardCoinsRecordViewController: BRViewController, WMZPageProtocol { class BRRewardCoinsRecordViewController: BRViewController, WMZPageProtocol {
private lazy var listArr: [BRRewardCoinRecordModel] = []
private lazy var page = 1
private lazy var collectionViewLayout: UICollectionViewFlowLayout = { private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
let layout = UICollectionViewFlowLayout() let layout = UICollectionViewFlowLayout()
layout.itemSize = .init(width: UIScreen.width - 30, height: 80) layout.itemSize = .init(width: UIScreen.width - 30, height: 80)
@ -22,6 +25,7 @@ class BRRewardCoinsRecordViewController: BRViewController, WMZPageProtocol {
collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0) collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0)
collectionView.delegate = self collectionView.delegate = self
collectionView.dataSource = self collectionView.dataSource = self
collectionView.ly_emptyView = BREmpty.br_normalEmptyView()
collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in
self?.handleFooterRefresh(nil) self?.handleFooterRefresh(nil)
} }
@ -34,6 +38,8 @@ class BRRewardCoinsRecordViewController: BRViewController, WMZPageProtocol {
self.view.backgroundColor = .colorFFFFFF() self.view.backgroundColor = .colorFFFFFF()
br_setupUI() br_setupUI()
requestDataList(page: 1, completer: nil)
} }
func getMyScrollView() -> UIScrollView { func getMyScrollView() -> UIScrollView {
@ -41,13 +47,16 @@ class BRRewardCoinsRecordViewController: BRViewController, WMZPageProtocol {
} }
override func handleHeaderRefresh(_ completer: (() -> Void)?) { override func handleHeaderRefresh(_ completer: (() -> Void)?) {
completer?() self.requestDataList(page: 1) {
completer?()
}
} }
override func handleFooterRefresh(_ completer: (() -> Void)?) { override func handleFooterRefresh(_ completer: (() -> Void)?) {
self.collectionView.br_endFooterRefreshing() self.requestDataList(page: self.page + 1) { [weak self] in
self?.collectionView.br_endFooterRefreshing()
}
} }
} }
extension BRRewardCoinsRecordViewController { extension BRRewardCoinsRecordViewController {
@ -66,10 +75,31 @@ extension BRRewardCoinsRecordViewController {
extension BRRewardCoinsRecordViewController: UICollectionViewDelegate, UICollectionViewDataSource { extension BRRewardCoinsRecordViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! BRRewardCoinsRecordCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! BRRewardCoinsRecordCell
cell.model = listArr[indexPath.row]
return cell return cell
} }
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 10 return self.listArr.count
} }
} }
extension BRRewardCoinsRecordViewController {
private func requestDataList(page: Int, completer: (() -> Void)?) {
BRStoreAPI.reuqestGiveCoinRecords(page: page) { [weak self] listModel in
guard let self = self else { return }
if let list = listModel?.list {
if page == 1 {
self.listArr.removeAll()
}
self.listArr += list
self.page = page
self.collectionView.reloadData()
}
completer?()
}
}
}

View File

@ -9,7 +9,8 @@ import UIKit
class BRVipOrderRecordViewController: BRViewController, WMZPageProtocol { class BRVipOrderRecordViewController: BRViewController, WMZPageProtocol {
private lazy var listArr: [BRRechargeRecordModel] = []
private lazy var page = 1
private lazy var collectionViewLayout: UICollectionViewFlowLayout = { private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
let layout = UICollectionViewFlowLayout() let layout = UICollectionViewFlowLayout()
@ -24,6 +25,7 @@ class BRVipOrderRecordViewController: BRViewController, WMZPageProtocol {
collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0) collectionView.contentInset = .init(top: 0, left: 0, bottom: UIScreen.tabbarSafeBottomMargin + 10, right: 0)
collectionView.delegate = self collectionView.delegate = self
collectionView.dataSource = self collectionView.dataSource = self
collectionView.ly_emptyView = BREmpty.br_normalEmptyView()
collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in collectionView.br_addRefreshBackFooter(insetBottom: collectionView.contentInset.bottom) { [weak self] in
self?.handleFooterRefresh(nil) self?.handleFooterRefresh(nil)
} }
@ -36,6 +38,8 @@ class BRVipOrderRecordViewController: BRViewController, WMZPageProtocol {
self.view.backgroundColor = .colorFFFFFF() self.view.backgroundColor = .colorFFFFFF()
br_setupUI() br_setupUI()
requestDataList(page: 1, completer: nil)
} }
func getMyScrollView() -> UIScrollView { func getMyScrollView() -> UIScrollView {
@ -43,11 +47,15 @@ class BRVipOrderRecordViewController: BRViewController, WMZPageProtocol {
} }
override func handleHeaderRefresh(_ completer: (() -> Void)?) { override func handleHeaderRefresh(_ completer: (() -> Void)?) {
completer?() self.requestDataList(page: 1) {
completer?()
}
} }
override func handleFooterRefresh(_ completer: (() -> Void)?) { override func handleFooterRefresh(_ completer: (() -> Void)?) {
self.collectionView.br_endFooterRefreshing() self.requestDataList(page: self.page + 1) { [weak self] in
self?.collectionView.br_endFooterRefreshing()
}
} }
} }
@ -69,12 +77,34 @@ extension BRVipOrderRecordViewController: UICollectionViewDelegate, UICollection
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! BRVipOrderRecordCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! BRVipOrderRecordCell
cell.model = self.listArr[indexPath.row]
return cell return cell
} }
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 10 return self.listArr.count
} }
} }
extension BRVipOrderRecordViewController {
private func requestDataList(page: Int, completer: (() -> Void)?) {
BRStoreAPI.requestRechargeRecord(buyType: .subVip, page: page) { [weak self] listModel in
guard let self = self else { return }
if let list = listModel?.list {
if page == 1 {
self.listArr.removeAll()
}
self.listArr += list
self.page = page
self.collectionView.reloadData()
}
completer?()
}
}
}

View File

@ -0,0 +1,22 @@
//
// BRConsumptionRecordsModel.swift
// BeeReel
//
// Created by 鸿 on 2025/7/30.
//
import UIKit
import SmartCodable
class BRConsumptionRecordsModel: BRModel, SmartCodable {
var created_at: String?
var short_play_id: String?
var coins: Int?
var image_url: String?
var name: String?
var coin_type: Int?
var short_play_video_id: String?
var episode: String?
}

View File

@ -27,88 +27,79 @@ class BRPayDataRequest: NSObject {
BRHUD.show() BRHUD.show()
} }
BRStoreAPI.requestPayTemplate { [weak self] model in BRStoreAPI.requestPayTemplate(isToast: isToast) { [weak self] model in
guard let self = self else { return } guard let self = self else { return }
if isLoding { guard let model = model else {
BRHUD.dismiss() if isLoding {
BRHUD.dismiss()
}
self.completerBlock?(nil)
return
} }
completer?(model) self.oldTemplateModel = model
var productIdArr: [String] = []
model.list_sub_vip?.forEach { item in
productIdArr.append(BRIAP.manager.getProductId(templateId: item.ios_template_id) ?? "")
}
model.list_coins?.forEach { item in
productIdArr.append(BRIAP.manager.getProductId(templateId: item.ios_template_id) ?? "")
}
let set = Set(productIdArr)
let productsRequest = SKProductsRequest(productIdentifiers: set)
productsRequest.delegate = self
productsRequest.start()
} }
// BRStoreAPI.requestPayTemplate(isToast: isToast) { [weak self] model in
// guard let self = self else { return }
// guard let model = model else {
// if isLoding {
// VPHUD.dismiss()
// }
// self.completerBlock?(nil)
// return
// }
// self.oldTemplateModel = model
//
// var productIdArr: [String] = []
// model.list_sub_vip?.forEach { item in
// productIdArr.append(VPIAPManager.manager.getProductId(templateId: item.ios_template_id) ?? "")
// }
// model.list_coins?.forEach { item in
// productIdArr.append(VPIAPManager.manager.getProductId(templateId: item.ios_template_id) ?? "")
// }
//
// let set = Set(productIdArr)
// let productsRequest = SKProductsRequest(productIdentifiers: set)
// productsRequest.delegate = self
// productsRequest.start()
//
// }
} }
} }
/*
//MARK: -------------- SKProductsRequestDelegate --------------
extension BRPayDataRequest: SKProductsRequestDelegate {
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) { //MARK: -------------- SKProductsRequestDelegate --------------
if isLoding { extension BRPayDataRequest: SKProductsRequestDelegate {
VPHUD.dismiss()
}
guard let templateModel = self.oldTemplateModel else { return } func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
let products = response.products if isLoding {
BRHUD.dismiss()
}
var newCoinList: [VPPayTemplateItem] = [] guard let templateModel = self.oldTemplateModel else { return }
var newVipList: [VPPayTemplateItem] = [] let products = response.products
templateModel.list_coins?.forEach { item in var newCoinList: [BRPayItem] = []
let productId = VPIAPManager.manager.getProductId(templateId: item.ios_template_id) ?? "" var newVipList: [BRPayItem] = []
for product in products {
if productId == product.productIdentifier { templateModel.list_coins?.forEach { item in
item.price = product.price.stringValue let productId = BRIAP.manager.getProductId(templateId: item.ios_template_id) ?? ""
item.currency = product.priceLocale.currencySymbol for product in products {
newCoinList.append(item) if productId == product.productIdentifier {
break item.price = product.price.stringValue
} item.currency = product.priceLocale.currencySymbol
} newCoinList.append(item)
} break
templateModel.list_sub_vip?.forEach { item in }
let productId = VPIAPManager.manager.getProductId(templateId: item.ios_template_id) ?? "" }
for product in products { }
if productId == product.productIdentifier { templateModel.list_sub_vip?.forEach { item in
item.price = product.price.stringValue let productId = BRIAP.manager.getProductId(templateId: item.ios_template_id) ?? ""
item.currency = product.priceLocale.currencySymbol for product in products {
newVipList.append(item) if productId == product.productIdentifier {
break item.price = product.price.stringValue
} item.currency = product.priceLocale.currencySymbol
} newVipList.append(item)
} break
templateModel.list_coins = newCoinList }
templateModel.list_sub_vip = newVipList }
}
templateModel.list_coins = newCoinList
templateModel.list_sub_vip = newVipList
DispatchQueue.main.async {
self.completerBlock?(templateModel)
}
}
}
DispatchQueue.main.async {
self.completerBlock?(templateModel)
}
}
}
*/

View File

@ -0,0 +1,21 @@
//
// BRRewardCoinRecordModel.swift
// BeeReel
//
// Created by 鸿 on 2025/7/30.
//
import UIKit
import SmartCodable
class BRRewardCoinRecordModel: BRModel, SmartCodable {
var id: String?
var type: String?
var coins: Int?
var left_coins: String?
var created_at: String?
var diff_datetime: String?
var expired_time: TimeInterval?
}

View File

@ -11,7 +11,9 @@ class BRCoinOrderRecordCell: BRCollectionViewCell {
var model: BRRechargeRecordModel? { var model: BRRechargeRecordModel? {
didSet { didSet {
titleLabel.text = model?.type
timeLabel.text = model?.created_at
coinView.setNeedsUpdateConfiguration()
} }
} }
@ -35,7 +37,7 @@ class BRCoinOrderRecordCell: BRCollectionViewCell {
button.configurationUpdateHandler = { [weak self] button in button.configurationUpdateHandler = { [weak self] button in
guard let self = self else { return } guard let self = self else { return }
button.configuration?.attributedTitle = AttributedString.br_createAttributedString(string: "+60", color: .color7ECD5E(), font: .fontMedium(ofSize: 15)) button.configuration?.attributedTitle = AttributedString.br_createAttributedString(string: "+\(model?.value ?? "0")", color: .color7ECD5E(), font: .fontMedium(ofSize: 15))
} }
return button return button
}() }()

View File

@ -9,12 +9,21 @@ import UIKit
class BRConsumptionRecordCell: BRCollectionViewCell { class BRConsumptionRecordCell: BRCollectionViewCell {
var model: BRConsumptionRecordsModel? {
didSet {
timeLabel.text = model?.created_at
let episode = "EP.##".localizedReplace(text: "\(model?.episode ?? "0")") + "\(model?.name ?? "")"
contentLabel.text = episode
coinView.setNeedsUpdateConfiguration()
}
}
private lazy var titleLabel: UILabel = { private lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.font = .fontRegular(ofSize: 14) label.font = .fontRegular(ofSize: 14)
label.textColor = .color1C1C1C() label.textColor = .color1C1C1C()
label.text = "Purchase Single Episode" label.text = "Purchase Single Episode".localized
return label return label
}() }()
@ -48,7 +57,7 @@ class BRConsumptionRecordCell: BRCollectionViewCell {
button.configurationUpdateHandler = { [weak self] button in button.configurationUpdateHandler = { [weak self] button in
guard let self = self else { return } guard let self = self else { return }
button.configuration?.attributedTitle = AttributedString.br_createAttributedString(string: "-60", color: .color7ECD5E(), font: .fontMedium(ofSize: 15)) button.configuration?.attributedTitle = AttributedString.br_createAttributedString(string: "-\(model?.coins ?? 0)", color: .color7ECD5E(), font: .fontMedium(ofSize: 15))
} }
return button return button
}() }()

View File

@ -9,11 +9,28 @@ import UIKit
class BRRewardCoinsRecordCell: BRCollectionViewCell { class BRRewardCoinsRecordCell: BRCollectionViewCell {
var model: BRRewardCoinRecordModel? {
didSet {
titleLabel.text = model?.type
timeLabel.text = model?.created_at
coinView.setNeedsUpdateConfiguration()
let expireDate = Date(timeIntervalSince1970: model?.expired_time ?? 0)
let nowDate = Date()
let days = nowDate.differenceDay(date: expireDate)
if days > 0 {
contentLabel.text = "Expires in ## days".localizedReplace(text: "\(days)")
} else {
contentLabel.text = "Expired".localized
}
}
}
private lazy var titleLabel: UILabel = { private lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.font = .fontRegular(ofSize: 14) label.font = .fontRegular(ofSize: 14)
label.textColor = .color1C1C1C() label.textColor = .color1C1C1C()
label.text = "Check in"
return label return label
}() }()
@ -21,7 +38,6 @@ class BRRewardCoinsRecordCell: BRCollectionViewCell {
let label = UILabel() let label = UILabel()
label.font = .fontRegular(ofSize: 12) label.font = .fontRegular(ofSize: 12)
label.textColor = .colorC2C2C2() label.textColor = .colorC2C2C2()
label.text = "Expires in 30 days"
return label return label
}() }()
@ -29,7 +45,6 @@ class BRRewardCoinsRecordCell: BRCollectionViewCell {
let label = UILabel() let label = UILabel()
label.font = .fontRegular(ofSize: 11) label.font = .fontRegular(ofSize: 11)
label.textColor = .colorC2C2C2() label.textColor = .colorC2C2C2()
label.text = "2025-04-17 06:19:13"
label.setContentHuggingPriority(.required, for: .horizontal) label.setContentHuggingPriority(.required, for: .horizontal)
label.setContentCompressionResistancePriority(.required, for: .horizontal) label.setContentCompressionResistancePriority(.required, for: .horizontal)
return label return label
@ -47,7 +62,7 @@ class BRRewardCoinsRecordCell: BRCollectionViewCell {
button.configurationUpdateHandler = { [weak self] button in button.configurationUpdateHandler = { [weak self] button in
guard let self = self else { return } guard let self = self else { return }
button.configuration?.attributedTitle = AttributedString.br_createAttributedString(string: "+60", color: .color7ECD5E(), font: .fontMedium(ofSize: 15)) button.configuration?.attributedTitle = AttributedString.br_createAttributedString(string: "+\(self.model?.coins ?? 0)", color: .color7ECD5E(), font: .fontMedium(ofSize: 15))
} }
return button return button
}() }()

View File

@ -8,6 +8,15 @@
import UIKit import UIKit
class BRVipOrderRecordCell: BRCollectionViewCell { class BRVipOrderRecordCell: BRCollectionViewCell {
var model: BRRechargeRecordModel? {
didSet {
durationLabel.text = model?.value
timeLabel.text = model?.created_at
titleLabel.text = model?.type
}
}
private lazy var titleLabel: UILabel = { private lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.font = .fontRegular(ofSize: 14) label.font = .fontRegular(ofSize: 14)

View File

@ -5,6 +5,8 @@
// Created by 鸿 on 2025/7/28. // Created by 鸿 on 2025/7/28.
// //
import FirebaseMessaging
extension AppDelegate { extension AppDelegate {
/// ///
static var haveBeenShownAPNS = false static var haveBeenShownAPNS = false
@ -56,7 +58,7 @@ extension AppDelegate {
//MARK: -------------- UNUserNotificationCenterDelegate -------------- //MARK: -------------- UNUserNotificationCenterDelegate --------------
extension AppDelegate: UNUserNotificationCenterDelegate { extension AppDelegate: UNUserNotificationCenterDelegate {
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
// Messaging.messaging().apnsToken = deviceToken Messaging.messaging().apnsToken = deviceToken
} }
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: any Error) { func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: any Error) {
@ -85,23 +87,19 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
completionHandler() completionHandler()
return return
} }
// VPStatAPI.requestStatApns(messageId: model.message_id ?? "", title: response.notification.request.content.title) BRStatAPI.requestStatApns(messageId: model.message_id ?? "", title: response.notification.request.content.title)
//
//
// if model.path == .videoDetail, let shortPlayId = model.short_play_id { if model.path == .videoDetail, let shortPlayId = model.short_play_id {
// let vc = VPDetailPlayerViewController() let vc = BRVideoDetailViewController()
// vc.shortPlayId = shortPlayId vc.shortPlayId = shortPlayId
// VPAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true) BRAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true)
//
// } else if model.path == .promotion { } else if model.path == .feedback {
// let vc = VPRewardsViewController() let vc = BRAppWebViewController()
// VPAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true) vc.webUrl = kBRFeedBackListWebUrl
// BRAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true)
// } else if model.path == .feedback { }
// let vc = VPCampaignWebViewController()
// vc.urlStr = kVPFeedBackListWebUrl
// VPAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true)
// }
completionHandler() completionHandler()
} }

View File

@ -25,8 +25,8 @@ extension AppDelegate {
Adjust.initSdk(config) Adjust.initSdk(config)
// FirebaseApp.configure() FirebaseApp.configure()
// Messaging.messaging().delegate = self Messaging.messaging().delegate = self
} }
} }

View File

@ -48,7 +48,7 @@ extension SceneDelegate {
Self.isNeedRetry = false Self.isNeedRetry = false
SceneDelegate.webpageURL = nil SceneDelegate.webpageURL = nil
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
self._handleOpenAppMessage(webpageURL: webpageURL) self._handleOpenAppMessage(webpageURL: webpageURL)
} }
@ -63,7 +63,7 @@ extension SceneDelegate {
var data: [String : Any]? = webpageURL?.query?.br_urlQuryToDictionary() var data: [String : Any]? = webpageURL?.query?.br_urlQuryToDictionary()
if statUrlStr == nil, let pasteStr = UIPasteboard.general.string, pasteStr.contains("veloriaapp") { if statUrlStr == nil, let pasteStr = UIPasteboard.general.string, pasteStr.contains("beereel") {
let tempArr = pasteStr.components(separatedBy: "?") let tempArr = pasteStr.components(separatedBy: "?")
let query = tempArr.last let query = tempArr.last

View File

@ -10,7 +10,7 @@ import UIKit
class BRIAP { class BRIAP {
typealias CompletionHandler = ((_ finish: Bool) -> Void) typealias CompletionHandler = ((_ finish: Bool) -> Void)
/// ///
static let IAPPrefix = "veloria." static let IAPPrefix = "beereel."
static let manager = BRIAP() static let manager = BRIAP()

View File

@ -293,6 +293,28 @@
} }
} }
}, },
"Expired" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Expired"
}
}
}
},
"Expires in ## days" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Expires in ## days"
}
}
}
},
"Explicit List of Personal Information Collection" : { "Explicit List of Personal Information Collection" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {
@ -667,6 +689,17 @@
} }
} }
}, },
"Purchase Single Episode" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Purchase Single Episode"
}
}
}
},
"quarter" : { "quarter" : {
"extractionState" : "manual", "extractionState" : "manual",
"localizations" : { "localizations" : {