Commit f9f0c0ca446965853b58ec8b38f9d462992a2d5e
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
Showing
8 changed files
with
124 additions
and
52 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -722,10 +722,10 @@ | @@ -722,10 +722,10 @@ | ||
| 722 | 1938BD1B2B45557700390A34 /* DownSlideController */ = { | 722 | 1938BD1B2B45557700390A34 /* DownSlideController */ = { |
| 723 | isa = PBXGroup; | 723 | isa = PBXGroup; |
| 724 | children = ( | 724 | children = ( |
| 725 | - 19BB1FDE2AEA3A450094D962 /* CNSlideBaseNavigationController.swift */, | ||
| 726 | - 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */, | ||
| 727 | 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */, | 725 | 192336EA2AD9224300D47CD4 /* CNUpSlideViewController.swift */, |
| 728 | 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */, | 726 | 19CC4D4A2ADD086F00308E2A /* CNUpSlideDetailViewController.swift */, |
| 727 | + 19BB1FDE2AEA3A450094D962 /* CNSlideBaseNavigationController.swift */, | ||
| 728 | + 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */, | ||
| 729 | ); | 729 | ); |
| 730 | path = DownSlideController; | 730 | path = DownSlideController; |
| 731 | sourceTree = "<group>"; | 731 | sourceTree = "<group>"; |
| @@ -932,6 +932,7 @@ | @@ -932,6 +932,7 @@ | ||
| 932 | 191732F92B0AF329007BCC04 /* GoodsDetail */, | 932 | 191732F92B0AF329007BCC04 /* GoodsDetail */, |
| 933 | 19565ED22AF9FE67007D6727 /* GoodsManager */, | 933 | 19565ED22AF9FE67007D6727 /* GoodsManager */, |
| 934 | 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */, | 934 | 1926C2902AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift */, |
| 935 | + 19FA201A2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift */, | ||
| 935 | 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */, | 936 | 19BB1FE52AEB93B80094D962 /* CNLiveShopUserInfoModel.swift */, |
| 936 | 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */, | 937 | 19BB1FE72AECAD060094D962 /* CNLiveShopConsoleModel.swift */, |
| 937 | 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */, | 938 | 19BB1FEF2AF0E5B30094D962 /* CNLiveShopDetailModel.swift */, |
| @@ -944,7 +945,6 @@ | @@ -944,7 +945,6 @@ | ||
| 944 | children = ( | 945 | children = ( |
| 945 | 1917330B2B109691007BCC04 /* CNLivePlayer */, | 946 | 1917330B2B109691007BCC04 /* CNLivePlayer */, |
| 946 | 19CC4D512ADD129800308E2A /* CNUpSlideAnimationTransition.swift */, | 947 | 19CC4D512ADD129800308E2A /* CNUpSlideAnimationTransition.swift */, |
| 947 | - 19FA201A2AE60423001F7186 /* CNLiveDownSlideModelLayout.swift */, | ||
| 948 | 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */, | 948 | 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */, |
| 949 | 19BB202A2AF382150094D962 /* CNLiveAdaptTool.swift */, | 949 | 19BB202A2AF382150094D962 /* CNLiveAdaptTool.swift */, |
| 950 | 191733302B170537007BCC04 /* CNLiveCommonManager.swift */, | 950 | 191733302B170537007BCC04 /* CNLiveCommonManager.swift */, |
| @@ -2066,7 +2066,7 @@ | @@ -2066,7 +2066,7 @@ | ||
| 2066 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; | 2066 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2067 | CODE_SIGN_IDENTITY = "Apple Development"; | 2067 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2068 | CODE_SIGN_STYLE = Automatic; | 2068 | CODE_SIGN_STYLE = Automatic; |
| 2069 | - CURRENT_PROJECT_VERSION = 1.0.4.24.01.22.11; | 2069 | + CURRENT_PROJECT_VERSION = 1.0.4.24.01.22.17; |
| 2070 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2070 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2071 | ENABLE_BITCODE = NO; | 2071 | ENABLE_BITCODE = NO; |
| 2072 | ENABLE_MODULE_VERIFIER = NO; | 2072 | ENABLE_MODULE_VERIFIER = NO; |
| @@ -2320,7 +2320,7 @@ | @@ -2320,7 +2320,7 @@ | ||
| 2320 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; | 2320 | CODE_SIGN_ENTITLEMENTS = metaCode/metaCode.entitlements; |
| 2321 | CODE_SIGN_IDENTITY = "Apple Development"; | 2321 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 2322 | CODE_SIGN_STYLE = Automatic; | 2322 | CODE_SIGN_STYLE = Automatic; |
| 2323 | - CURRENT_PROJECT_VERSION = 1.0.4.24.01.22.11; | 2323 | + CURRENT_PROJECT_VERSION = 1.0.4.24.01.22.17; |
| 2324 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 2324 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 2325 | ENABLE_BITCODE = NO; | 2325 | ENABLE_BITCODE = NO; |
| 2326 | ENABLE_MODULE_VERIFIER = NO; | 2326 | ENABLE_MODULE_VERIFIER = NO; |
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideViewController.swift
| @@ -104,8 +104,6 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa | @@ -104,8 +104,6 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa | ||
| 104 | if slideModel.type == SlideModelTypeRecommend4{ | 104 | if slideModel.type == SlideModelTypeRecommend4{ |
| 105 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideRecommendCellIdentifier) as? CNLiveDownSlideRecommendCell | 105 | guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDownSlideRecommendCellIdentifier) as? CNLiveDownSlideRecommendCell |
| 106 | else { | 106 | else { |
| 107 | -// let cell = CNLiveDownSlideRecommendCell() | ||
| 108 | -// cell.slideModel = slideModel | ||
| 109 | return CNLiveDownSlideRecommendCell() | 107 | return CNLiveDownSlideRecommendCell() |
| 110 | } | 108 | } |
| 111 | cell.slideModel = slideModel | 109 | cell.slideModel = slideModel |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
| @@ -131,13 +131,13 @@ class CNDownSlideSingleCourseCell: UITableViewCell { | @@ -131,13 +131,13 @@ class CNDownSlideSingleCourseCell: UITableViewCell { | ||
| 131 | bgBackView.addSubview(imageView) | 131 | bgBackView.addSubview(imageView) |
| 132 | 132 | ||
| 133 | let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) | 133 | let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) |
| 134 | - titleLbl.text = contentMdl.title ?? "婴儿课程" | 134 | + titleLbl.text = contentMdl.title ?? "" |
| 135 | titleLbl.font = Font_15 | 135 | titleLbl.font = Font_15 |
| 136 | titleLbl.textColor = HexColor("#333333") | 136 | titleLbl.textColor = HexColor("#333333") |
| 137 | bgBackView.addSubview(titleLbl) | 137 | bgBackView.addSubview(titleLbl) |
| 138 | 138 | ||
| 139 | let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) | 139 | let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) |
| 140 | - subTitleLbl.text = contentMdl.subTitle ?? "适应3-6岁" | 140 | + subTitleLbl.text = contentMdl.subTitle ?? "" |
| 141 | subTitleLbl.font = Font_12 | 141 | subTitleLbl.font = Font_12 |
| 142 | subTitleLbl.textColor = HexColor("#999999") | 142 | subTitleLbl.textColor = HexColor("#999999") |
| 143 | bgBackView.addSubview(subTitleLbl) | 143 | bgBackView.addSubview(subTitleLbl) |
| @@ -181,13 +181,13 @@ class CNDownSlideSingleCourseCell: UITableViewCell { | @@ -181,13 +181,13 @@ class CNDownSlideSingleCourseCell: UITableViewCell { | ||
| 181 | bgImageView.kf.setImage(with: URL(string: model.contents[0].poster ?? "")) | 181 | bgImageView.kf.setImage(with: URL(string: model.contents[0].poster ?? "")) |
| 182 | 182 | ||
| 183 | let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | 183 | let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) |
| 184 | - titleLbl.text = model.contents[0].title ?? "婴儿课程" | 184 | + titleLbl.text = model.contents[0].title ?? "" |
| 185 | titleLbl.font = BoldFont_21 | 185 | titleLbl.font = BoldFont_21 |
| 186 | titleLbl.textColor = HexColor("#FFFFFF") | 186 | titleLbl.textColor = HexColor("#FFFFFF") |
| 187 | bgImageView.addSubview(titleLbl) | 187 | bgImageView.addSubview(titleLbl) |
| 188 | 188 | ||
| 189 | let subTitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y:titleLbl.bottom , width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) | 189 | let subTitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y:titleLbl.bottom , width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30)) |
| 190 | - subTitleLbl.text = model.contents[0].subTitle ?? "适应3-6岁" | 190 | + subTitleLbl.text = model.contents[0].subTitle ?? "" |
| 191 | subTitleLbl.font = Font_12 | 191 | subTitleLbl.font = Font_12 |
| 192 | subTitleLbl.textColor = HexColor("#FFFFFF") | 192 | subTitleLbl.textColor = HexColor("#FFFFFF") |
| 193 | bgImageView.addSubview(subTitleLbl) | 193 | bgImageView.addSubview(subTitleLbl) |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNLiveDownSlideTodayRecommendCell.swift
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | 9 | ||
| 10 | ///今日推荐高度 | 10 | ///今日推荐高度 |
| 11 | -let DownSlideTodayRecommendH: CGFloat = 105 | 11 | +let DownSlideTodayRecommendH: CGFloat = DownSlideTodayRecommendW*105/345 |
| 12 | ///今日推荐宽度 | 12 | ///今日推荐宽度 |
| 13 | let DownSlideTodayRecommendW: CGFloat = KSreenWidth-DownSlideRecommendLeftGap*2 | 13 | let DownSlideTodayRecommendW: CGFloat = KSreenWidth-DownSlideRecommendLeftGap*2 |
| 14 | 14 |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNUpSlideDetailScrollView.swift
| @@ -76,13 +76,13 @@ class CNUpSlideDetailScrollView: UIScrollView { | @@ -76,13 +76,13 @@ class CNUpSlideDetailScrollView: UIScrollView { | ||
| 76 | bgBackView.addSubview(imageView) | 76 | bgBackView.addSubview(imageView) |
| 77 | 77 | ||
| 78 | let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) | 78 | let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) |
| 79 | - titleLbl.text = contentMdl.title ?? "婴儿课程" | 79 | + titleLbl.text = contentMdl.title ?? "" |
| 80 | titleLbl.font = Font_15 | 80 | titleLbl.font = Font_15 |
| 81 | titleLbl.textColor = HexColor("#333333") | 81 | titleLbl.textColor = HexColor("#333333") |
| 82 | bgBackView.addSubview(titleLbl) | 82 | bgBackView.addSubview(titleLbl) |
| 83 | 83 | ||
| 84 | let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) | 84 | let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) |
| 85 | - subTitleLbl.text = contentMdl.subTitle ?? "适应3-6岁" | 85 | + subTitleLbl.text = contentMdl.subTitle ?? "" |
| 86 | subTitleLbl.font = Font_12 | 86 | subTitleLbl.font = Font_12 |
| 87 | subTitleLbl.textColor = HexColor("#999999") | 87 | subTitleLbl.textColor = HexColor("#999999") |
| 88 | bgBackView.addSubview(subTitleLbl) | 88 | bgBackView.addSubview(subTitleLbl) |
| @@ -102,13 +102,13 @@ class CNUpSlideDetailScrollView: UIScrollView { | @@ -102,13 +102,13 @@ class CNUpSlideDetailScrollView: UIScrollView { | ||
| 102 | //单图课程 | 102 | //单图课程 |
| 103 | 103 | ||
| 104 | let topTitleLbl = UILabel(frame: CGRect(x: 0, y: KStatusBarHeight+DownSlideRecommendLeftGap, width:bgBackView.width - 50 , height: 30)) | 104 | let topTitleLbl = UILabel(frame: CGRect(x: 0, y: KStatusBarHeight+DownSlideRecommendLeftGap, width:bgBackView.width - 50 , height: 30)) |
| 105 | - topTitleLbl.text = model.contents[0].title ?? "婴儿课程" | 105 | + topTitleLbl.text = model.contents[0].title ?? "" |
| 106 | topTitleLbl.font = BoldFont_21 | 106 | topTitleLbl.font = BoldFont_21 |
| 107 | topTitleLbl.textColor = HexColor("#FFFFFF") | 107 | topTitleLbl.textColor = HexColor("#FFFFFF") |
| 108 | imageView.addSubview(topTitleLbl) | 108 | imageView.addSubview(topTitleLbl) |
| 109 | 109 | ||
| 110 | let topSubTitleLbl = UILabel(frame: CGRect(x: topTitleLbl.left, y:topTitleLbl.bottom , width: topTitleLbl.width, height: 30)) | 110 | let topSubTitleLbl = UILabel(frame: CGRect(x: topTitleLbl.left, y:topTitleLbl.bottom , width: topTitleLbl.width, height: 30)) |
| 111 | - topSubTitleLbl.text = model.contents[0].subTitle ?? "适应3-6岁" | 111 | + topSubTitleLbl.text = model.contents[0].subTitle ?? "" |
| 112 | topSubTitleLbl.font = Font_12 | 112 | topSubTitleLbl.font = Font_12 |
| 113 | topSubTitleLbl.textColor = HexColor("#FFFFFF") | 113 | topSubTitleLbl.textColor = HexColor("#FFFFFF") |
| 114 | imageView.addSubview(topSubTitleLbl) | 114 | imageView.addSubview(topSubTitleLbl) |
| @@ -131,13 +131,13 @@ class CNUpSlideDetailScrollView: UIScrollView { | @@ -131,13 +131,13 @@ class CNUpSlideDetailScrollView: UIScrollView { | ||
| 131 | bgBackView.addSubview(imgView) | 131 | bgBackView.addSubview(imgView) |
| 132 | 132 | ||
| 133 | let titleLbl = UILabel(frame: CGRect(x: imgView.right+DownSlideRecommendLeftGap, y: imgView.top, width: DownSlideSingleCourseW-90-imgView.right, height: 21)) | 133 | let titleLbl = UILabel(frame: CGRect(x: imgView.right+DownSlideRecommendLeftGap, y: imgView.top, width: DownSlideSingleCourseW-90-imgView.right, height: 21)) |
| 134 | - titleLbl.text = contentMdl.title ?? "婴儿课程" | 134 | + titleLbl.text = contentMdl.title ?? "" |
| 135 | titleLbl.font = Font_15 | 135 | titleLbl.font = Font_15 |
| 136 | titleLbl.textColor = HexColor("#333333") | 136 | titleLbl.textColor = HexColor("#333333") |
| 137 | bgBackView.addSubview(titleLbl) | 137 | bgBackView.addSubview(titleLbl) |
| 138 | 138 | ||
| 139 | let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) | 139 | let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) |
| 140 | - subTitleLbl.text = contentMdl.subTitle ?? "适应3-6岁" | 140 | + subTitleLbl.text = contentMdl.subTitle ?? "" |
| 141 | subTitleLbl.font = Font_12 | 141 | subTitleLbl.font = Font_12 |
| 142 | subTitleLbl.textColor = HexColor("#999999") | 142 | subTitleLbl.textColor = HexColor("#999999") |
| 143 | bgBackView.addSubview(subTitleLbl) | 143 | bgBackView.addSubview(subTitleLbl) |
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
| @@ -7,6 +7,8 @@ | @@ -7,6 +7,8 @@ | ||
| 7 | 7 | ||
| 8 | import Foundation | 8 | import Foundation |
| 9 | import UIKit | 9 | import UIKit |
| 10 | +import Kingfisher | ||
| 11 | + | ||
| 10 | ///旋转动画时间 | 12 | ///旋转动画时间 |
| 11 | let KTransformAnimationTime:CGFloat = 0.75; | 13 | let KTransformAnimationTime:CGFloat = 0.75; |
| 12 | 14 | ||
| @@ -51,20 +53,43 @@ class CNFrontMainView : UIView{ | @@ -51,20 +53,43 @@ class CNFrontMainView : UIView{ | ||
| 51 | make.bottom.equalToSuperview() | 53 | make.bottom.equalToSuperview() |
| 52 | } | 54 | } |
| 53 | 55 | ||
| 54 | - frontDescContentView.addSubview(self.addStandBtn) | ||
| 55 | - addStandBtn.snp.makeConstraints { make in | ||
| 56 | - make.centerX.equalToSuperview() | ||
| 57 | - make.bottom.equalToSuperview().offset(-30) | ||
| 58 | - make.width.equalTo(150) | ||
| 59 | - make.height.equalTo(39) | 56 | + frontDescContentView.addSubview(self.upMoreGIF) |
| 57 | + upMoreGIF.snp.makeConstraints { make in | ||
| 58 | + make.top.equalToSuperview().offset(5) | ||
| 59 | + make.right.equalToSuperview().offset(-self.width/2+24) | ||
| 60 | + make.width.equalTo(48) | ||
| 61 | + make.height.equalTo(30) | ||
| 60 | } | 62 | } |
| 61 | - | 63 | + |
| 64 | + frontDescContentView.addSubview(self.personalStandBtn) | ||
| 65 | + personalStandBtn.snp.makeConstraints { make in | ||
| 66 | + make.right.equalToSuperview().offset(-self.width/2) | ||
| 67 | + make.bottom.equalToSuperview().offset(-45) | ||
| 68 | + make.width.equalTo(120) | ||
| 69 | + make.height.equalTo(36) | ||
| 70 | + } | ||
| 71 | + frontDescContentView.addSubview(self.enterpriseStandBtn) | ||
| 72 | + enterpriseStandBtn.snp.makeConstraints { make in | ||
| 73 | + make.left.equalTo(self.personalStandBtn.snp.right) | ||
| 74 | + make.bottom.equalToSuperview().offset(-45) | ||
| 75 | + make.width.equalTo(120) | ||
| 76 | + make.height.equalTo(36) | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + frontDescContentView.addSubview(self.downMoreGIF) | ||
| 80 | + downMoreGIF.snp.makeConstraints { make in | ||
| 81 | + make.top.equalTo(self.personalStandBtn.snp.bottom).offset((45-30)/2.0) | ||
| 82 | + make.centerX.equalTo(self.personalStandBtn.snp.right) | ||
| 83 | + make.width.equalTo(96) | ||
| 84 | + make.height.equalTo(30) | ||
| 85 | + } | ||
| 86 | + | ||
| 62 | frontDescContentView.addSubview(self.textView) | 87 | frontDescContentView.addSubview(self.textView) |
| 63 | textView.snp.makeConstraints { make in | 88 | textView.snp.makeConstraints { make in |
| 64 | make.top.equalToSuperview().offset(40) | 89 | make.top.equalToSuperview().offset(40) |
| 65 | make.left.equalToSuperview().offset(30) | 90 | make.left.equalToSuperview().offset(30) |
| 66 | make.right.equalToSuperview().offset(-30) | 91 | make.right.equalToSuperview().offset(-30) |
| 67 | - make.bottom.equalTo(addStandBtn.snp.top).offset(-30) | 92 | + make.bottom.equalTo(enterpriseStandBtn.snp.top).offset(-30) |
| 68 | } | 93 | } |
| 69 | 94 | ||
| 70 | return frontDescContentView | 95 | return frontDescContentView |
| @@ -86,17 +111,41 @@ class CNFrontMainView : UIView{ | @@ -86,17 +111,41 @@ class CNFrontMainView : UIView{ | ||
| 86 | textView.backgroundColor = .clear | 111 | textView.backgroundColor = .clear |
| 87 | return textView | 112 | return textView |
| 88 | }() | 113 | }() |
| 89 | - ///未认证-点击添加身份 按钮 | ||
| 90 | - lazy var addStandBtn: UIButton = { | ||
| 91 | - let addStandBtn = UIButton(type: .custom) | ||
| 92 | - addStandBtn.clipsToBounds = true | ||
| 93 | - addStandBtn.layer.cornerRadius = 19.5 | ||
| 94 | - addStandBtn.backgroundColor = HexColor("#004FE0") | ||
| 95 | - addStandBtn.setTitle("点击添加身份", for: .normal) | ||
| 96 | - addStandBtn.setTitleColor(.white, for: .normal) | ||
| 97 | - addStandBtn.titleLabel?.font = UIFont.init(name: "PingFangSC-Medium", size: 14) | ||
| 98 | - addStandBtn.addTarget(self, action: #selector(addStandBtnAction), for: .touchUpInside) | ||
| 99 | - return addStandBtn | 114 | + |
| 115 | + ///未认证-个人认证 按钮 | ||
| 116 | + lazy var personalStandBtn: UIButton = { | ||
| 117 | + let personalStandBtn = UIButton(type: .custom) | ||
| 118 | + personalStandBtn.layer.cornerRadius = 19.5 | ||
| 119 | + personalStandBtn.layer.maskedCorners = [.layerMinXMinYCorner, .layerMinXMaxYCorner] | ||
| 120 | + personalStandBtn.setTitle("个人认证", for: .normal) | ||
| 121 | + personalStandBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | ||
| 122 | + personalStandBtn.titleLabel?.font = UIFont.init(name: "PingFangSC-Medium", size: 14) | ||
| 123 | + personalStandBtn.addTarget(self, action: #selector(personalStandBtnAction), for: .touchUpInside) | ||
| 124 | + return personalStandBtn | ||
| 125 | + }() | ||
| 126 | + ///未认证-企业认证 按钮 | ||
| 127 | + lazy var enterpriseStandBtn: UIButton = { | ||
| 128 | + let enterpriseStandBtn = UIButton(type: .custom) | ||
| 129 | + enterpriseStandBtn.layer.cornerRadius = 19.5 | ||
| 130 | + enterpriseStandBtn.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMaxXMaxYCorner] | ||
| 131 | + enterpriseStandBtn.setTitle("企业认证", for: .normal) | ||
| 132 | + enterpriseStandBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) | ||
| 133 | + enterpriseStandBtn.titleLabel?.font = UIFont.init(name: "PingFangSC-Medium", size: 14) | ||
| 134 | + enterpriseStandBtn.addTarget(self, action: #selector(enterpriseStandBtnAction), for: .touchUpInside) | ||
| 135 | + return enterpriseStandBtn | ||
| 136 | + }() | ||
| 137 | + | ||
| 138 | + //上滑更多Gif | ||
| 139 | + lazy var upMoreGIF: UIImageView = { | ||
| 140 | + let upMoreGIF = UIImageView() | ||
| 141 | + upMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 50, height: 30) | ||
| 142 | + return upMoreGIF | ||
| 143 | + }() | ||
| 144 | + //下滑更多Gif | ||
| 145 | + lazy var downMoreGIF: UIImageView = { | ||
| 146 | + let downMoreGIF = UIImageView() | ||
| 147 | + downMoreGIF.frame = CGRect(x: self.width - 50, y: 0, width: 96, height: 30) | ||
| 148 | + return downMoreGIF | ||
| 100 | }() | 149 | }() |
| 101 | 150 | ||
| 102 | ///已认证-前置视图卡片容器 | 151 | ///已认证-前置视图卡片容器 |
| @@ -171,7 +220,23 @@ class CNFrontMainView : UIView{ | @@ -171,7 +220,23 @@ class CNFrontMainView : UIView{ | ||
| 171 | //显示textview 添加身份 | 220 | //显示textview 添加身份 |
| 172 | frontDescContentView.isHidden = false | 221 | frontDescContentView.isHidden = false |
| 173 | textView.text = newValue!.description | 222 | textView.text = newValue!.description |
| 174 | - addStandBtn.backgroundColor = HexColor(newValue!.backgroundColor) | 223 | + |
| 224 | + //上滑 下滑引导gif | ||
| 225 | + upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg)) | ||
| 226 | + downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg)) | ||
| 227 | + if idModel?.id == 9{ | ||
| 228 | + //电商 ,隐藏上滑下滑gif | ||
| 229 | + upMoreGIF.isHidden = true | ||
| 230 | + downMoreGIF.isHidden = true | ||
| 231 | + }else{ | ||
| 232 | + //非电商 ,显示上滑下滑gif | ||
| 233 | + upMoreGIF.isHidden = false | ||
| 234 | + downMoreGIF.isHidden = false | ||
| 235 | + } | ||
| 236 | + | ||
| 237 | + //个人认证,企业认证 | ||
| 238 | + personalStandBtn.backgroundColor = HexColor(newValue!.atPersonageColour) | ||
| 239 | + enterpriseStandBtn.backgroundColor = HexColor(newValue!.backgroundColor) | ||
| 175 | textViewBgImgView.kf.setImage(with: URL(string: _idModel!.descBackgroundImg), placeholder: UIImage(named: "homepage_desc_bgImg")) | 240 | textViewBgImgView.kf.setImage(with: URL(string: _idModel!.descBackgroundImg), placeholder: UIImage(named: "homepage_desc_bgImg")) |
| 176 | } | 241 | } |
| 177 | } | 242 | } |
| @@ -183,7 +248,6 @@ class CNFrontMainView : UIView{ | @@ -183,7 +248,6 @@ class CNFrontMainView : UIView{ | ||
| 183 | self.frontTotolContentView.addSubview(self.frontDescContentView) | 248 | self.frontTotolContentView.addSubview(self.frontDescContentView) |
| 184 | self.frontTotolContentView.addSubview(self.frontCardContentView) | 249 | self.frontTotolContentView.addSubview(self.frontCardContentView) |
| 185 | 250 | ||
| 186 | - | ||
| 187 | self.makeConstraints() | 251 | self.makeConstraints() |
| 188 | } | 252 | } |
| 189 | func makeConstraints(){ | 253 | func makeConstraints(){ |
| @@ -194,27 +258,29 @@ class CNFrontMainView : UIView{ | @@ -194,27 +258,29 @@ class CNFrontMainView : UIView{ | ||
| 194 | @objc func tapAction(){ | 258 | @objc func tapAction(){ |
| 195 | tapTransformAciton!() | 259 | tapTransformAciton!() |
| 196 | } | 260 | } |
| 197 | - | ||
| 198 | - @objc func addStandBtnAction() { | ||
| 199 | - //跳转到添加身份页面 | ||
| 200 | -// currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: pushAnimated) | ||
| 201 | -// DispatchQueue.main.asyncAfter(deadline: .now()+0.25){ | 261 | + |
| 262 | + @objc func personalStandBtnAction() { | ||
| 263 | + //跳转到 个人认证页面 | ||
| 264 | + self.pushStandVC() | ||
| 265 | + } | ||
| 266 | + @objc func enterpriseStandBtnAction() { | ||
| 267 | + //跳转到 企业认证页面 | ||
| 268 | + self.pushStandVC() | ||
| 269 | + } | ||
| 270 | + | ||
| 271 | + func pushStandVC(){ | ||
| 272 | + //跳转到 个人认证&企业认证 页面 | ||
| 202 | if _idModel!.id == 9 { | 273 | if _idModel!.id == 9 { |
| 203 | showLoading(message: "") | 274 | showLoading(message: "") |
| 204 | CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in | 275 | CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in |
| 205 | 276 | ||
| 206 | if respStatue == .success { | 277 | if respStatue == .success { |
| 207 | navigationViewController().pushViewController(CNLiveMineShopViewController.init(showType: .one, listModel: (self?.idModel)!, tempArray: []), animated: pushAnimated) | 278 | navigationViewController().pushViewController(CNLiveMineShopViewController.init(showType: .one, listModel: (self?.idModel)!, tempArray: []), animated: pushAnimated) |
| 208 | -// currentViewController()?.navigationController?.pushViewController(CNLiveMineShopViewController.init(showType: .one, listModel: (self?.idModel)!, tempArray: []), animated: pushAnimated) | ||
| 209 | } | 279 | } |
| 210 | } | 280 | } |
| 211 | }else{ | 281 | }else{ |
| 212 | navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!), animated: pushAnimated) | 282 | navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!), animated: pushAnimated) |
| 213 | -// currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!), animated: pushAnimated) | ||
| 214 | } | 283 | } |
| 215 | - | ||
| 216 | -// } | ||
| 217 | - | ||
| 218 | } | 284 | } |
| 219 | } | 285 | } |
| 220 | 286 |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
| @@ -135,13 +135,16 @@ class StandListBaseModel: BaseModel { | @@ -135,13 +135,16 @@ class StandListBaseModel: BaseModel { | ||
| 135 | 135 | ||
| 136 | final class StandListModel: BaseModel {//, TableCodable { | 136 | final class StandListModel: BaseModel {//, TableCodable { |
| 137 | 137 | ||
| 138 | - var id: Int = 0//ID号- | 138 | + var id: Int = 0//ID号- 9:电商,其他非电商 |
| 139 | var name: String?//名称- | 139 | var name: String?//名称- |
| 140 | var icon: String?//小圆图标- | 140 | var icon: String?//小圆图标- |
| 141 | var createTime: Int = 0//注册时间- | 141 | var createTime: Int = 0//注册时间- |
| 142 | var enable: Bool = false//没用- | 142 | var enable: Bool = false//没用- |
| 143 | var backgroundImg: String = ""//首页背景图- | 143 | var backgroundImg: String = ""//首页背景图- |
| 144 | - var backgroundColor: String = ""//添加身份按钮背景色- | 144 | + var upGuideImg: String = ""//顶部引导图GiF url- |
| 145 | + var downGuideImg: String = ""//底部引导图GiF url- | ||
| 146 | + var backgroundColor: String = kCNDownSlideBackgroundColorHex//企业认证按钮背景色- | ||
| 147 | + var atPersonageColour: String = kCNDownSlideBackgroundColorHex//个人认证按钮背景色- | ||
| 145 | var backgroundColour: String = ""//- | 148 | var backgroundColour: String = ""//- |
| 146 | var description: String = ""//首页身份说明描述- | 149 | var description: String = ""//首页身份说明描述- |
| 147 | var descBackgroundImg: String = ""//首页文字背景图 | 150 | var descBackgroundImg: String = ""//首页文字背景图 |
metaCode/Classes/Main/Util/CNLiveDownSlideModelLayout.swift renamed to metaCode/Classes/Main/Model/CNLiveDownSlideModelLayout.swift
| @@ -47,8 +47,13 @@ class CNLiveDownSlideModelLayout:NSObject{ | @@ -47,8 +47,13 @@ class CNLiveDownSlideModelLayout:NSObject{ | ||
| 47 | } | 47 | } |
| 48 | _slideModel?.cellH = CGFloat(totalNum)*(DownSlideTodayRecommendH + DownSlideRecommendLeftGap) | 48 | _slideModel?.cellH = CGFloat(totalNum)*(DownSlideTodayRecommendH + DownSlideRecommendLeftGap) |
| 49 | }else if(_slideModel?.type == SlideModelTypeAllCourse12){//全部课程 | 49 | }else if(_slideModel?.type == SlideModelTypeAllCourse12){//全部课程 |
| 50 | + //总显示块数/循环数 | ||
| 51 | + var totalNum = (contentsNum >= row) ? row : contentsNum | ||
| 52 | + if row == 0{//row为0 , contents全部显示 | ||
| 53 | + totalNum = contentsNum | ||
| 54 | + } | ||
| 50 | 55 | ||
| 51 | - _slideModel?.cellH = DownSlideAllCourseTitleH + DownSlideAllCourseRowH * CGFloat(_slideModel!.rowNum)+DownSlideRecommendLeftGap | 56 | + _slideModel?.cellH = DownSlideAllCourseTitleH + DownSlideAllCourseRowH * CGFloat(totalNum)+DownSlideRecommendLeftGap |
| 52 | 57 | ||
| 53 | }else if(_slideModel?.type == SlideModelTypeOneCourse75){//单节课程 | 58 | }else if(_slideModel?.type == SlideModelTypeOneCourse75){//单节课程 |
| 54 | 59 |