各种订单记录UI开发
This commit is contained in:
parent
73078a1acf
commit
538c5a5a86
@ -220,6 +220,7 @@
|
|||||||
ARCHS = "$(ARCHS_STANDARD)";
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = MoviaBox/MoviaBox.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
@ -264,6 +265,7 @@
|
|||||||
ARCHS = "$(ARCHS_STANDARD)";
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = MoviaBox/MoviaBox.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
@ -380,5 +380,13 @@ extension UIColor {
|
|||||||
static func colorFF1F1F(alpha: CGFloat = 1) -> UIColor {
|
static func colorFF1F1F(alpha: CGFloat = 1) -> UIColor {
|
||||||
return color(hex: 0xFF1F1F, alpha: alpha)
|
return color(hex: 0xFF1F1F, alpha: alpha)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static func colorFF3232(alpha: CGFloat = 1) -> UIColor {
|
||||||
|
return color(hex: 0xFF3232, alpha: alpha)
|
||||||
|
}
|
||||||
|
|
||||||
|
static func color362020(alpha: CGFloat = 1) -> UIColor {
|
||||||
|
return color(hex: 0x362020, alpha: alpha)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,18 @@ import UIKit
|
|||||||
|
|
||||||
extension UIFont {
|
extension UIFont {
|
||||||
|
|
||||||
|
static func regularFontName() -> String {
|
||||||
|
return ".AppleSystemUIFont"
|
||||||
|
}
|
||||||
|
|
||||||
|
static func mediumFontName() -> String {
|
||||||
|
return ".AppleSystemUIFontMedium"
|
||||||
|
}
|
||||||
|
|
||||||
|
static func boldFontName() -> String {
|
||||||
|
return ".AppleSystemUIFontBold"
|
||||||
|
}
|
||||||
|
|
||||||
static func fontRegular(ofSize: CGFloat) -> UIFont {
|
static func fontRegular(ofSize: CGFloat) -> UIFont {
|
||||||
return .systemFont(ofSize: ofSize, weight: .regular)
|
return .systemFont(ofSize: ofSize, weight: .regular)
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,23 @@ class SPUserAPI: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///用户登录
|
||||||
|
|
||||||
|
|
||||||
|
///退出登录
|
||||||
|
static func requestSignout() {
|
||||||
|
var param = SPNetworkParameters(path: "customer/signout")
|
||||||
|
param.isLoding = true
|
||||||
|
|
||||||
|
SPNetwork.request(parameters: param) { (response: SPNetworkResponse<SPUserInfo>) in
|
||||||
|
if response.code == SPNetworkCodeSucceed {
|
||||||
|
// completer?(true)
|
||||||
|
} else {
|
||||||
|
// completer?(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///注销账户
|
///注销账户
|
||||||
static func requestLogoff(completer: ((_ isFinish: Bool) -> Void)?) {
|
static func requestLogoff(completer: ((_ isFinish: Bool) -> Void)?) {
|
||||||
var param = SPNetworkParameters(path: "/customer/logoff")
|
var param = SPNetworkParameters(path: "/customer/logoff")
|
||||||
|
@ -35,8 +35,6 @@ struct SPMineItem {
|
|||||||
case settings
|
case settings
|
||||||
///消费记录
|
///消费记录
|
||||||
case consumptionRecords
|
case consumptionRecords
|
||||||
///订单记录
|
|
||||||
case purchaseRecords
|
|
||||||
///赠币记录
|
///赠币记录
|
||||||
case rewardCoins
|
case rewardCoins
|
||||||
///清理缓存
|
///清理缓存
|
||||||
|
@ -10,7 +10,6 @@ import UIKit
|
|||||||
class SPPlayBuyView: HWPanModalContentView {
|
class SPPlayBuyView: HWPanModalContentView {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//MARK: UI属性
|
//MARK: UI属性
|
||||||
private lazy var bgView: UIImageView = {
|
private lazy var bgView: UIImageView = {
|
||||||
let view = UIImageView(image: UIImage(named: "buy_bg_image_01"))
|
let view = UIImageView(image: UIImage(named: "buy_bg_image_01"))
|
||||||
|
@ -219,19 +219,8 @@ extension SPPlayerDetailControlView {
|
|||||||
toolView.addSubview(progressTimeLabel)
|
toolView.addSubview(progressTimeLabel)
|
||||||
addSubview(retreatButton)
|
addSubview(retreatButton)
|
||||||
addSubview(advanceButton)
|
addSubview(advanceButton)
|
||||||
// addSubview(speedButton)
|
|
||||||
// addSubview(speedSelectedView)
|
|
||||||
|
|
||||||
// self.progressView.snp.remakeConstraints { make in
|
|
||||||
// make.left.equalToSuperview().offset(15)
|
|
||||||
// make.centerX.equalToSuperview()
|
|
||||||
// make.height.equalTo(30)
|
|
||||||
// make.bottom.equalToSuperview().offset(-(kSPTabbarSafeBottomMargin + 10))
|
|
||||||
// }
|
|
||||||
|
|
||||||
self.progressTimeLabel.snp.makeConstraints { make in
|
self.progressTimeLabel.snp.makeConstraints { make in
|
||||||
// make.left.equalTo(self.progressView)
|
|
||||||
// make.bottom.equalTo(self.progressView).offset(-12)
|
|
||||||
make.centerY.equalToSuperview()
|
make.centerY.equalToSuperview()
|
||||||
make.left.equalToSuperview().offset(16)
|
make.left.equalToSuperview().offset(16)
|
||||||
}
|
}
|
||||||
@ -246,18 +235,6 @@ extension SPPlayerDetailControlView {
|
|||||||
make.left.equalTo(playImageView.snp.right).offset(kSPMainW(50))
|
make.left.equalTo(playImageView.snp.right).offset(kSPMainW(50))
|
||||||
}
|
}
|
||||||
|
|
||||||
// speedButton.snp.makeConstraints { make in
|
|
||||||
// make.centerY.equalTo(self.progressTimeLabel)
|
|
||||||
// make.right.equalToSuperview().offset(-15)
|
|
||||||
// make.width.equalTo(40)
|
|
||||||
// make.height.equalTo(20)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// speedSelectedView.snp.makeConstraints { make in
|
|
||||||
// make.left.right.equalToSuperview()
|
|
||||||
// make.bottom.equalTo(self.speedButton.snp.top).offset(-30)
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,58 @@
|
|||||||
|
//
|
||||||
|
// SPCoinOrderRecordViewController.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPCoinOrderRecordViewController: SPViewController {
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var tableView: SPTableView = {
|
||||||
|
let tableView = SPTableView(frame: .zero, style: .plain)
|
||||||
|
tableView.delegate = self
|
||||||
|
tableView.dataSource = self
|
||||||
|
tableView.rowHeight = 70
|
||||||
|
SPCoinOrderRecordCell.registerCell(tableView: tableView)
|
||||||
|
return tableView
|
||||||
|
}()
|
||||||
|
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
setBackgroundView(isShowGradient: false, bgImage: nil, backgroundColor: .clear)
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPCoinOrderRecordViewController {
|
||||||
|
private func _setupUI() {
|
||||||
|
view.addSubview(tableView)
|
||||||
|
|
||||||
|
tableView.snp.makeConstraints { make in
|
||||||
|
make.edges.equalToSuperview()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARK: -------------- UITableViewDelegate & UITableViewDataSource --------------
|
||||||
|
extension SPCoinOrderRecordViewController: UITableViewDelegate, UITableViewDataSource {
|
||||||
|
|
||||||
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
|
let cell = SPCoinOrderRecordCell.dequeueReusableCell(tableView: tableView, indexPath: indexPath)
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
|
return 10
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
//
|
||||||
|
// SPConsumptionRecordsViewController.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
///消费记录
|
||||||
|
class SPConsumptionRecordsViewController: SPViewController {
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var tableView: SPTableView = {
|
||||||
|
let tableView = SPTableView(frame: .zero, style: .plain)
|
||||||
|
tableView.delegate = self
|
||||||
|
tableView.dataSource = self
|
||||||
|
tableView.rowHeight = 72
|
||||||
|
tableView.separatorInset = .init(top: 0, left: 32, bottom: 0, right: 32)
|
||||||
|
SPConsumptionRecordsCell.registerCell(tableView: tableView)
|
||||||
|
return tableView
|
||||||
|
}()
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
self.title = "Consumption Records".localized
|
||||||
|
self.edgesForExtendedLayout = .top
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||||
|
setNavigationNormalStyle(backgroundColor: .clear, isTranslucent: true)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPConsumptionRecordsViewController {
|
||||||
|
private func _setupUI() {
|
||||||
|
view.addSubview(tableView)
|
||||||
|
|
||||||
|
tableView.snp.makeConstraints { make in
|
||||||
|
make.left.right.bottom.equalToSuperview()
|
||||||
|
make.top.equalToSuperview().offset(kSPNavBarHeight)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARK: -------------- UITableViewDelegate & UITableViewDataSource --------------
|
||||||
|
extension SPConsumptionRecordsViewController: UITableViewDelegate, UITableViewDataSource {
|
||||||
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
|
let cell = SPConsumptionRecordsCell.dequeueReusableCell(tableView: tableView, indexPath: indexPath)
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
|
return 10
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,106 @@
|
|||||||
|
//
|
||||||
|
// SPOrderRecordsPageViewController.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPOrderRecordsPageViewController: SPViewController {
|
||||||
|
|
||||||
|
private lazy var titles: [String] = ["Coin Record".localized, "VIP Record".localized]
|
||||||
|
private lazy var viewControllers: [UIViewController] = {
|
||||||
|
let vc1 = SPCoinOrderRecordViewController()
|
||||||
|
let vc2 = SPVIPOrderRecordViewController()
|
||||||
|
return [vc1, vc2]
|
||||||
|
}()
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var pageView: WMPageController = {
|
||||||
|
let pageView = WMPageController()
|
||||||
|
pageView.delegate = self
|
||||||
|
pageView.dataSource = self
|
||||||
|
pageView.titleFontName = UIFont.mediumFontName()
|
||||||
|
pageView.titleSizeNormal = 16
|
||||||
|
pageView.titleSizeSelected = 16
|
||||||
|
pageView.titleColorNormal = .colorFFFFFF(alpha: 0.45)
|
||||||
|
pageView.titleColorSelected = .colorFF3232()
|
||||||
|
pageView.progressColor = .colorFFFFFF()
|
||||||
|
pageView.menuViewStyle = .flood
|
||||||
|
pageView.menuViewLayoutMode = .center
|
||||||
|
pageView.progressHeight = 36
|
||||||
|
pageView.menuItemWidth = (kSPScreenWidth - 44) / 2
|
||||||
|
return pageView
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var menuBgView: UIView = {
|
||||||
|
let view = UIView()
|
||||||
|
view.backgroundColor = .color362020()
|
||||||
|
view.layer.cornerRadius = 16
|
||||||
|
view.layer.masksToBounds = true
|
||||||
|
return view
|
||||||
|
}()
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
self.title = "Order Records".localized
|
||||||
|
self.edgesForExtendedLayout = .top
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||||
|
setNavigationNormalStyle(backgroundColor: .clear, isTranslucent: true)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPOrderRecordsPageViewController {
|
||||||
|
|
||||||
|
private func _setupUI() {
|
||||||
|
addChild(self.pageView)
|
||||||
|
|
||||||
|
view.addSubview(menuBgView)
|
||||||
|
view.addSubview(self.pageView.view)
|
||||||
|
|
||||||
|
self.pageView.view.snp.makeConstraints { make in
|
||||||
|
make.left.right.bottom.equalToSuperview()
|
||||||
|
make.top.equalToSuperview().offset(kSPNavBarHeight)
|
||||||
|
}
|
||||||
|
|
||||||
|
menuBgView.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(16)
|
||||||
|
make.centerX.equalToSuperview()
|
||||||
|
make.top.equalToSuperview().offset(kSPNavBarHeight)
|
||||||
|
make.height.equalTo(48)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARK: -------------- WMPageControllerDelegate & WMPageControllerDataSource --------------
|
||||||
|
extension SPOrderRecordsPageViewController: WMPageControllerDelegate, WMPageControllerDataSource {
|
||||||
|
func pageController(_ pageController: WMPageController, preferredFrameForContentView contentView: WMScrollView) -> CGRect {
|
||||||
|
return CGRect(x: 0, y: 48, width: kSPScreenWidth, height: kSPScreenHeight - kSPNavBarHeight - 48)
|
||||||
|
}
|
||||||
|
|
||||||
|
func pageController(_ pageController: WMPageController, preferredFrameFor menuView: WMMenuView) -> CGRect {
|
||||||
|
return CGRect(x: 0, y: 0, width: kSPScreenWidth, height: 48)
|
||||||
|
}
|
||||||
|
|
||||||
|
func numbersOfChildControllers(in pageController: WMPageController) -> Int {
|
||||||
|
return self.titles.count
|
||||||
|
}
|
||||||
|
|
||||||
|
func pageController(_ pageController: WMPageController, titleAt index: Int) -> String {
|
||||||
|
return self.titles[index]
|
||||||
|
}
|
||||||
|
|
||||||
|
func pageController(_ pageController: WMPageController, viewControllerAt index: Int) -> UIViewController {
|
||||||
|
return viewControllers[index]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
//
|
||||||
|
// SPRewardCoinsViewController.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
//赠币记录
|
||||||
|
class SPRewardCoinsViewController: SPViewController {
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var tableView: SPTableView = {
|
||||||
|
let tableView = SPTableView(frame: .zero, style: .plain)
|
||||||
|
tableView.delegate = self
|
||||||
|
tableView.dataSource = self
|
||||||
|
tableView.rowHeight = 96
|
||||||
|
SPRewardCoinsCell.registerCell(tableView: tableView)
|
||||||
|
return tableView
|
||||||
|
}()
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
self.title = "Reward Coins".localized
|
||||||
|
self.edgesForExtendedLayout = .top
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||||
|
setNavigationNormalStyle(backgroundColor: .clear, isTranslucent: true)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPRewardCoinsViewController {
|
||||||
|
|
||||||
|
private func _setupUI() {
|
||||||
|
view.addSubview(tableView)
|
||||||
|
|
||||||
|
tableView.snp.makeConstraints { make in
|
||||||
|
make.left.right.bottom.equalToSuperview()
|
||||||
|
make.top.equalToSuperview().offset(kSPNavBarHeight)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARK: -------------- UITableViewDelegate & UITableViewDataSource --------------
|
||||||
|
extension SPRewardCoinsViewController: UITableViewDelegate, UITableViewDataSource {
|
||||||
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
|
let cell = SPRewardCoinsCell.dequeueReusableCell(tableView: tableView, indexPath: indexPath)
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
|
return 10
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
//
|
||||||
|
// SPVIPOrderRecordViewController.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPVIPOrderRecordViewController: SPViewController {
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var tableView: SPTableView = {
|
||||||
|
let tableView = SPTableView(frame: .zero, style: .plain)
|
||||||
|
tableView.delegate = self
|
||||||
|
tableView.dataSource = self
|
||||||
|
tableView.rowHeight = 74
|
||||||
|
SPVIPOrderRecordCell.registerCell(tableView: tableView)
|
||||||
|
return tableView
|
||||||
|
}()
|
||||||
|
|
||||||
|
|
||||||
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
|
setBackgroundView(isShowGradient: false, bgImage: nil, backgroundColor: .clear)
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPVIPOrderRecordViewController {
|
||||||
|
private func _setupUI() {
|
||||||
|
view.addSubview(tableView)
|
||||||
|
|
||||||
|
tableView.snp.makeConstraints { make in
|
||||||
|
make.edges.equalToSuperview()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARK: -------------- UITableViewDelegate & UITableViewDataSource --------------
|
||||||
|
extension SPVIPOrderRecordViewController: UITableViewDelegate, UITableViewDataSource {
|
||||||
|
|
||||||
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
|
let cell = SPVIPOrderRecordCell.dequeueReusableCell(tableView: tableView, indexPath: indexPath)
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
|
return 10
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -12,7 +12,7 @@ class SPWalletViewController: SPViewController {
|
|||||||
private lazy var dataArr: [SPMineItem] = {
|
private lazy var dataArr: [SPMineItem] = {
|
||||||
let arr = [
|
let arr = [
|
||||||
SPMineItem(type: .consumptionRecords, iconImage: UIImage(named: "records_icon_01"), title: "Consumption records".localized),
|
SPMineItem(type: .consumptionRecords, iconImage: UIImage(named: "records_icon_01"), title: "Consumption records".localized),
|
||||||
SPMineItem(type: .purchaseRecords, iconImage: UIImage(named: "records_icon_02"), title: "Purchase records".localized),
|
SPMineItem(type: .orderRecord, iconImage: UIImage(named: "records_icon_02"), title: "Purchase records".localized),
|
||||||
SPMineItem(type: .rewardCoins, iconImage: UIImage(named: "coin_icon_03"), title: "Reward Coins".localized),
|
SPMineItem(type: .rewardCoins, iconImage: UIImage(named: "coin_icon_03"), title: "Reward Coins".localized),
|
||||||
SPMineItem(type: .feedBack, iconImage: UIImage(named: "feed_back_icon_03"), title: "FeedBack".localized),
|
SPMineItem(type: .feedBack, iconImage: UIImage(named: "feed_back_icon_03"), title: "FeedBack".localized),
|
||||||
]
|
]
|
||||||
@ -87,6 +87,18 @@ extension SPWalletViewController: UITableViewDelegate, UITableViewDataSource {
|
|||||||
let vc = SPFeedbackViewController()
|
let vc = SPFeedbackViewController()
|
||||||
self.navigationController?.pushViewController(vc, animated: true)
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
|
case .rewardCoins:
|
||||||
|
let vc = SPRewardCoinsViewController()
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
|
case .consumptionRecords:
|
||||||
|
let vc = SPConsumptionRecordsViewController()
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
|
case .orderRecord:
|
||||||
|
let vc = SPOrderRecordsPageViewController()
|
||||||
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
83
MoviaBox/Class/Wallet/View/SPCoinOrderRecordCell.swift
Normal file
83
MoviaBox/Class/Wallet/View/SPCoinOrderRecordCell.swift
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
//
|
||||||
|
// SPCoinOrderRecordCell.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPCoinOrderRecordCell: SPTableViewCell {
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var titleLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 16)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var timeLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 14)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var coinLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 16)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var coinImageView: UIImageView = {
|
||||||
|
let imageView = UIImageView(image: UIImage(named: "coin_icon_06"))
|
||||||
|
return imageView
|
||||||
|
}()
|
||||||
|
|
||||||
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
|
titleLabel.text = "Recharge Coins"
|
||||||
|
timeLabel.text = "2024-6-10 23:41:18"
|
||||||
|
coinLabel.text = "+20000"
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
@MainActor required init?(coder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPCoinOrderRecordCell {
|
||||||
|
|
||||||
|
private func _setupUI() {
|
||||||
|
contentView.addSubview(titleLabel)
|
||||||
|
contentView.addSubview(timeLabel)
|
||||||
|
contentView.addSubview(coinLabel)
|
||||||
|
contentView.addSubview(coinImageView)
|
||||||
|
|
||||||
|
titleLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(32)
|
||||||
|
make.top.equalToSuperview().offset(15)
|
||||||
|
}
|
||||||
|
|
||||||
|
timeLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalTo(titleLabel)
|
||||||
|
make.bottom.equalToSuperview().offset(-15)
|
||||||
|
}
|
||||||
|
|
||||||
|
coinImageView.snp.makeConstraints { make in
|
||||||
|
make.centerY.equalToSuperview()
|
||||||
|
make.right.equalTo(coinLabel.snp.left).offset(-4)
|
||||||
|
}
|
||||||
|
|
||||||
|
coinLabel.snp.makeConstraints { make in
|
||||||
|
make.centerY.equalToSuperview()
|
||||||
|
make.right.equalToSuperview().offset(-25)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
87
MoviaBox/Class/Wallet/View/SPConsumptionRecordsCell.swift
Normal file
87
MoviaBox/Class/Wallet/View/SPConsumptionRecordsCell.swift
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
//
|
||||||
|
// SPConsumptionRecordsCell.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPConsumptionRecordsCell: SPTableViewCell {
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var titleLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 12)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var timeLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 12)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var desLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 12)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var coinLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 12)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
|
titleLabel.text = "Purchase Single Episode"
|
||||||
|
timeLabel.text = "2024-6-10 23:41:18"
|
||||||
|
desLabel.text = "Ep.8 Romantic Flash Marriage In Progress"
|
||||||
|
coinLabel.text = "-500 Coins"
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
@MainActor required init?(coder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPConsumptionRecordsCell {
|
||||||
|
|
||||||
|
private func _setupUI() {
|
||||||
|
contentView.addSubview(titleLabel)
|
||||||
|
contentView.addSubview(timeLabel)
|
||||||
|
contentView.addSubview(desLabel)
|
||||||
|
contentView.addSubview(coinLabel)
|
||||||
|
|
||||||
|
titleLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(32)
|
||||||
|
make.top.equalToSuperview().offset(16)
|
||||||
|
}
|
||||||
|
|
||||||
|
timeLabel.snp.makeConstraints { make in
|
||||||
|
make.right.equalToSuperview().offset(-32)
|
||||||
|
make.centerY.equalTo(titleLabel)
|
||||||
|
}
|
||||||
|
|
||||||
|
desLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalTo(titleLabel)
|
||||||
|
make.bottom.equalToSuperview().offset(-16)
|
||||||
|
make.width.lessThanOrEqualTo(kSPScreenWidth - 190)
|
||||||
|
}
|
||||||
|
|
||||||
|
coinLabel.snp.makeConstraints { make in
|
||||||
|
make.centerY.equalTo(desLabel)
|
||||||
|
make.right.equalTo(timeLabel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
110
MoviaBox/Class/Wallet/View/SPRewardCoinsCell.swift
Normal file
110
MoviaBox/Class/Wallet/View/SPRewardCoinsCell.swift
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
//
|
||||||
|
// SPRewardCoinsCell.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPRewardCoinsCell: SPTableViewCell {
|
||||||
|
|
||||||
|
private lazy var timeLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 14)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var nameLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 16)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var expireIconImageView: UIImageView = {
|
||||||
|
let imageView = UIImageView(image: UIImage(named: "expire_icon_01"))
|
||||||
|
return imageView
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var expireLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 12)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var coinLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 16)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var remainingLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 12)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
|
timeLabel.text = "2024-6-10 23:41:18"
|
||||||
|
nameLabel.text = "Check in"
|
||||||
|
expireLabel.text = "Expires in 30 days"
|
||||||
|
coinLabel.text = "+30"
|
||||||
|
remainingLabel.text = "Remaining:30"
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
@MainActor required init?(coder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPRewardCoinsCell {
|
||||||
|
|
||||||
|
private func _setupUI() {
|
||||||
|
contentView.addSubview(timeLabel)
|
||||||
|
contentView.addSubview(nameLabel)
|
||||||
|
contentView.addSubview(expireIconImageView)
|
||||||
|
contentView.addSubview(expireLabel)
|
||||||
|
contentView.addSubview(coinLabel)
|
||||||
|
contentView.addSubview(remainingLabel)
|
||||||
|
|
||||||
|
timeLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(32)
|
||||||
|
make.top.equalToSuperview().offset(17)
|
||||||
|
}
|
||||||
|
|
||||||
|
nameLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalTo(timeLabel)
|
||||||
|
make.top.equalTo(timeLabel.snp.bottom).offset(6)
|
||||||
|
}
|
||||||
|
|
||||||
|
expireIconImageView.snp.makeConstraints { make in
|
||||||
|
make.left.equalTo(timeLabel)
|
||||||
|
make.bottom.equalToSuperview().offset(-17)
|
||||||
|
}
|
||||||
|
|
||||||
|
expireLabel.snp.makeConstraints { make in
|
||||||
|
make.centerY.equalTo(expireIconImageView)
|
||||||
|
make.left.equalTo(expireIconImageView.snp.right).offset(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
coinLabel.snp.makeConstraints { make in
|
||||||
|
make.right.equalToSuperview().offset(-32)
|
||||||
|
make.top.equalToSuperview().offset(28)
|
||||||
|
}
|
||||||
|
|
||||||
|
remainingLabel.snp.makeConstraints { make in
|
||||||
|
make.right.equalTo(coinLabel)
|
||||||
|
make.bottom.equalToSuperview().offset(-17)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
74
MoviaBox/Class/Wallet/View/SPVIPOrderRecordCell.swift
Normal file
74
MoviaBox/Class/Wallet/View/SPVIPOrderRecordCell.swift
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
//
|
||||||
|
// SPVIPOrderRecordCell.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/29.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPVIPOrderRecordCell: SPTableViewCell {
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var titleLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 16)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var timeLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 14)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var dayLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontMedium(ofSize: 16)
|
||||||
|
label.textColor = .colorFF3232()
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
|
titleLabel.text = "Purchase VIP"
|
||||||
|
timeLabel.text = "2024-6-10 23:41:18"
|
||||||
|
dayLabel.text = "+30 days"
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
@MainActor required init?(coder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPVIPOrderRecordCell {
|
||||||
|
|
||||||
|
private func _setupUI() {
|
||||||
|
contentView.addSubview(titleLabel)
|
||||||
|
contentView.addSubview(timeLabel)
|
||||||
|
contentView.addSubview(dayLabel)
|
||||||
|
|
||||||
|
titleLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(32)
|
||||||
|
make.top.equalToSuperview().offset(15)
|
||||||
|
}
|
||||||
|
|
||||||
|
timeLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalTo(titleLabel)
|
||||||
|
make.bottom.equalToSuperview().offset(-15)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dayLabel.snp.makeConstraints { make in
|
||||||
|
make.centerY.equalToSuperview()
|
||||||
|
make.right.equalToSuperview().offset(-25)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
MoviaBox/MoviaBox.entitlements
Normal file
10
MoviaBox/MoviaBox.entitlements
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.developer.applesignin</key>
|
||||||
|
<array>
|
||||||
|
<string>Default</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
22
MoviaBox/Source/Assets.xcassets/icon/coin_icon_06.imageset/Contents.json
vendored
Normal file
22
MoviaBox/Source/Assets.xcassets/icon/coin_icon_06.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "image 20@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "image 20@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_06.imageset/image 20@2x.png
vendored
Normal file
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_06.imageset/image 20@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_06.imageset/image 20@3x.png
vendored
Normal file
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_06.imageset/image 20@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
22
MoviaBox/Source/Assets.xcassets/icon/expire_icon_01.imageset/Contents.json
vendored
Normal file
22
MoviaBox/Source/Assets.xcassets/icon/expire_icon_01.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "time icon@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "time icon@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
MoviaBox/Source/Assets.xcassets/icon/expire_icon_01.imageset/time icon@2x.png
vendored
Normal file
BIN
MoviaBox/Source/Assets.xcassets/icon/expire_icon_01.imageset/time icon@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 707 B |
BIN
MoviaBox/Source/Assets.xcassets/icon/expire_icon_01.imageset/time icon@3x.png
vendored
Normal file
BIN
MoviaBox/Source/Assets.xcassets/icon/expire_icon_01.imageset/time icon@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 976 B |
@ -72,6 +72,9 @@
|
|||||||
"Clear Cache" = "Clear Cache";
|
"Clear Cache" = "Clear Cache";
|
||||||
"Delete Account" = "Delete Account";
|
"Delete Account" = "Delete Account";
|
||||||
"Account Deletion" = "Account Deletion";
|
"Account Deletion" = "Account Deletion";
|
||||||
|
"Order Records" = "Order Records";
|
||||||
|
"Coin Record" = "Coin Record";
|
||||||
|
"VIP Record" = "VIP Record";
|
||||||
|
|
||||||
|
|
||||||
"kLoginAgreementText" = "By continuing, you agree to the User Agreement and Privacy Policy";
|
"kLoginAgreementText" = "By continuing, you agree to the User Agreement and Privacy Policy";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user