充值排序,UI优化,1.0.5提审
This commit is contained in:
parent
ade3e2c2bd
commit
1cf2c2dde2
@ -1794,7 +1794,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Veloria/Veloria.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = 394VH538M8;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Veloria/Source/Info.plist;
|
||||
@ -1813,7 +1813,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.4;
|
||||
MARKETING_VERSION = 1.0.5;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qjwl168.veloria.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@ -1837,7 +1837,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Veloria/Veloria.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = 394VH538M8;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Veloria/Source/Info.plist;
|
||||
@ -1856,7 +1856,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.4;
|
||||
MARKETING_VERSION = 1.0.5;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qjwl168.veloria.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
@ -46,7 +46,7 @@ extension SceneDelegate {
|
||||
|
||||
func vp_handleOpenAppMessage(webpageURL: URL?) {
|
||||
guard VPNetworkReachabilityManager.manager.isReachable == true, //有网
|
||||
AppDelegate.haveBeenShownAPNS, //推送弹窗
|
||||
// AppDelegate.haveBeenShownAPNS, //推送弹窗
|
||||
self.isOpenApp, //APP被开启
|
||||
VPAppTool.idfaAuthorizationFinish //idfa授权完成
|
||||
else {
|
||||
|
@ -15,6 +15,11 @@ class VPMoreVideoViewController: VPViewController {
|
||||
}
|
||||
}
|
||||
|
||||
private lazy var bgView: UIImageView = {
|
||||
let imageView = UIImageView(image: UIImage(named: "more_bg_image"))
|
||||
return imageView
|
||||
}()
|
||||
|
||||
private lazy var titleLeftImageView: UIImageView = {
|
||||
let imageView = UIImageView(image: UIImage(named: "title_icon_01"))
|
||||
return imageView
|
||||
@ -67,11 +72,16 @@ class VPMoreVideoViewController: VPViewController {
|
||||
extension VPMoreVideoViewController {
|
||||
|
||||
private func vp_setupUI() {
|
||||
view.addSubview(bgView)
|
||||
view.addSubview(titleLeftImageView)
|
||||
view.addSubview(titleRightImageView)
|
||||
view.addSubview(titleLabel)
|
||||
view.addSubview(collectionView)
|
||||
|
||||
bgView.snp.makeConstraints { make in
|
||||
make.left.right.top.equalToSuperview()
|
||||
}
|
||||
|
||||
titleLeftImageView.snp.makeConstraints { make in
|
||||
make.left.equalToSuperview().offset(15)
|
||||
make.top.equalToSuperview().offset(UIScreen.navBarHeight + 10)
|
||||
|
@ -26,6 +26,7 @@ class VPDetailRecommandBannerCell: FSPagerViewCell {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private(set) lazy var player: VPPlayer = {
|
||||
let player = VPPlayer()
|
||||
player.playerView = playerView
|
||||
@ -33,33 +34,52 @@ class VPDetailRecommandBannerCell: FSPagerViewCell {
|
||||
return player
|
||||
}()
|
||||
|
||||
|
||||
private(set) lazy var bgView: UIView = {
|
||||
let view = VPGradientView()
|
||||
view.isHidden = true
|
||||
view.layer.cornerRadius = 14
|
||||
view.layer.masksToBounds = true
|
||||
view.colors = [UIColor.color05CEA0(alpha: 0.5).cgColor, UIColor.color7C174F(alpha: 0.5).cgColor]
|
||||
view.locations = [0, 1]
|
||||
view.startPoint = .init(x: 0, y: 0.3)
|
||||
view.endPoint = .init(x: 1, y: 0.8)
|
||||
return view
|
||||
}()
|
||||
|
||||
private lazy var coverImageView: VPImageView = {
|
||||
let imageView = VPImageView()
|
||||
imageView.layer.cornerRadius = bgView.layer.cornerRadius
|
||||
imageView.layer.masksToBounds = true
|
||||
return imageView
|
||||
}()
|
||||
|
||||
private lazy var playerView: UIView = {
|
||||
let view = UIView()
|
||||
view.layer.cornerRadius = bgView.layer.cornerRadius
|
||||
view.layer.masksToBounds = true
|
||||
return view
|
||||
}()
|
||||
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
contentView.layer.cornerRadius = 14
|
||||
contentView.layer.masksToBounds = true
|
||||
|
||||
contentView.addSubview(bgView)
|
||||
contentView.addSubview(playerView)
|
||||
contentView.addSubview(coverImageView)
|
||||
|
||||
coverImageView.snp.makeConstraints { make in
|
||||
|
||||
bgView.snp.makeConstraints { make in
|
||||
make.edges.equalToSuperview()
|
||||
}
|
||||
coverImageView.snp.makeConstraints { make in
|
||||
make.left.equalToSuperview().offset(2.5)
|
||||
make.top.equalToSuperview().offset(2.5)
|
||||
make.center.equalToSuperview()
|
||||
}
|
||||
|
||||
playerView.snp.makeConstraints { make in
|
||||
make.edges.equalToSuperview()
|
||||
make.edges.equalTo(coverImageView)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,10 @@ class VPDetailRecommandView: HWPanModalContentView {
|
||||
|
||||
oldValue?.isCurrentPlayer = false
|
||||
oldValue?.player.pause()
|
||||
oldValue?.bgView.isHidden = true
|
||||
|
||||
currentCell?.isCurrentPlayer = true
|
||||
currentCell?.bgView.isHidden = false
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,6 +299,9 @@ extension VPDetailRecommandView: FSPagerViewDelegate, FSPagerViewDataSource {
|
||||
func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
|
||||
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index) as! VPDetailRecommandBannerCell
|
||||
cell.model = self.dataArr[index]
|
||||
if currentCell == nil, index == 0 {
|
||||
cell.bgView.isHidden = false
|
||||
}
|
||||
return cell
|
||||
}
|
||||
|
||||
@ -312,5 +317,6 @@ extension VPDetailRecommandView: FSPagerViewDelegate, FSPagerViewDataSource {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -25,21 +25,24 @@ class VPPlayerRechargeView: HWPanModalContentView {
|
||||
var model: VPPayTemplateModel? {
|
||||
didSet {
|
||||
stackView.removeAllArrangedSubview()
|
||||
guard let model = self.model else { return }
|
||||
|
||||
if let model = self.model {
|
||||
|
||||
if let list = model.list_sub_vip, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.vipView)
|
||||
self.vipView.dataArr = list
|
||||
if let sort = model.sort, sort.count > 0 {
|
||||
sort.forEach {
|
||||
if $0 == .vip {
|
||||
addVipView()
|
||||
} else if $0 == .coin {
|
||||
addCoinView()
|
||||
}
|
||||
}
|
||||
|
||||
if let list = model.list_coins, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.coinsView)
|
||||
self.coinsView.dataArr = list
|
||||
}
|
||||
|
||||
self.stackView.addArrangedSubview(tipView)
|
||||
} else {
|
||||
addVipView()
|
||||
addCoinView()
|
||||
}
|
||||
|
||||
|
||||
self.stackView.addArrangedSubview(tipView)
|
||||
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in
|
||||
self?.panModalSetNeedsLayoutUpdate()
|
||||
@ -50,7 +53,13 @@ class VPPlayerRechargeView: HWPanModalContentView {
|
||||
|
||||
var unlockCoin: Int? {
|
||||
didSet {
|
||||
let coinCountStr = " \(unlockCoin ?? 0)"
|
||||
guard let coin = unlockCoin, coin > 0 else {
|
||||
self.unlockCoinBgView.isHidden = true
|
||||
return
|
||||
}
|
||||
self.unlockCoinBgView.isHidden = false
|
||||
|
||||
let coinCountStr = " \(coin)"
|
||||
let text = "veloria_unlock".localized + coinCountStr
|
||||
let coinRange = text.ocString().range(of: coinCountStr)
|
||||
|
||||
@ -262,6 +271,20 @@ class VPPlayerRechargeView: HWPanModalContentView {
|
||||
|
||||
extension VPPlayerRechargeView {
|
||||
|
||||
private func addVipView() {
|
||||
if let list = model?.list_sub_vip, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.vipView)
|
||||
self.vipView.dataArr = list
|
||||
}
|
||||
}
|
||||
|
||||
private func addCoinView() {
|
||||
if let list = model?.list_coins, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.coinsView)
|
||||
self.coinsView.dataArr = list
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func updateCoin() {
|
||||
let coinCountStr = " \(VPLoginManager.manager.userInfo?.totalCoin ?? 0)"
|
||||
let text = "veloria_your_coins".localized + coinCountStr
|
||||
|
@ -88,7 +88,11 @@ extension VPVideoPlayViewModel {
|
||||
|
||||
let view = VPPlayerRechargeView()
|
||||
view.model = model
|
||||
view.unlockCoin = videoInfo.coins
|
||||
if videoInfo.is_lock != true {
|
||||
view.unlockCoin = nil
|
||||
} else {
|
||||
view.unlockCoin = videoInfo.coins
|
||||
}
|
||||
view.shortPlayId = videoInfo.short_play_id
|
||||
view.videoId = videoInfo.short_play_video_id
|
||||
view.buyFinishBlock = { [weak self] in
|
||||
|
@ -11,6 +11,8 @@ class VPStoreViewController: VPViewController {
|
||||
|
||||
///vip购买成功回调
|
||||
var vipBuyFinishBlock: (() -> Void)?
|
||||
|
||||
private var templateModel: VPPayTemplateModel?
|
||||
|
||||
private lazy var scrollView: VPScrollView = {
|
||||
let scrollView = VPScrollView()
|
||||
@ -88,6 +90,42 @@ class VPStoreViewController: VPViewController {
|
||||
}
|
||||
}
|
||||
|
||||
extension VPStoreViewController {
|
||||
|
||||
private func updateLayout() {
|
||||
guard let model = self.templateModel else { return }
|
||||
|
||||
if let sort = model.sort, sort.count > 0 {
|
||||
sort.forEach {
|
||||
if $0 == .vip {
|
||||
addVipView()
|
||||
} else if $0 == .coin {
|
||||
addCoinView()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addVipView()
|
||||
addCoinView()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private func addVipView() {
|
||||
if let list = templateModel?.list_sub_vip, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.vipView)
|
||||
self.vipView.dataArr = list
|
||||
}
|
||||
}
|
||||
|
||||
private func addCoinView() {
|
||||
if let list = templateModel?.list_coins, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.coinsView)
|
||||
self.coinsView.dataArr = list
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension VPStoreViewController {
|
||||
|
||||
private func vp_setupUI() {
|
||||
@ -115,18 +153,11 @@ extension VPStoreViewController {
|
||||
|
||||
VPWalletAPI.requestPayTemplate { [weak self] model in
|
||||
guard let self = self else { return }
|
||||
self.stackView.removeAllArrangedSubview()
|
||||
|
||||
if let model = model {
|
||||
self.stackView.removeAllArrangedSubview()
|
||||
|
||||
if let list = model.list_sub_vip, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.vipView)
|
||||
self.vipView.dataArr = list
|
||||
}
|
||||
|
||||
if let list = model.list_coins, list.count > 0 {
|
||||
self.stackView.addArrangedSubview(self.coinsView)
|
||||
self.coinsView.dataArr = list
|
||||
}
|
||||
self.templateModel = model
|
||||
self.updateLayout()
|
||||
|
||||
self.stackView.addArrangedSubview(self.tipView)
|
||||
}
|
||||
|
@ -10,6 +10,12 @@ import SmartCodable
|
||||
|
||||
class VPPayTemplateModel: VPModel, SmartCodable {
|
||||
|
||||
enum SortName: String, SmartCaseDefaultable {
|
||||
case coin = "list_coins"
|
||||
case vip = "list_sub_vip"
|
||||
}
|
||||
|
||||
var list_coins: [VPPayTemplateItem]?
|
||||
var list_sub_vip: [VPPayTemplateItem]?
|
||||
var sort: [SortName]?
|
||||
}
|
||||
|
@ -9,15 +9,15 @@ import UIKit
|
||||
|
||||
class VPStoreVipBuyView: UIView {
|
||||
|
||||
override var intrinsicContentSize: CGSize {
|
||||
var height: CGFloat = 1
|
||||
|
||||
if dataArr.count > 0, collectionView.contentSize.height > 0 {
|
||||
height = collectionView.contentSize.height + 1
|
||||
}
|
||||
|
||||
return .init(width: UIScreen.width, height: height)
|
||||
}
|
||||
// override var intrinsicContentSize: CGSize {
|
||||
// var height: CGFloat = 1
|
||||
//
|
||||
// if dataArr.count > 0, collectionView.contentSize.height > 0 {
|
||||
// height = collectionView.contentSize.height + 1
|
||||
// }
|
||||
//
|
||||
// return .init(width: UIScreen.width, height: height)
|
||||
// }
|
||||
|
||||
var buyFinishBlock: (() -> Void)?
|
||||
|
||||
@ -31,7 +31,11 @@ class VPStoreVipBuyView: UIView {
|
||||
self?.collectionView.reloadData()
|
||||
}
|
||||
self.collectionView.performBatchUpdates(nil) { [weak self] _ in
|
||||
self?.invalidateIntrinsicContentSize()
|
||||
guard let self = self else { return }
|
||||
let height = self.collectionView.contentSize.height + 1
|
||||
self.collectionView.snp.updateConstraints { make in
|
||||
make.height.equalTo(height)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -90,6 +94,7 @@ extension VPStoreVipBuyView {
|
||||
collectionView.snp.makeConstraints { make in
|
||||
make.left.right.bottom.equalToSuperview()
|
||||
make.top.equalTo(titleLabel.snp.bottom)
|
||||
make.height.equalTo(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ class VPWalletHeaderItemView: UIView {
|
||||
}
|
||||
}
|
||||
|
||||
private var textAlignment: NSTextAlignment = .left
|
||||
|
||||
private lazy var coinCountLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
@ -36,8 +37,9 @@ class VPWalletHeaderItemView: UIView {
|
||||
return label
|
||||
}()
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
init(textAlignment: NSTextAlignment) {
|
||||
super.init(frame: .zero)
|
||||
self.textAlignment = textAlignment
|
||||
|
||||
vp_setupUI()
|
||||
}
|
||||
@ -56,13 +58,16 @@ extension VPWalletHeaderItemView {
|
||||
|
||||
|
||||
titleLabel.snp.makeConstraints { make in
|
||||
// make.left.equalTo(coinCountLabel)
|
||||
make.centerX.equalToSuperview()
|
||||
if self.textAlignment == .left {
|
||||
make.left.equalToSuperview().offset(20)
|
||||
} else if self.textAlignment == .center {
|
||||
make.centerX.equalToSuperview().offset(-20)
|
||||
}
|
||||
make.top.equalToSuperview()
|
||||
}
|
||||
|
||||
coinCountLabel.snp.makeConstraints { make in
|
||||
make.centerX.equalToSuperview()
|
||||
make.left.equalTo(titleLabel)
|
||||
make.bottom.equalToSuperview()
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(5)
|
||||
}
|
||||
|
@ -57,13 +57,13 @@ class VPWalletHeaderView: UIView {
|
||||
}()
|
||||
|
||||
private lazy var rechargeCoinView: VPWalletHeaderItemView = {
|
||||
let view = VPWalletHeaderItemView()
|
||||
let view = VPWalletHeaderItemView(textAlignment: .left)
|
||||
view.title = "veloria_recharge".localized
|
||||
return view
|
||||
}()
|
||||
|
||||
private lazy var sendCoinView: VPWalletHeaderItemView = {
|
||||
let view = VPWalletHeaderItemView()
|
||||
let view = VPWalletHeaderItemView(textAlignment: .center)
|
||||
view.title = "veloria_bonus".localized
|
||||
return view
|
||||
}()
|
||||
|
22
Veloria/Source/Assets.xcassets/image/more_bg_image.imageset/Contents.json
vendored
Normal file
22
Veloria/Source/Assets.xcassets/image/more_bg_image.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "顶部bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "顶部bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
Veloria/Source/Assets.xcassets/image/more_bg_image.imageset/顶部bg@2x.png
vendored
Normal file
BIN
Veloria/Source/Assets.xcassets/image/more_bg_image.imageset/顶部bg@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 412 KiB |
BIN
Veloria/Source/Assets.xcassets/image/more_bg_image.imageset/顶部bg@3x.png
vendored
Normal file
BIN
Veloria/Source/Assets.xcassets/image/more_bg_image.imageset/顶部bg@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 715 KiB |
Loading…
x
Reference in New Issue
Block a user