Commit d751a989921e42bae3a2807c4a9bad143e818e0f
1 parent
d797f529
跳转数字简历页面
Showing
6 changed files
with
157 additions
and
1 deletions
metaCode.xcodeproj/project.pbxproj
| ... | ... | @@ -168,6 +168,7 @@ |
| 168 | 168 | 19CC4D542ADD163D00308E2A /* CNUpSlideCardPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */; }; |
| 169 | 169 | 19CC4D562ADD19C200308E2A /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19CC4D552ADD19C200308E2A /* String+Extension.swift */; }; |
| 170 | 170 | 19D2CE632AE8B65D00691757 /* CNLiveDownSlideTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */; }; |
| 171 | + 19DFE6402C3FC5F400E428AE /* CNLiveDigitalResumeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19DFE63F2C3FC5F400E428AE /* CNLiveDigitalResumeController.swift */; }; | |
| 171 | 172 | 19E302672BC8FEBC00F6B8BD /* CNLliveShopDetailCloseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19E302662BC8FEBC00F6B8BD /* CNLliveShopDetailCloseCell.swift */; }; |
| 172 | 173 | 19E9D1602B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19E9D15F2B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift */; }; |
| 173 | 174 | 19E9D1622B3BBB2E00D0FB30 /* CNLiveFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19E9D1612B3BBB2E00D0FB30 /* CNLiveFileManager.swift */; }; |
| ... | ... | @@ -477,6 +478,7 @@ |
| 477 | 478 | 19CC4D532ADD163D00308E2A /* CNUpSlideCardPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNUpSlideCardPresentationController.swift; sourceTree = "<group>"; }; |
| 478 | 479 | 19CC4D552ADD19C200308E2A /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; }; |
| 479 | 480 | 19D2CE622AE8B65D00691757 /* CNLiveDownSlideTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDownSlideTool.swift; sourceTree = "<group>"; }; |
| 481 | + 19DFE63F2C3FC5F400E428AE /* CNLiveDigitalResumeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalResumeController.swift; sourceTree = "<group>"; }; | |
| 480 | 482 | 19E302662BC8FEBC00F6B8BD /* CNLliveShopDetailCloseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLliveShopDetailCloseCell.swift; sourceTree = "<group>"; }; |
| 481 | 483 | 19E9D15F2B3A98C200D0FB30 /* CNLiveShopAssociatedGoodsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopAssociatedGoodsTableViewCell.swift; sourceTree = "<group>"; }; |
| 482 | 484 | 19E9D1612B3BBB2E00D0FB30 /* CNLiveFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveFileManager.swift; sourceTree = "<group>"; }; |
| ... | ... | @@ -1118,6 +1120,7 @@ |
| 1118 | 1120 | 194134872C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift */, |
| 1119 | 1121 | 1941348F2C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift */, |
| 1120 | 1122 | 194134972C292199004FC047 /* CNLiveIdentityRepositoryController.swift */, |
| 1123 | + 19DFE63F2C3FC5F400E428AE /* CNLiveDigitalResumeController.swift */, | |
| 1121 | 1124 | ); |
| 1122 | 1125 | path = DigitalAuth; |
| 1123 | 1126 | sourceTree = "<group>"; |
| ... | ... | @@ -1979,6 +1982,7 @@ |
| 1979 | 1982 | 798916E92B04532D00D08302 /* CNLiveSavePointDB.swift in Sources */, |
| 1980 | 1983 | 1938BD242B468AC900390A34 /* CNLivePlayletHomePageHeaderCell.swift in Sources */, |
| 1981 | 1984 | 19B153D42BC623BE0018906C /* CNLiveShopPayWeChatAlipayCell.swift in Sources */, |
| 1985 | + 19DFE6402C3FC5F400E428AE /* CNLiveDigitalResumeController.swift in Sources */, | |
| 1982 | 1986 | 19FA20172AE22D3C001F7186 /* CNLiveDownSlideRecommendCell.swift in Sources */, |
| 1983 | 1987 | 19123FC12ABC11170075C883 /* CNWebViewController.swift in Sources */, |
| 1984 | 1988 | 1926C28F2AE0D76C00C71DC3 /* CNLiveDownSlideViewModel.swift in Sources */, | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveDigitalResumeController.swift
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveDigitalResumeController.swift | |
| 3 | +// metaCode | |
| 4 | +// | |
| 5 | +// Created by zx on 2024/7/11. | |
| 6 | +// 数字简历页面 | |
| 7 | + | |
| 8 | +import Foundation | |
| 9 | + | |
| 10 | +class CNLiveDigitalResumeController:CNLiveBaseViewController{ | |
| 11 | + override func viewDidLoad() { | |
| 12 | + super.viewDidLoad() | |
| 13 | + titleName = "数字简历" | |
| 14 | + navigationBarHidden = false | |
| 15 | + | |
| 16 | + } | |
| 17 | + | |
| 18 | + deinit { | |
| 19 | + | |
| 20 | + } | |
| 21 | +} | ... | ... |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
| ... | ... | @@ -104,12 +104,114 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, |
| 104 | 104 | headerView.updateHeaderView() |
| 105 | 105 | tableView.reloadData() |
| 106 | 106 | loadDataWithPoint() |
| 107 | + | |
| 108 | + delegate.window?.subviews.forEach({ view in | |
| 109 | + if view.tag >= 20000{ | |
| 110 | + view.isHidden = false | |
| 111 | + } | |
| 112 | + }) | |
| 107 | 113 | } |
| 108 | 114 | |
| 109 | 115 | override var preferredStatusBarStyle: UIStatusBarStyle { |
| 110 | 116 | return .lightContent |
| 111 | 117 | } |
| 112 | 118 | |
| 119 | + let delegate = UIApplication.shared.delegate as! AppDelegate | |
| 120 | + /// 未认证-inputType17时弹窗背景图 | |
| 121 | + lazy var alertBgImgView:UIImageView = { | |
| 122 | + let alertBgImgView:UIImageView = UIImageView() | |
| 123 | + alertBgImgView.tag = 20001 | |
| 124 | + alertBgImgView.isUserInteractionEnabled = true | |
| 125 | + alertBgImgView.contentMode = .scaleAspectFit | |
| 126 | + alertBgImgView.backgroundColor = .white | |
| 127 | + return alertBgImgView | |
| 128 | + }() | |
| 129 | + lazy var agreeBtn: UIButton = { | |
| 130 | + let nextBtn = UIButton(type: .custom) | |
| 131 | + nextBtn.width = 285 | |
| 132 | + nextBtn.height = 44 | |
| 133 | + nextBtn.setTitle("同意协议 领取一下", for: .normal) | |
| 134 | + nextBtn.setTitleColor(.white, for: .normal) | |
| 135 | + nextBtn.layer.cornerRadius = 22 | |
| 136 | + nextBtn.clipsToBounds = true | |
| 137 | + nextBtn.addTarget(self, action: #selector(agreeBtnAction), for: .touchUpInside) | |
| 138 | + nextBtn.backgroundColor = HexColor("#8E8BFB") | |
| 139 | + // fillCode | |
| 140 | + let bgLayer1 = CAGradientLayer() | |
| 141 | + bgLayer1.colors = [UIColor(red: 0.1, green: 0.38, blue: 1, alpha: 1).cgColor, UIColor(red: 0.56, green: 0.55, blue: 0.98, alpha: 1).cgColor] | |
| 142 | + bgLayer1.locations = [0, 1] | |
| 143 | + bgLayer1.frame = nextBtn.bounds | |
| 144 | + bgLayer1.startPoint = CGPoint(x: 0.5, y: 1) | |
| 145 | + bgLayer1.endPoint = CGPoint(x: 0, y: 0) | |
| 146 | + nextBtn.layer.addSublayer(bgLayer1) | |
| 147 | + return nextBtn | |
| 148 | + }() | |
| 149 | + lazy var xieyiLabel: UILabel = { | |
| 150 | + let label = UILabel() | |
| 151 | + let attrString = NSMutableAttributedString(string: "查看《元码数字简历服务协议》") | |
| 152 | + label.frame = CGRect(x: 0, y: 0, width: KSreenWidth, height: 20) | |
| 153 | + let attr1: [NSAttributedString.Key : Any] = [.font: Font_14,.foregroundColor: HexColor("#20252A")!] | |
| 154 | + attrString.addAttributes(attr1, range: NSRange(location: 0, length: 2)) | |
| 155 | + let attr: [NSAttributedString.Key : Any] = [.font: Font_14,.foregroundColor: HexColor("#1961FE")!] | |
| 156 | + attrString.addAttributes(attr, range: NSRange(location: 2, length: attrString.length-2)) | |
| 157 | + label.attributedText = attrString | |
| 158 | + label.textAlignment = .center | |
| 159 | + label.isUserInteractionEnabled = true | |
| 160 | + label.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(xieyiAction))) | |
| 161 | + return label | |
| 162 | + }() | |
| 163 | + // MARK: - 弹出数字简历协议alert | |
| 164 | + func showXieyiAlert(){ | |
| 165 | + delegate.window?.addSubview(self.alertBgImgView) | |
| 166 | + alertBgImgView.snp.makeConstraints { make in | |
| 167 | + make.centerX.equalToSuperview() | |
| 168 | + make.centerY.equalToSuperview() | |
| 169 | + make.width.equalToSuperview() | |
| 170 | + make.height.equalToSuperview() | |
| 171 | + } | |
| 172 | + self.alertBgImgView.image = UIImage(named: "mine_jianli_xieyiBg") | |
| 173 | + alertBgImgView.addSubview(self.agreeBtn) | |
| 174 | + self.agreeBtn.snp.makeConstraints { make in | |
| 175 | + make.bottom.equalToSuperview().offset(-50) | |
| 176 | + make.width.equalTo(285) | |
| 177 | + make.centerX.equalToSuperview() | |
| 178 | + make.height.equalTo(44) | |
| 179 | + } | |
| 180 | + alertBgImgView.addSubview(self.xieyiLabel) | |
| 181 | + self.xieyiLabel.snp.makeConstraints { make in | |
| 182 | + make.bottom.equalTo(self.agreeBtn.snp.top).offset(-10) | |
| 183 | + make.left.right.equalToSuperview() | |
| 184 | + make.height.equalTo(20) | |
| 185 | + } | |
| 186 | + } | |
| 187 | + @objc func xieyiAction(){ | |
| 188 | + //查看数字简历协议 | |
| 189 | + let webVC = CNWebViewController() | |
| 190 | + webVC.url = URL(string: "https://wjj.ys1.cnliveimg.com/term/ymRlsbyhxxcjxy.html") | |
| 191 | + self.navigationController?.pushViewController(webVC, animated: true) | |
| 192 | + | |
| 193 | + delegate.window?.subviews.forEach({ view in | |
| 194 | + if view.tag >= 20000{ | |
| 195 | + view.isHidden = true | |
| 196 | + } | |
| 197 | + }) | |
| 198 | + } | |
| 199 | + @objc func agreeBtnAction(){ | |
| 200 | + //同意协议按钮 | |
| 201 | + delegate.window?.subviews.forEach({ view in | |
| 202 | + if view.tag >= 20000{ | |
| 203 | + view.removeFromSuperview() | |
| 204 | + } | |
| 205 | + }) | |
| 206 | + //本地存储已同意 | |
| 207 | + UserDefaults.standard.set(true,forKey: "is_agree_shuzijianlixieyi") | |
| 208 | + | |
| 209 | + //跳转数字简历页面 | |
| 210 | + let vc = CNLiveDigitalResumeController() | |
| 211 | + self.navigationController?.pushViewController(vc, animated: true) | |
| 212 | + } | |
| 213 | + | |
| 214 | + | |
| 113 | 215 | |
| 114 | 216 | @objc func StandAuthNotificationSuccessAction() { |
| 115 | 217 | CNLiveMineViewModel.requestsGETAuthInfoList(page: 1) { [self] result, respStatue in |
| ... | ... | @@ -175,7 +277,14 @@ extension CNLiveMineViewController { |
| 175 | 277 | } |
| 176 | 278 | if indexPath.section == 2 { |
| 177 | 279 | //我的数字简历 |
| 178 | - | |
| 280 | + let is_agree = UserDefaults.standard.bool(forKey: "is_agree_shuzijianlixieyi") | |
| 281 | + if is_agree{ | |
| 282 | + //跳转数字简历页面 | |
| 283 | + let vc = CNLiveDigitalResumeController() | |
| 284 | + self.navigationController?.pushViewController(vc, animated: true) | |
| 285 | + }else{ | |
| 286 | + self.showXieyiAlert() | |
| 287 | + } | |
| 179 | 288 | } |
| 180 | 289 | if indexPath.section == 3 { |
| 181 | 290 | //官方认证 | ... | ... |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli_xieyiBg.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "mine_jianli_xieyiBg@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "filename" : "mine_jianli_xieyiBg@3x.png", | |
| 14 | + "idiom" : "universal", | |
| 15 | + "scale" : "3x" | |
| 16 | + } | |
| 17 | + ], | |
| 18 | + "info" : { | |
| 19 | + "author" : "xcode", | |
| 20 | + "version" : 1 | |
| 21 | + } | |
| 22 | +} | ... | ... |
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli_xieyiBg.imageset/mine_jianli_xieyiBg@2x.png
0 → 100644
219 KB
metaCode/Supporting Files/Assets.xcassets/MinePage/mine_jianli_xieyiBg.imageset/mine_jianli_xieyiBg@3x.png
0 → 100644
567 KB