个人中心样式开发
@ -232,5 +232,25 @@ extension UIColor {
|
|||||||
static func colorF76359(alpha: CGFloat = 1) -> UIColor {
|
static func colorF76359(alpha: CGFloat = 1) -> UIColor {
|
||||||
return color(hex: 0xF76359, alpha: alpha)
|
return color(hex: 0xF76359, alpha: alpha)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static func colorFFD5B2(alpha: CGFloat = 1) -> UIColor {
|
||||||
|
return color(hex: 0xFFD5B2, alpha: alpha)
|
||||||
|
}
|
||||||
|
|
||||||
|
static func color321704(alpha: CGFloat = 1) -> UIColor {
|
||||||
|
return color(hex: 0x321704, alpha: alpha)
|
||||||
|
}
|
||||||
|
|
||||||
|
static func colorF2A3A3(alpha: CGFloat = 1) -> UIColor {
|
||||||
|
return color(hex: 0xF2A3A3, alpha: alpha)
|
||||||
|
}
|
||||||
|
|
||||||
|
static func colorFEE095(alpha: CGFloat = 1) -> UIColor {
|
||||||
|
return color(hex: 0xFEE095, alpha: alpha)
|
||||||
|
}
|
||||||
|
|
||||||
|
static func color0D0807(alpha: CGFloat = 1) -> UIColor {
|
||||||
|
return color(hex: 0x0D0807, alpha: alpha)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ class SPMineHeaderView: UIView {
|
|||||||
|
|
||||||
var stackHeight = 0.0
|
var stackHeight = 0.0
|
||||||
stackHeight += memberView.intrinsicContentSize.height
|
stackHeight += memberView.intrinsicContentSize.height
|
||||||
|
stackHeight += walletView.intrinsicContentSize.height
|
||||||
|
|
||||||
if playHistoryArr?.count ?? 0 > 0 {
|
if playHistoryArr?.count ?? 0 > 0 {
|
||||||
stackHeight += self.stackView.spacing
|
stackHeight += self.stackView.spacing
|
||||||
@ -101,6 +102,12 @@ class SPMineHeaderView: UIView {
|
|||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
///钱包
|
||||||
|
private lazy var walletView: SPMineWalletView = {
|
||||||
|
let view = SPMineWalletView()
|
||||||
|
return view
|
||||||
|
}()
|
||||||
|
|
||||||
///播放记录
|
///播放记录
|
||||||
private lazy var playHistoryView: SPMinePlayHistoryView = {
|
private lazy var playHistoryView: SPMinePlayHistoryView = {
|
||||||
let view = SPMinePlayHistoryView()
|
let view = SPMinePlayHistoryView()
|
||||||
@ -137,6 +144,8 @@ class SPMineHeaderView: UIView {
|
|||||||
|
|
||||||
stackView.addArrangedSubview(memberView)
|
stackView.addArrangedSubview(memberView)
|
||||||
|
|
||||||
|
stackView.addArrangedSubview(walletView)
|
||||||
|
|
||||||
if let arr = playHistoryArr, arr.count > 0 {
|
if let arr = playHistoryArr, arr.count > 0 {
|
||||||
stackView.addArrangedSubview(playHistoryView)
|
stackView.addArrangedSubview(playHistoryView)
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import UIKit
|
|||||||
class SPMineMemberYesView: UIView {
|
class SPMineMemberYesView: UIView {
|
||||||
|
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
private lazy var iconImageView: UIImageView = {
|
private lazy var iconImageView: UIImageView = {
|
||||||
let imageView = UIImageView(image: UIImage(named: "vip_icon_02"))
|
let imageView = UIImageView(image: UIImage(named: "vip_icon_02"))
|
||||||
return imageView
|
return imageView
|
||||||
@ -23,6 +24,29 @@ class SPMineMemberYesView: UIView {
|
|||||||
return label
|
return label
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
private lazy var expirationTimeLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 12)
|
||||||
|
label.textColor = .colorFFD5B2()
|
||||||
|
label.text = "VlP expiration time : 2023-11-23"
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var openButton: UIButton = {
|
||||||
|
let button = JXButton(type: .custom)
|
||||||
|
button.setTitle("Stream Unlimited".localized, for: .normal)
|
||||||
|
button.setTitleColor(.color321704(), for: .normal)
|
||||||
|
button.jx_font = .fontRegular(ofSize: 12)
|
||||||
|
button.leftAnyRightmargin = 12
|
||||||
|
button.colors = [UIColor.colorF2A3A3().cgColor, UIColor.colorFEE095().cgColor]
|
||||||
|
button.locations = [0, 1]
|
||||||
|
button.startPoint = .init(x: 0, y: 0.5)
|
||||||
|
button.endPoint = .init(x: 1, y: 0.5)
|
||||||
|
button.layer.cornerRadius = 11
|
||||||
|
button.layer.masksToBounds = true
|
||||||
|
return button
|
||||||
|
}()
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
|
|
||||||
@ -46,10 +70,12 @@ extension SPMineMemberYesView {
|
|||||||
private func _setupUI() {
|
private func _setupUI() {
|
||||||
addSubview(iconImageView)
|
addSubview(iconImageView)
|
||||||
addSubview(titleLabel)
|
addSubview(titleLabel)
|
||||||
|
addSubview(expirationTimeLabel)
|
||||||
|
addSubview(openButton)
|
||||||
|
|
||||||
iconImageView.snp.makeConstraints { make in
|
iconImageView.snp.makeConstraints { make in
|
||||||
make.left.equalToSuperview().offset(3)
|
make.left.equalToSuperview().offset(3)
|
||||||
make.top.equalToSuperview().offset(6)
|
make.top.equalToSuperview().offset(12)
|
||||||
}
|
}
|
||||||
|
|
||||||
titleLabel.snp.makeConstraints { make in
|
titleLabel.snp.makeConstraints { make in
|
||||||
@ -57,6 +83,17 @@ extension SPMineMemberYesView {
|
|||||||
make.centerY.equalTo(iconImageView)
|
make.centerY.equalTo(iconImageView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expirationTimeLabel.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(14)
|
||||||
|
make.bottom.equalTo(openButton.snp.top).offset(kSPMainW(-10))
|
||||||
|
}
|
||||||
|
|
||||||
|
openButton.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(12)
|
||||||
|
make.bottom.equalToSuperview().offset(-16)
|
||||||
|
make.height.equalTo(22)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
151
MoviaBox/Class/Mine/View/SPMineWalletView.swift
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
//
|
||||||
|
// SPMineWalletView.swift
|
||||||
|
// MoviaBox
|
||||||
|
//
|
||||||
|
// Created by 佳尔 on 2025/4/27.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class SPMineWalletView: UIView {
|
||||||
|
|
||||||
|
override var intrinsicContentSize: CGSize {
|
||||||
|
return .init(width: kSPScreenWidth, height: 119)
|
||||||
|
}
|
||||||
|
|
||||||
|
//MARK: UI属性
|
||||||
|
private lazy var bgView: UIView = {
|
||||||
|
let view = UIView()
|
||||||
|
view.backgroundColor = .colorFFFFFF(alpha: 0.06)
|
||||||
|
view.layer.cornerRadius = 8
|
||||||
|
view.layer.masksToBounds = true
|
||||||
|
return view
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var moreButton: UIButton = {
|
||||||
|
let button = UIButton(type: .custom)
|
||||||
|
return button
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var moreTitleLabel: UILabel = {
|
||||||
|
let label = UILabel()
|
||||||
|
label.font = .fontRegular(ofSize: 12)
|
||||||
|
label.textColor = .colorFFFFFF()
|
||||||
|
label.text = "My wallet".localized
|
||||||
|
return label
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var moreIndicatorImageView: UIImageView = {
|
||||||
|
let imageView = UIImageView(image: UIImage(named: "arrow_right_icon_02"))
|
||||||
|
return imageView
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var lineView: UIView = {
|
||||||
|
let view = UIView()
|
||||||
|
view.backgroundColor = .color0D0807()
|
||||||
|
return view
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var storeButton: UIButton = {
|
||||||
|
let button = UIButton(type: .custom)
|
||||||
|
button.setBackgroundImage(UIImage(named: "store_button_01"), for: .normal)
|
||||||
|
button.setTitle("Store".localized, for: .normal)
|
||||||
|
button.setTitleColor(.colorFFFFFF(), for: .normal)
|
||||||
|
button.titleLabel?.font = .fontMedium(ofSize: 18)
|
||||||
|
return button
|
||||||
|
}()
|
||||||
|
|
||||||
|
private lazy var coinButton: UIButton = {
|
||||||
|
let button = JXButton(type: .custom)
|
||||||
|
button.isUserInteractionEnabled = false
|
||||||
|
button.setImage(UIImage(named: "coin_icon_01"), for: .normal)
|
||||||
|
button.setTitleColor(.colorFFFFFF(), for: .normal)
|
||||||
|
button.jx_font = .fontMedium(ofSize: 18)
|
||||||
|
button.space = 2
|
||||||
|
return button
|
||||||
|
}()
|
||||||
|
///赠送的金币
|
||||||
|
private lazy var complimentaryCoinButton: UIButton = {
|
||||||
|
let button = JXButton(type: .custom)
|
||||||
|
button.isUserInteractionEnabled = false
|
||||||
|
button.setImage(UIImage(named: "coin_icon_02"), for: .normal)
|
||||||
|
button.setTitleColor(.colorFFFFFF(), for: .normal)
|
||||||
|
button.jx_font = .fontMedium(ofSize: 18)
|
||||||
|
button.space = 2
|
||||||
|
return button
|
||||||
|
}()
|
||||||
|
|
||||||
|
|
||||||
|
override init(frame: CGRect) {
|
||||||
|
super.init(frame: frame)
|
||||||
|
coinButton.setTitle("0", for: .normal)
|
||||||
|
complimentaryCoinButton.setTitle("0", for: .normal)
|
||||||
|
|
||||||
|
|
||||||
|
_setupUI()
|
||||||
|
}
|
||||||
|
|
||||||
|
required init?(coder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension SPMineWalletView {
|
||||||
|
|
||||||
|
private func _setupUI() {
|
||||||
|
addSubview(bgView)
|
||||||
|
bgView.addSubview(moreButton)
|
||||||
|
moreButton.addSubview(moreTitleLabel)
|
||||||
|
moreButton.addSubview(moreIndicatorImageView)
|
||||||
|
bgView.addSubview(lineView)
|
||||||
|
bgView.addSubview(storeButton)
|
||||||
|
bgView.addSubview(coinButton)
|
||||||
|
bgView.addSubview(complimentaryCoinButton)
|
||||||
|
|
||||||
|
bgView.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(16)
|
||||||
|
make.centerX.equalToSuperview()
|
||||||
|
make.top.bottom.equalToSuperview()
|
||||||
|
}
|
||||||
|
|
||||||
|
moreButton.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview()
|
||||||
|
make.top.right.equalToSuperview()
|
||||||
|
make.height.equalTo(36)
|
||||||
|
}
|
||||||
|
|
||||||
|
moreTitleLabel.snp.makeConstraints { make in
|
||||||
|
make.centerY.equalToSuperview()
|
||||||
|
make.left.equalToSuperview().offset(12)
|
||||||
|
}
|
||||||
|
|
||||||
|
moreIndicatorImageView.snp.makeConstraints { make in
|
||||||
|
make.centerY.equalToSuperview()
|
||||||
|
make.right.equalToSuperview().offset(-12)
|
||||||
|
}
|
||||||
|
|
||||||
|
lineView.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(12)
|
||||||
|
make.centerX.equalToSuperview()
|
||||||
|
make.top.equalTo(moreButton.snp.bottom)
|
||||||
|
make.height.equalTo(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
storeButton.snp.makeConstraints { make in
|
||||||
|
make.right.equalToSuperview().offset(-12)
|
||||||
|
make.bottom.equalToSuperview().offset(-21)
|
||||||
|
}
|
||||||
|
|
||||||
|
coinButton.snp.makeConstraints { make in
|
||||||
|
make.left.equalToSuperview().offset(8)
|
||||||
|
make.centerY.equalTo(storeButton)
|
||||||
|
}
|
||||||
|
|
||||||
|
complimentaryCoinButton.snp.makeConstraints { make in
|
||||||
|
make.left.equalTo(coinButton.snp.right).offset(10)
|
||||||
|
make.centerY.equalTo(storeButton)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -15,7 +15,10 @@ class SPVideoInfoModel: SPModel, SmartCodable {
|
|||||||
var episode: String?
|
var episode: String?
|
||||||
var id: String?
|
var id: String?
|
||||||
var image_url: String?
|
var image_url: String?
|
||||||
|
///1:会员,2: 非会员
|
||||||
var is_vip: Int?
|
var is_vip: Int?
|
||||||
|
///是否锁定,购买后解锁
|
||||||
|
var is_lock: Bool?
|
||||||
var promise_view_ad: Int?
|
var promise_view_ad: Int?
|
||||||
// var revolution: []
|
// var revolution: []
|
||||||
var short_id: String?
|
var short_id: String?
|
||||||
|
22
MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Frame 1912056653@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Frame 1912056653@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@2x.png
vendored
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_01.imageset/Frame 1912056653@3x.png
vendored
Normal file
After Width: | Height: | Size: 8.0 KiB |
22
MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Frame 1912056652@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Frame 1912056652@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@2x.png
vendored
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/coin_icon_02.imageset/Frame 1912056652@3x.png
vendored
Normal file
After Width: | Height: | Size: 9.4 KiB |
22
MoviaBox/Source/Assets.xcassets/icon/store_button_01.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Frame 203@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Frame 203@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
MoviaBox/Source/Assets.xcassets/icon/store_button_01.imageset/Frame 203@2x.png
vendored
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
MoviaBox/Source/Assets.xcassets/icon/store_button_01.imageset/Frame 203@3x.png
vendored
Normal file
After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 242 KiB |
@ -55,6 +55,9 @@
|
|||||||
"Activate" = "Activate";
|
"Activate" = "Activate";
|
||||||
"Members can enjoy" = "Members can enjoy";
|
"Members can enjoy" = "Members can enjoy";
|
||||||
"Unlimited access to all series" = "Unlimited access to all series";
|
"Unlimited access to all series" = "Unlimited access to all series";
|
||||||
|
"Stream Unlimited" = "Stream Unlimited";
|
||||||
|
"My wallet" = "My wallet";
|
||||||
|
"Store" = "Store";
|
||||||
|
|
||||||
|
|
||||||
"kLoginAgreementText" = "By continuing, you agree to the User Agreement and Privacy Policy";
|
"kLoginAgreementText" = "By continuing, you agree to the User Agreement and Privacy Policy";
|
||||||
|