Commit 2f2f775adad95addf1b8b4d31fc50b433448cd43
1 parent
6a18d430
提交修改
Showing
4 changed files
with
55 additions
and
5 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
| 30 | 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */; }; | 30 | 792E57DB2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */; }; |
| 31 | 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */; }; | 31 | 79396EED2A319F220053E1AF /* NSObject+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */; }; |
| 32 | 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */; }; | 32 | 79396EF12A31C21B0053E1AF /* CNLiveInfoShowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */; }; |
| 33 | + 793CAF522A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793CAF512A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift */; }; | ||
| 33 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963988D2A260C0100D045EB /* AppDelegate.swift */; }; | 34 | 796398942A260C0100D045EB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963988D2A260C0100D045EB /* AppDelegate.swift */; }; |
| 34 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */; }; | 35 | 7963989D2A260E6200D045EB /* CNLiveBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */; }; |
| 35 | 7978A8432A396632007C86B8 /* CNLiveMineViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7978A8422A396632007C86B8 /* CNLiveMineViewModel.swift */; }; | 36 | 7978A8432A396632007C86B8 /* CNLiveMineViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7978A8422A396632007C86B8 /* CNLiveMineViewModel.swift */; }; |
| @@ -127,6 +128,7 @@ | @@ -127,6 +128,7 @@ | ||
| 127 | 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonQiniuTool.swift; sourceTree = "<group>"; }; | 128 | 792E57DA2A3AE9F4005834DB /* CNLiveCommonQiniuTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveCommonQiniuTool.swift; sourceTree = "<group>"; }; |
| 128 | 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveExtensions.swift"; sourceTree = "<group>"; }; | 129 | 79396EEC2A319F220053E1AF /* NSObject+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveExtensions.swift"; sourceTree = "<group>"; }; |
| 129 | 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveInfoShowViewController.swift; sourceTree = "<group>"; }; | 130 | 79396EF02A31C21B0053E1AF /* CNLiveInfoShowViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveInfoShowViewController.swift; sourceTree = "<group>"; }; |
| 131 | + 793CAF512A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineExchangeViewController.swift; sourceTree = "<group>"; }; | ||
| 130 | 7963988D2A260C0100D045EB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | 132 | 7963988D2A260C0100D045EB /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; |
| 131 | 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveBaseViewController.swift; sourceTree = "<group>"; }; | 133 | 7963989C2A260E6200D045EB /* CNLiveBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveBaseViewController.swift; sourceTree = "<group>"; }; |
| 132 | 7978A8422A396632007C86B8 /* CNLiveMineViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineViewModel.swift; sourceTree = "<group>"; }; | 134 | 7978A8422A396632007C86B8 /* CNLiveMineViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveMineViewModel.swift; sourceTree = "<group>"; }; |
| @@ -310,6 +312,7 @@ | @@ -310,6 +312,7 @@ | ||
| 310 | 7987BF3C2A497644000A1ABC /* CNLiveMineQuestViewController.swift */, | 312 | 7987BF3C2A497644000A1ABC /* CNLiveMineQuestViewController.swift */, |
| 311 | 7989B5C42A4BDC6000A19B10 /* CNLiveMineEarnViewController.swift */, | 313 | 7989B5C42A4BDC6000A19B10 /* CNLiveMineEarnViewController.swift */, |
| 312 | 7989B5C62A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift */, | 314 | 7989B5C62A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift */, |
| 315 | + 793CAF512A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift */, | ||
| 313 | ); | 316 | ); |
| 314 | path = Controller; | 317 | path = Controller; |
| 315 | sourceTree = "<group>"; | 318 | sourceTree = "<group>"; |
| @@ -832,10 +835,11 @@ | @@ -832,10 +835,11 @@ | ||
| 832 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, | 835 | 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 833 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, | 836 | 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, |
| 834 | 7C7C62F62A4D72E9007A912E /* CNMetaCodeDB.swift in Sources */, | 837 | 7C7C62F62A4D72E9007A912E /* CNMetaCodeDB.swift in Sources */, |
| 835 | - 790B1FB62A41938F0074CF00 /* UIImage+CNLiveColorImage.swift in Sources */, | ||
| 836 | - 790D019D2A2DCBD000C5978D /* UIView+CNGradient.swift in Sources */, | 838 | + 790B1FB62A41938F0074CF00 /* UIImage+CNLiveExtensions.swift in Sources */, |
| 839 | + 790D019D2A2DCBD000C5978D /* UIView+CNLiveExtensions.swift in Sources */, | ||
| 837 | 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */, | 840 | 798A44F72A3077ED00815935 /* CNLiveHotButton.swift in Sources */, |
| 838 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, | 841 | 7CD6753D2A2740B0008354C1 /* CNMainView.swift in Sources */, |
| 842 | + 793CAF522A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift in Sources */, | ||
| 839 | 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */, | 843 | 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */, |
| 840 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, | 844 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, |
| 841 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, | 845 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineEarnViewController.swift
| @@ -114,13 +114,17 @@ class CNLiveMineEarnViewController: CNLiveBaseViewController, JXPagingViewDelega | @@ -114,13 +114,17 @@ class CNLiveMineEarnViewController: CNLiveBaseViewController, JXPagingViewDelega | ||
| 114 | fatalError("init(coder:) has not been implemented") | 114 | fatalError("init(coder:) has not been implemented") |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | + override func viewDidAppear(_ animated: Bool) { | ||
| 118 | + super.viewDidAppear(animated) | ||
| 119 | + categoryView.selectItemAt(index: _index) | ||
| 120 | + } | ||
| 121 | + | ||
| 117 | override func viewDidLoad() { | 122 | override func viewDidLoad() { |
| 118 | super.viewDidLoad() | 123 | super.viewDidLoad() |
| 119 | navigationBarHidden = false | 124 | navigationBarHidden = false |
| 120 | titleName = "我的收益" | 125 | titleName = "我的收益" |
| 121 | 126 | ||
| 122 | view.addSubview(pagingView) | 127 | view.addSubview(pagingView) |
| 123 | - categoryView.selectItemAt(index: _index) | ||
| 124 | pagingView.listContainerView.didClickSelectedItem(at: _index) | 128 | pagingView.listContainerView.didClickSelectedItem(at: _index) |
| 125 | } | 129 | } |
| 126 | } | 130 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineExchangeViewController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveMineExchangeViewController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by open on 2023/7/8. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +class CNLiveMineExchangeViewController : CNLiveBaseViewController { | ||
| 11 | + | ||
| 12 | + lazy var backView : UIImageView = { | ||
| 13 | + let backView = UIImageView.init() | ||
| 14 | + | ||
| 15 | + return backView | ||
| 16 | + }() | ||
| 17 | + | ||
| 18 | + override func viewDidLoad() { | ||
| 19 | + super.viewDidLoad() | ||
| 20 | + navigationBarHidden = false | ||
| 21 | + titleName = "积分兑换" | ||
| 22 | + topNavView.backgroundColor = .clear | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + | ||
| 26 | +} |
metaCode/Classes/Main/MinePage/View/CNLiveMineHeaderView.swift
| @@ -417,6 +417,7 @@ class MineQuestHeaderView: UIView { | @@ -417,6 +417,7 @@ class MineQuestHeaderView: UIView { | ||
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | 419 | ||
| 420 | + | ||
| 420 | class MineEarnHeaderView: UIView { | 421 | class MineEarnHeaderView: UIView { |
| 421 | 422 | ||
| 422 | lazy var mainView: UIView = { | 423 | lazy var mainView: UIView = { |
| @@ -427,14 +428,20 @@ class MineEarnHeaderView: UIView { | @@ -427,14 +428,20 @@ class MineEarnHeaderView: UIView { | ||
| 427 | return mainView | 428 | return mainView |
| 428 | }() | 429 | }() |
| 429 | 430 | ||
| 430 | - | ||
| 431 | - | 431 | + lazy var exChangeBtn : UIButton = { |
| 432 | + let exChangeBtn = UIButton.init(type: .custom) | ||
| 433 | + exChangeBtn.backgroundColor = .blue | ||
| 434 | + exChangeBtn.setTitle("去兑换", for: .normal) | ||
| 435 | + exChangeBtn.addTarget(self, action: #selector(pushExChangeMethod), for: .touchUpInside) | ||
| 436 | + return exChangeBtn | ||
| 437 | + }() | ||
| 432 | 438 | ||
| 433 | 439 | ||
| 434 | override init(frame: CGRect) { | 440 | override init(frame: CGRect) { |
| 435 | super.init(frame: frame) | 441 | super.init(frame: frame) |
| 436 | 442 | ||
| 437 | addSubview(mainView) | 443 | addSubview(mainView) |
| 444 | + mainView.addSubview(exChangeBtn) | ||
| 438 | 445 | ||
| 439 | setupConstraints() | 446 | setupConstraints() |
| 440 | } | 447 | } |
| @@ -446,6 +453,15 @@ class MineEarnHeaderView: UIView { | @@ -446,6 +453,15 @@ class MineEarnHeaderView: UIView { | ||
| 446 | make.left.equalToSuperview().offset(20) | 453 | make.left.equalToSuperview().offset(20) |
| 447 | make.right.equalToSuperview().offset(-20) | 454 | make.right.equalToSuperview().offset(-20) |
| 448 | } | 455 | } |
| 456 | + exChangeBtn.snp.makeConstraints { make in | ||
| 457 | + make.center.equalToSuperview() | ||
| 458 | + make.height.equalTo(50) | ||
| 459 | + make.width.equalTo(100) | ||
| 460 | + } | ||
| 461 | + } | ||
| 462 | + | ||
| 463 | + @objc func pushExChangeMethod() { | ||
| 464 | + currentViewController()?.navigationController?.pushViewController(CNLiveMineExchangeViewController.init(), animated: true) | ||
| 449 | } | 465 | } |
| 450 | 466 | ||
| 451 | required init?(coder: NSCoder) { | 467 | required init?(coder: NSCoder) { |