关于我们,web页面
This commit is contained in:
parent
26a5f7bd1a
commit
ed54a5eaae
@ -134,6 +134,8 @@
|
||||
BF5E75B32DE465EC00DE9DFE /* Dictionary+SPAdd.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5E75B22DE465EA00DE9DFE /* Dictionary+SPAdd.swift */; };
|
||||
BF5E75B62DE46DB600DE9DFE /* UIScrollView+Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5E75B52DE46DB600DE9DFE /* UIScrollView+Empty.swift */; };
|
||||
BF5E75B82DE46F7100DE9DFE /* VPNetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5E75B72DE46F7100DE9DFE /* VPNetworkReachabilityManager.swift */; };
|
||||
BF5E75BC2DE546AD00DE9DFE /* VPAboutUsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5E75BB2DE546AD00DE9DFE /* VPAboutUsCell.swift */; };
|
||||
BF5E75BE2DE54B2800DE9DFE /* VPAboutUsHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5E75BD2DE54B2800DE9DFE /* VPAboutUsHeaderView.swift */; };
|
||||
F939C04AD4003BA127F15C28 /* Pods_Veloria.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F57E87E765BF8D72A43DCA /* Pods_Veloria.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@ -274,6 +276,8 @@
|
||||
BF5E75B22DE465EA00DE9DFE /* Dictionary+SPAdd.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Dictionary+SPAdd.swift"; sourceTree = "<group>"; };
|
||||
BF5E75B52DE46DB600DE9DFE /* UIScrollView+Empty.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Empty.swift"; sourceTree = "<group>"; };
|
||||
BF5E75B72DE46F7100DE9DFE /* VPNetworkReachabilityManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNetworkReachabilityManager.swift; sourceTree = "<group>"; };
|
||||
BF5E75BB2DE546AD00DE9DFE /* VPAboutUsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPAboutUsCell.swift; sourceTree = "<group>"; };
|
||||
BF5E75BD2DE54B2800DE9DFE /* VPAboutUsHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPAboutUsHeaderView.swift; sourceTree = "<group>"; };
|
||||
E0BDA3570E00C90877E45AA0 /* Pods-VideoPlayer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoPlayer.debug.xcconfig"; path = "Target Support Files/Pods-VideoPlayer/Pods-VideoPlayer.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@ -819,6 +823,8 @@
|
||||
children = (
|
||||
BF0FA7B22DE447FE00C9E5F2 /* VPMeCell.swift */,
|
||||
BF0FA7BB2DE4563300C9E5F2 /* VPMeUserInfoCell.swift */,
|
||||
BF5E75BB2DE546AD00DE9DFE /* VPAboutUsCell.swift */,
|
||||
BF5E75BD2DE54B2800DE9DFE /* VPAboutUsHeaderView.swift */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@ -1027,9 +1033,11 @@
|
||||
BF0FA75D2DDF208400C9E5F2 /* VPExplorePlayerControlView.swift in Sources */,
|
||||
1B056E462DDAC370007EE38D /* UIScreen+VPAdd.swift in Sources */,
|
||||
BF0FA7692DE0502900C9E5F2 /* VPEpisodeCell.swift in Sources */,
|
||||
BF5E75BE2DE54B2800DE9DFE /* VPAboutUsHeaderView.swift in Sources */,
|
||||
BF0FA73D2DDED2D000C9E5F2 /* VPVideoAPI.swift in Sources */,
|
||||
BF0FA6EE2DDC5F8700C9E5F2 /* JXUUID.m in Sources */,
|
||||
BF5E75B12DE4656600DE9DFE /* VPCampaignWebViewController.swift in Sources */,
|
||||
BF5E75BC2DE546AD00DE9DFE /* VPAboutUsCell.swift in Sources */,
|
||||
BF0FA7BA2DE451B900C9E5F2 /* UINavigationBar+VPAdd.swift in Sources */,
|
||||
BF0FA77D2DE078D400C9E5F2 /* VPSearchRecommendedView.swift in Sources */,
|
||||
BF0FA7812DE150F700C9E5F2 /* VPSearchRecommendedContentView.swift in Sources */,
|
||||
|
@ -11,8 +11,8 @@ import UIKit
|
||||
let VPBaseURL = "https://api-qjwl168.qjwl168.com"
|
||||
let VPURLPathPrefix = "/velo"
|
||||
|
||||
let VPWebBaseURL = "https://www.thimratv.com"
|
||||
let VPCampaignWebURL = "https://campaign.moviatv.com"
|
||||
let VPWebBaseURL = "https://www.qjwl168.com"
|
||||
let VPCampaignWebURL = "https://campaign.qjwl168.com"
|
||||
#else
|
||||
let VPBaseURL = "https://api-qjwl168.qjwl168.com"
|
||||
let VPURLPathPrefix = "/velo"
|
||||
|
@ -78,6 +78,10 @@ extension VPWebViewController {
|
||||
//MARK: -------------- VPWebViewDelegate --------------
|
||||
extension VPWebViewController: VPWebViewDelegate {
|
||||
|
||||
func webViewDidStartLoad(_ webView: VPWebView) {
|
||||
VPHUD.show(containerView: self.view)
|
||||
}
|
||||
|
||||
func webView(webView: VPWebView, didChangeTitle title: String) {
|
||||
if autoTitle {
|
||||
self.title = title
|
||||
@ -85,12 +89,12 @@ extension VPWebViewController: VPWebViewDelegate {
|
||||
}
|
||||
|
||||
func webView(_ webView: VPWebView, didFailLoadWithError error: any Error) {
|
||||
VPHUD.dismiss()
|
||||
vpLog(message: error)
|
||||
}
|
||||
|
||||
func webViewDidFinishLoad(_ webView: VPWebView) {
|
||||
vpLog(message: "网页加载完成")
|
||||
|
||||
VPHUD.dismiss()
|
||||
}
|
||||
|
||||
func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
|
||||
|
@ -8,11 +8,39 @@
|
||||
import UIKit
|
||||
|
||||
class VPAboutUsViewController: VPViewController {
|
||||
|
||||
|
||||
private lazy var dataArr: [VPMeItem] = {
|
||||
let arr = [
|
||||
VPMeItem(title: "User Agreement".localized, type: .userAgreement),
|
||||
VPMeItem(title: "Privacy Policy".localized, type: .privacyPolicy),
|
||||
VPMeItem(title: "Child Personal Information Protection Rules".localized, type: .informationProtection),
|
||||
VPMeItem(title: "Youth Internet Civility Convention".localized, type: .civizatioConvention),
|
||||
VPMeItem(title: "Third-party information sharing list".localized, type: .informationSharing),
|
||||
VPMeItem(title: "Explicit List of Personal Information Collection".localized, type: .persoInforDisclosure),
|
||||
]
|
||||
return arr
|
||||
}()
|
||||
|
||||
private lazy var tableView: VPTableView = {
|
||||
let tableView = VPTableView(frame: .zero, style: .insetGrouped)
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
tableView.rowHeight = 50
|
||||
tableView.separatorStyle = .none
|
||||
tableView.register(VPAboutUsCell.self, forCellReuseIdentifier: "cell")
|
||||
return tableView
|
||||
}()
|
||||
|
||||
private lazy var headerView: VPAboutUsHeaderView = {
|
||||
let view = VPAboutUsHeaderView(frame: .init(x: 0, y: 0, width: UIScreen.width, height: 200))
|
||||
return view
|
||||
}()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.title = "About Us".localized
|
||||
|
||||
vp_setupUI()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
@ -23,3 +51,64 @@ class VPAboutUsViewController: VPViewController {
|
||||
|
||||
|
||||
}
|
||||
|
||||
extension VPAboutUsViewController {
|
||||
|
||||
private func vp_setupUI() {
|
||||
tableView.tableHeaderView = self.headerView
|
||||
|
||||
view.addSubview(tableView)
|
||||
|
||||
tableView.snp.makeConstraints { make in
|
||||
make.left.right.bottom.equalToSuperview()
|
||||
make.top.equalToSuperview().offset(UIScreen.navBarHeight + 10)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//MARK: -------------- UITableViewDelegate UITableViewDataSource --------------
|
||||
extension VPAboutUsViewController: UITableViewDelegate, UITableViewDataSource {
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! VPAboutUsCell
|
||||
cell.item = dataArr[indexPath.row]
|
||||
return cell
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return dataArr.count
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
let item = dataArr[indexPath.row]
|
||||
var urlStr: String?
|
||||
|
||||
switch item.type {
|
||||
case .userAgreement:
|
||||
urlStr = kVPUserAgreementWebUrl
|
||||
|
||||
case.privacyPolicy:
|
||||
urlStr = kVPPrivacyPolicyWebUrl
|
||||
|
||||
case.informationProtection:
|
||||
urlStr = kVPInformationProtectionWebUrl
|
||||
|
||||
case.civizatioConvention:
|
||||
urlStr = kVPCivizatioConventionWebUrl
|
||||
|
||||
case.informationSharing:
|
||||
urlStr = kVPInformationSharingWebUrl
|
||||
|
||||
case.persoInforDisclosure:
|
||||
urlStr = kVPPersoInforDisclosureWebUrl
|
||||
|
||||
default: break
|
||||
}
|
||||
|
||||
let vc = VPWebViewController()
|
||||
vc.urlStr = urlStr
|
||||
self.navigationController?.pushViewController(vc, animated: true)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,10 @@ struct VPMeItem {
|
||||
case userAgreement
|
||||
case aboutUs
|
||||
case feedback
|
||||
case informationProtection
|
||||
case civizatioConvention
|
||||
case informationSharing
|
||||
case persoInforDisclosure
|
||||
}
|
||||
|
||||
enum CellKey: String {
|
||||
|
56
Veloria/Class/Me/View/VPAboutUsCell.swift
Normal file
56
Veloria/Class/Me/View/VPAboutUsCell.swift
Normal file
@ -0,0 +1,56 @@
|
||||
//
|
||||
// VPAboutUsCell.swift
|
||||
// Veloria
|
||||
//
|
||||
// Created by 湖南秦九 on 2025/5/27.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class VPAboutUsCell: VPTableViewCell {
|
||||
|
||||
var item: VPMeItem? {
|
||||
didSet {
|
||||
titleLabel.text = item?.title
|
||||
}
|
||||
}
|
||||
|
||||
private lazy var titleLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.font = .fontRegular(ofSize: 14)
|
||||
label.textColor = .colorFFFFFF()
|
||||
return label
|
||||
}()
|
||||
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
contentView.backgroundColor = .colorFFFFFF(alpha: 0.1)
|
||||
|
||||
vp_setupUI()
|
||||
}
|
||||
|
||||
@MainActor required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension VPAboutUsCell {
|
||||
|
||||
private func vp_setupUI() {
|
||||
contentView.addSubview(titleLabel)
|
||||
contentView.addSubview(indicatorImageView)
|
||||
|
||||
titleLabel.snp.makeConstraints { make in
|
||||
make.centerY.equalToSuperview()
|
||||
make.left.equalToSuperview().offset(10)
|
||||
make.right.lessThanOrEqualToSuperview().offset(-50)
|
||||
}
|
||||
|
||||
indicatorImageView.snp.makeConstraints { make in
|
||||
make.centerY.equalToSuperview()
|
||||
make.right.equalToSuperview().offset(-10)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
79
Veloria/Class/Me/View/VPAboutUsHeaderView.swift
Normal file
79
Veloria/Class/Me/View/VPAboutUsHeaderView.swift
Normal file
@ -0,0 +1,79 @@
|
||||
//
|
||||
// VPAboutUsHeaderView.swift
|
||||
// Veloria
|
||||
//
|
||||
// Created by 湖南秦九 on 2025/5/27.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class VPAboutUsHeaderView: UIView {
|
||||
|
||||
private lazy var logoImageView: UIImageView = {
|
||||
let imageView = UIImageView(image: UIImage(named: "about_us_logo_icon"))
|
||||
imageView.layer.cornerRadius = 8
|
||||
imageView.layer.masksToBounds = true
|
||||
imageView.isUserInteractionEnabled = true
|
||||
let tap = UITapGestureRecognizer(target: self, action: #selector(handleLogoImageView))
|
||||
imageView.addGestureRecognizer(tap)
|
||||
return imageView
|
||||
}()
|
||||
|
||||
private lazy var nameLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.font = .fontBold(ofSize: 18)
|
||||
label.textColor = .colorFFFFFF()
|
||||
label.text = kVPAPPName
|
||||
return label
|
||||
}()
|
||||
|
||||
private lazy var versionLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.font = .fontRegular(ofSize: 12)
|
||||
label.textColor = .colorFFFFFF(alpha: 0.8)
|
||||
label.text = "version:\(kVPAPPVersion)"
|
||||
return label
|
||||
}()
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
vp_setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@objc private func handleLogoImageView() {
|
||||
guard let url = URL(string: VPWebBaseURL) else { return }
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
|
||||
}
|
||||
extension VPAboutUsHeaderView {
|
||||
|
||||
private func vp_setupUI() {
|
||||
addSubview(logoImageView)
|
||||
addSubview(nameLabel)
|
||||
addSubview(versionLabel)
|
||||
|
||||
logoImageView.snp.makeConstraints { make in
|
||||
make.centerX.equalToSuperview()
|
||||
make.top.equalToSuperview().offset(40)
|
||||
make.width.height.equalTo(100)
|
||||
}
|
||||
|
||||
nameLabel.snp.makeConstraints { make in
|
||||
make.centerX.equalToSuperview()
|
||||
make.top.equalTo(logoImageView.snp.bottom).offset(10)
|
||||
}
|
||||
|
||||
versionLabel.snp.makeConstraints { make in
|
||||
make.centerX.equalToSuperview()
|
||||
make.top.equalTo(nameLabel.snp.bottom).offset(5)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,8 +9,9 @@ import UIKit
|
||||
|
||||
class VPHUD: NSObject {
|
||||
|
||||
static func show() {
|
||||
SVProgressHUD.setDefaultMaskType(.clear)
|
||||
static func show(containerView: UIView? = nil, type: SVProgressHUDMaskType = .clear) {
|
||||
SVProgressHUD.setContainerView(containerView)
|
||||
SVProgressHUD.setDefaultMaskType(type)
|
||||
SVProgressHUD.show()
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"filename" : "GleeStream 1.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
21
Veloria/Source/Assets.xcassets/icon/about_us_logo_icon.imageset/Contents.json
vendored
Normal file
21
Veloria/Source/Assets.xcassets/icon/about_us_logo_icon.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "GleeStream 1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
Veloria/Source/Assets.xcassets/icon/about_us_logo_icon.imageset/GleeStream 1.png
vendored
Normal file
BIN
Veloria/Source/Assets.xcassets/icon/about_us_logo_icon.imageset/GleeStream 1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
@ -23,6 +23,10 @@
|
||||
"Select All" = "Select All";
|
||||
"Privacy Policy" = "Privacy Policy";
|
||||
"User Agreement" = "User Agreement";
|
||||
"Child Personal Information Protection Rules" = "Child Personal Information Protection Rules";
|
||||
"Youth Internet Civility Convention" = "Youth Internet Civility Convention";
|
||||
"Third-party information sharing list" = "Third-party information sharing list";
|
||||
"Explicit List of Personal Information Collection" = "Explicit List of Personal Information Collection";
|
||||
"About Us" = "About Us";
|
||||
"Visitor" = "Visitor";
|
||||
"Help Center" = "Help Center";
|
||||
|
Loading…
x
Reference in New Issue
Block a user