From a22254bc39aded49d24c46e7f07c34208c5222df Mon Sep 17 00:00:00 2001 From: zeng Date: Fri, 1 Aug 2025 17:57:14 +0800 Subject: [PATCH] =?UTF-8?q?1.0=E7=89=88=E6=9C=AC=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E6=8F=90=E5=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeeReel.xcodeproj/project.pbxproj | 4 +- .../Class/Base/Network/Base/BRURLPath.swift | 10 --- .../Player/View/BRVideoRechargeView.swift | 56 ++++++++++++++++- .../Controller/BRStoreViewController.swift | 50 ++++++++++++++- .../Class/Store/Model/BRPayDataRequest.swift | 62 +++++++++---------- BeeReel/Class/Delegate/SceneDelegate.swift | 2 +- BeeReel/Source/Localizable.xcstrings | 22 +++++++ 资料/账号信息.txt | 4 +- 8 files changed, 163 insertions(+), 47 deletions(-) diff --git a/BeeReel.xcodeproj/project.pbxproj b/BeeReel.xcodeproj/project.pbxproj index cf6cc3e..620f537 100644 --- a/BeeReel.xcodeproj/project.pbxproj +++ b/BeeReel.xcodeproj/project.pbxproj @@ -2646,7 +2646,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = beereel/beereel.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 8NNUR9HPV3; ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; @@ -2752,7 +2752,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = beereel/beereel.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 8NNUR9HPV3; ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; diff --git a/BeeReel/Class/Base/Network/Base/BRURLPath.swift b/BeeReel/Class/Base/Network/Base/BRURLPath.swift index 4b43173..2f7a3f2 100644 --- a/BeeReel/Class/Base/Network/Base/BRURLPath.swift +++ b/BeeReel/Class/Base/Network/Base/BRURLPath.swift @@ -38,13 +38,3 @@ let kBRFeedBackDetailWebUrl = BRCampaignWebURL + "/pages/leave/detail" ///活动页面 let kBRRewardsWebUrl = BRCampaignWebURL + "/pages/reward/theme4" - -/* - 官网:https://www.breeltv.com/ - 协议页面:https://www.breeltv.com/xxxxx - 反馈:https://campaign.breeltv.com/pages/leave/index 黑色传{theme:theme_1}、 白色传{theme:theme_2} - 活动页:抓紧开发中...... - 后台地址:https://admin-beereel.guyantv.com/ - w2a:https://w2a.breeltv.com/ - w2a联调地址:https://w2a.breeltv.com/?short_play_id=8&type=fb&id=168&pixel_id=123&adj_campaign={{campaign.name}}%20({{campaign.id}})&adj_adgroup={{adset.name}}%20({{adset.id}})&adj_creative={{ad.name}}%20({{ad.id}}) - */ diff --git a/BeeReel/Class/Class/Player/View/BRVideoRechargeView.swift b/BeeReel/Class/Class/Player/View/BRVideoRechargeView.swift index b09c246..86ea51d 100644 --- a/BeeReel/Class/Class/Player/View/BRVideoRechargeView.swift +++ b/BeeReel/Class/Class/Player/View/BRVideoRechargeView.swift @@ -162,14 +162,68 @@ class BRVideoRechargeView: BRPanModalContentView { label.textColor = .colorD3D3D3() label.numberOfLines = 0 label.text = "kStoreTipText".localized + + let text1 = "beereel_terms_of_service".localized + let text2 = "Privacy Policy".localized + let text3 = "Renewal Agreement".localized + let text = "\(text1) | \(text2)\n\(text3)" + let range1 = (text as NSString).range(of: text1) + let range2 = (text as NSString).range(of: text2) + let range3 = (text as NSString).range(of: text3) + + let string = NSMutableAttributedString(string: text) + string.yy_color = .colorFFFFFF() + string.yy_font = label.font + + + + string.yy_setTextHighlight(range1, color: nil, backgroundColor: nil) { [weak self] _, _, _, _ in + guard let self = self else { return } + self.dismiss(animated: true) { [weak self] in + let vc = BRWebViewController() + vc.webUrl = kSBUserAgreementWebUrl + BRAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true) + } + } + + string.yy_setTextHighlight(range2, color: nil, backgroundColor: nil) { [weak self] _, _, _, _ in + guard let self = self else { return } + self.dismiss(animated: true) { [weak self] in + let vc = BRWebViewController() + vc.webUrl = kSBPrivacyPolicyWebUrl + BRAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true) + } + } + + string.yy_setTextHighlight(range3, color: nil, backgroundColor: nil) { [weak self] _, _, _, _ in + guard let self = self else { return } + self.dismiss(animated: true) { [weak self] in + let vc = BRWebViewController() + vc.webUrl = kSBMemberShipAgreement + BRAppTool.topViewController?.navigationController?.pushViewController(vc, animated: true) + } + } + + + let agreementLabel = YYLabel() + agreementLabel.numberOfLines = 0 + agreementLabel.attributedText = string + view.addSubview(label) + view.addSubview(agreementLabel) label.snp.makeConstraints { make in make.left.equalToSuperview().offset(15) - make.top.bottom.equalToSuperview() + make.top.equalToSuperview() make.right.lessThanOrEqualToSuperview().offset(-15) } + agreementLabel.snp.makeConstraints { make in + make.left.equalToSuperview().offset(15) + make.top.equalTo(label.snp.bottom).offset(15) + make.bottom.equalToSuperview() + } + return view }() diff --git a/BeeReel/Class/Class/Store/Controller/BRStoreViewController.swift b/BeeReel/Class/Class/Store/Controller/BRStoreViewController.swift index 60b2d61..5095fab 100644 --- a/BeeReel/Class/Class/Store/Controller/BRStoreViewController.swift +++ b/BeeReel/Class/Class/Store/Controller/BRStoreViewController.swift @@ -42,14 +42,62 @@ class BRStoreViewController: BRViewController { label.textColor = .colorD3D3D3() label.numberOfLines = 0 label.text = "kStoreTipText".localized + + let text1 = "beereel_terms_of_service".localized + let text2 = "Privacy Policy".localized + let text3 = "Renewal Agreement".localized + let text = "\(text1) | \(text2)\n\(text3)" + let range1 = (text as NSString).range(of: text1) + let range2 = (text as NSString).range(of: text2) + let range3 = (text as NSString).range(of: text3) + + let string = NSMutableAttributedString(string: text) + string.yy_color = .colorFFFFFF() + string.yy_font = label.font + + + + string.yy_setTextHighlight(range1, color: nil, backgroundColor: nil) { [weak self] _, _, _, _ in + guard let self = self else { return } + let vc = BRWebViewController() + vc.webUrl = kSBUserAgreementWebUrl + self.navigationController?.pushViewController(vc, animated: true) + } + + string.yy_setTextHighlight(range2, color: nil, backgroundColor: nil) { [weak self] _, _, _, _ in + guard let self = self else { return } + let vc = BRWebViewController() + vc.webUrl = kSBPrivacyPolicyWebUrl + self.navigationController?.pushViewController(vc, animated: true) + } + + string.yy_setTextHighlight(range3, color: nil, backgroundColor: nil) { [weak self] _, _, _, _ in + guard let self = self else { return } + let vc = BRWebViewController() + vc.webUrl = kSBMemberShipAgreement + self.navigationController?.pushViewController(vc, animated: true) + } + + + let agreementLabel = YYLabel() + agreementLabel.numberOfLines = 0 + agreementLabel.attributedText = string + view.addSubview(label) + view.addSubview(agreementLabel) label.snp.makeConstraints { make in make.left.equalToSuperview().offset(15) - make.top.bottom.equalToSuperview() + make.top.equalToSuperview() make.right.lessThanOrEqualToSuperview().offset(-15) } + agreementLabel.snp.makeConstraints { make in + make.left.equalToSuperview().offset(15) + make.top.equalTo(label.snp.bottom).offset(15) + make.bottom.equalToSuperview() + } + return view }() diff --git a/BeeReel/Class/Class/Store/Model/BRPayDataRequest.swift b/BeeReel/Class/Class/Store/Model/BRPayDataRequest.swift index 9c6b415..ed0802e 100644 --- a/BeeReel/Class/Class/Store/Model/BRPayDataRequest.swift +++ b/BeeReel/Class/Class/Store/Model/BRPayDataRequest.swift @@ -34,44 +34,44 @@ class BRPayDataRequest: NSObject { BRHUD.show() } - BRStoreAPI.requestPayTemplate(isToast: isToast) { [weak self] model in - if isLoding { - BRHUD.dismiss() - } - guard let self = self else { return } - guard let model = model else { - self.completerBlock?(nil) - return - } - self.newTemplateModel = model - completer?(model) - } - // BRStoreAPI.requestPayTemplate(isToast: isToast) { [weak self] model in +// if isLoding { +// BRHUD.dismiss() +// } // guard let self = self else { return } // guard let model = model else { -// if isLoding { -// BRHUD.dismiss() -// } // self.completerBlock?(nil) // return // } -// 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() -// +// self.newTemplateModel = model +// completer?(model) // } + + BRStoreAPI.requestPayTemplate(isToast: isToast) { [weak self] model in + guard let self = self else { return } + guard let model = model else { + if isLoding { + BRHUD.dismiss() + } + self.completerBlock?(nil) + return + } + 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() + + } } } diff --git a/BeeReel/Class/Delegate/SceneDelegate.swift b/BeeReel/Class/Delegate/SceneDelegate.swift index afbe8a3..5a0ecff 100644 --- a/BeeReel/Class/Delegate/SceneDelegate.swift +++ b/BeeReel/Class/Delegate/SceneDelegate.swift @@ -38,7 +38,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { } func sceneDidBecomeActive(_ scene: UIScene) { - BRStatAPI.requestStatOnLine() + self.handleOnLine() BRStatAPI.requestEnterApp() } diff --git a/BeeReel/Source/Localizable.xcstrings b/BeeReel/Source/Localizable.xcstrings index 48ab701..82fb5ed 100644 --- a/BeeReel/Source/Localizable.xcstrings +++ b/BeeReel/Source/Localizable.xcstrings @@ -159,6 +159,17 @@ } } }, + "beereel_terms_of_service" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Terms of Service" + } + } + } + }, "beereel_video_lock_tip_text" : { "comment" : "请解锁上一集", "extractionState" : "manual", @@ -810,6 +821,17 @@ } } }, + "Renewal Agreement" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Renewal Agreement" + } + } + } + }, "Restore" : { "extractionState" : "manual", "localizations" : { diff --git a/资料/账号信息.txt b/资料/账号信息.txt index f3d3252..8a48d28 100644 --- a/资料/账号信息.txt +++ b/资料/账号信息.txt @@ -15,5 +15,7 @@ appleId :cs.hongyao.developer@icloud.com 沙盒 luyiyy@gmail.com +Vion@123456 -Vion@123456 \ No newline at end of file +beereel@test.com +Discover2024 \ No newline at end of file