Commit ee1b5907ae0b3b7f5981f7b92bd024e7bf3b73b0
1 parent
6ece0a35
跳转添加身份VC
Showing
6 changed files
with
110 additions
and
49 deletions
metaCode.xcodeproj/project.pbxproj
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | /* Begin PBXBuildFile section */ |
| 10 | 10 | 0D39E93D7229931C86EB1161 /* Pods_metaCode_metaCodeUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63D879B49B1E42F1584DD75E /* Pods_metaCode_metaCodeUITests.framework */; }; |
| 11 | + 197344152AB7EBA1001CBEE2 /* TempController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 197344142AB7EBA1001CBEE2 /* TempController.swift */; }; | |
| 11 | 12 | 19F1C2332AB5728B0083D06C /* CNIDCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */; }; |
| 12 | 13 | 1DD2808DF02C120276F99F4D /* Pods_metaCode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1C55A719CFEE073C06D37CE /* Pods_metaCode.framework */; }; |
| 13 | 14 | 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7905BB482AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift */; }; |
| ... | ... | @@ -112,6 +113,7 @@ |
| 112 | 113 | /* Begin PBXFileReference section */ |
| 113 | 114 | 0EC910AB9EBD717B04432BC4 /* Pods-metaCode-metaCodeUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode-metaCodeUITests.debug.xcconfig"; path = "Target Support Files/Pods-metaCode-metaCodeUITests/Pods-metaCode-metaCodeUITests.debug.xcconfig"; sourceTree = "<group>"; }; |
| 114 | 115 | 170BC5D0622EA2969D110A3B /* Pods-metaCode.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-metaCode.release.xcconfig"; path = "Target Support Files/Pods-metaCode/Pods-metaCode.release.xcconfig"; sourceTree = "<group>"; }; |
| 116 | + 197344142AB7EBA1001CBEE2 /* TempController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempController.swift; sourceTree = "<group>"; }; | |
| 115 | 117 | 19F1C2322AB5728B0083D06C /* CNIDCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNIDCardView.swift; sourceTree = "<group>"; }; |
| 116 | 118 | 54E09C540E13D78166D71395 /* Pods_metaCodeTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_metaCodeTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 117 | 119 | 63D879B49B1E42F1584DD75E /* Pods_metaCode_metaCodeUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_metaCode_metaCodeUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; |
| ... | ... | @@ -547,6 +549,7 @@ |
| 547 | 549 | isa = PBXGroup; |
| 548 | 550 | children = ( |
| 549 | 551 | 7CD6754E2A2840B9008354C1 /* CNMetaCodeHomePageController.swift */, |
| 552 | + 197344142AB7EBA1001CBEE2 /* TempController.swift */, | |
| 550 | 553 | ); |
| 551 | 554 | name = Controller; |
| 552 | 555 | path = HomePage/Controller; |
| ... | ... | @@ -887,6 +890,7 @@ |
| 887 | 890 | 793CAF522A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift in Sources */, |
| 888 | 891 | 7CD675522A29C04B008354C1 /* CNLiveConfigstant.swift in Sources */, |
| 889 | 892 | 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */, |
| 893 | + 197344152AB7EBA1001CBEE2 /* TempController.swift in Sources */, | |
| 890 | 894 | 7C83B43E2A52B8BA004BF4A4 /* CNHomePageViewModel.swift in Sources */, |
| 891 | 895 | 7C4931382A307BDB000E44B4 /* CNHomePageGuideView.swift in Sources */, |
| 892 | 896 | 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
| ... | ... | @@ -192,7 +192,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 192 | 192 | super.viewWillAppear(animated) |
| 193 | 193 | |
| 194 | 194 | print("uid = ",UserInfoManager.shared.userInfo.uid) |
| 195 | - self.getUserIdentityApi() | |
| 195 | +// self.getUserIdentityApi() | |
| 196 | 196 | |
| 197 | 197 | } |
| 198 | 198 | override func viewDidAppear(_ animated: Bool) { | ... | ... |
metaCode/Classes/Main/HomePage/Controller/TempController.swift
0 → 100644
metaCode/Classes/Main/HomePage/View/CNIDCardView.swift
| ... | ... | @@ -53,6 +53,8 @@ class CNIDCardView: UIView{ |
| 53 | 53 | self.contentView.addSubview(self.sexValueLabel) |
| 54 | 54 | self.contentView.addSubview(self.dateValueLabel) |
| 55 | 55 | self.contentView.addSubview(self.IDValueLabel) |
| 56 | + self.contentView.addSubview(self.iDIconImgView) | |
| 57 | + | |
| 56 | 58 | } |
| 57 | 59 | |
| 58 | 60 | func loadIDDetailData(){ |
| ... | ... | @@ -63,14 +65,24 @@ class CNIDCardView: UIView{ |
| 63 | 65 | let idCardModel = cardArray[i] as! MineStandInfoModel |
| 64 | 66 | switch idCardModel.name { |
| 65 | 67 | case "姓名": |
| 66 | - self.nameValueLabel.text = idCardModel.userInfo | |
| 68 | + self.nameValueLabel.text = idCardModel.userInfo | |
| 67 | 69 | case "性别": |
| 68 | 70 | self.sexValueLabel.text = idCardModel.userInfo |
| 69 | 71 | case "认证时间": |
| 70 | 72 | self.dateValueLabel.text = idCardModel.userInfo |
| 71 | 73 | case "编号": |
| 72 | - self.IDValueLabel.text = idCardModel.userInfo | |
| 74 | + self.IDValueLabel.text = idCardModel.userInfo | |
| 75 | + case "证件照": | |
| 76 | + let str:String = idCardModel.userInfo! | |
| 77 | + if(str.isEmpty){ | |
| 78 | + self.iDIconImgView.isHidden = true | |
| 79 | + }else | |
| 80 | + { | |
| 81 | + self.iDIconImgView.isHidden = false | |
| 82 | + self.iDIconImgView.kf.setImage(with: URL(string: str)) | |
| 83 | + } | |
| 73 | 84 | |
| 85 | + self.iDCardBGView.kf.setImage(with: URL(string: self._idModel!.cardImg), placeholder: UIImage(named: "homePage_idCardBG")) | |
| 74 | 86 | default: |
| 75 | 87 | break |
| 76 | 88 | } |
| ... | ... | @@ -79,6 +91,59 @@ class CNIDCardView: UIView{ |
| 79 | 91 | } |
| 80 | 92 | } |
| 81 | 93 | |
| 94 | + // MARK: - 约束 | |
| 95 | + func makeConstraints(){ | |
| 96 | + self.iDCardBGView.snp.makeConstraints { make in | |
| 97 | + make.centerX.equalToSuperview() | |
| 98 | + make.centerY.equalToSuperview() | |
| 99 | + make.width.equalToSuperview() | |
| 100 | + make.height.equalToSuperview() | |
| 101 | + } | |
| 102 | + //标签 | |
| 103 | + self.nameLabel.snp.makeConstraints { make in | |
| 104 | + make.left.equalToSuperview().offset(20) | |
| 105 | + make.top.equalTo(60) | |
| 106 | + make.width.equalTo(54) | |
| 107 | + } | |
| 108 | + self.sexLabel.snp.makeConstraints { make in | |
| 109 | + make.left.equalToSuperview().offset(20) | |
| 110 | + make.top.equalTo(nameLabel.snp.bottom).offset(10) | |
| 111 | + } | |
| 112 | + self.dateLabel.snp.makeConstraints { make in | |
| 113 | + make.left.equalToSuperview().offset(20) | |
| 114 | + make.top.equalTo(sexLabel.snp.bottom).offset(10) | |
| 115 | + } | |
| 116 | + self.IDLabel.snp.makeConstraints { make in | |
| 117 | + make.left.equalToSuperview().offset(20) | |
| 118 | + make.top.equalTo(dateLabel.snp.bottom).offset(10) | |
| 119 | + } | |
| 120 | + //标签值 | |
| 121 | + self.nameValueLabel.snp.makeConstraints { make in | |
| 122 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 123 | + make.top.equalTo(nameLabel.snp.top) | |
| 124 | + make.right.equalTo(iDIconImgView.snp.left).offset(-5) | |
| 125 | + } | |
| 126 | + self.sexValueLabel.snp.makeConstraints { make in | |
| 127 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 128 | + make.top.equalTo(sexLabel.snp.top) | |
| 129 | + } | |
| 130 | + self.dateValueLabel.snp.makeConstraints { make in | |
| 131 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 132 | + make.top.equalTo(dateLabel.snp.top) | |
| 133 | + } | |
| 134 | + self.IDValueLabel.snp.makeConstraints { make in | |
| 135 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 136 | + make.top.equalTo(IDLabel.snp.top) | |
| 137 | + make.right.lessThanOrEqualTo(iDIconImgView.snp.left).offset(-5) | |
| 138 | + } | |
| 139 | + self.iDIconImgView.snp.makeConstraints { make in | |
| 140 | + make.right.equalToSuperview().offset(-15) | |
| 141 | + make.top.equalTo(nameLabel.snp.top) | |
| 142 | + make.width.equalTo(60) | |
| 143 | + make.height.equalTo(85) | |
| 144 | + } | |
| 145 | + } | |
| 146 | + | |
| 82 | 147 | // MARK: - 懒加载 |
| 83 | 148 | ///视图总容器 |
| 84 | 149 | lazy var contentView : UIView = { |
| ... | ... | @@ -184,48 +249,12 @@ class CNIDCardView: UIView{ |
| 184 | 249 | return IDValueLabel |
| 185 | 250 | }() |
| 186 | 251 | |
| 187 | - // MARK: - 约束 | |
| 188 | - func makeConstraints(){ | |
| 189 | - self.iDCardBGView.snp.makeConstraints { make in | |
| 190 | - make.centerX.equalToSuperview() | |
| 191 | - make.centerY.equalToSuperview() | |
| 192 | - make.width.equalToSuperview() | |
| 193 | - make.height.equalToSuperview() | |
| 194 | - } | |
| 195 | - //标签 | |
| 196 | - self.nameLabel.snp.makeConstraints { make in | |
| 197 | - make.left.equalToSuperview().offset(20) | |
| 198 | - make.top.equalTo(60) | |
| 199 | - } | |
| 200 | - self.sexLabel.snp.makeConstraints { make in | |
| 201 | - make.left.equalToSuperview().offset(20) | |
| 202 | - make.top.equalTo(nameLabel.snp.bottom).offset(10) | |
| 203 | - } | |
| 204 | - self.dateLabel.snp.makeConstraints { make in | |
| 205 | - make.left.equalToSuperview().offset(20) | |
| 206 | - make.top.equalTo(sexLabel.snp.bottom).offset(10) | |
| 207 | - } | |
| 208 | - self.IDLabel.snp.makeConstraints { make in | |
| 209 | - make.left.equalToSuperview().offset(20) | |
| 210 | - make.top.equalTo(dateLabel.snp.bottom).offset(10) | |
| 211 | - } | |
| 212 | - //标签值 | |
| 213 | - self.nameValueLabel.snp.makeConstraints { make in | |
| 214 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 215 | - make.top.equalTo(nameLabel.snp.top) | |
| 216 | - } | |
| 217 | - self.sexValueLabel.snp.makeConstraints { make in | |
| 218 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 219 | - make.top.equalTo(sexLabel.snp.top) | |
| 220 | - } | |
| 221 | - self.dateValueLabel.snp.makeConstraints { make in | |
| 222 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 223 | - make.top.equalTo(dateLabel.snp.top) | |
| 224 | - } | |
| 225 | - self.IDValueLabel.snp.makeConstraints { make in | |
| 226 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 227 | - make.top.equalTo(IDLabel.snp.top) | |
| 228 | - } | |
| 229 | - } | |
| 252 | + ///证件照 | |
| 253 | + lazy var iDIconImgView:UIImageView = { | |
| 254 | + | |
| 255 | + let iDIconImgView:UIImageView = UIImageView(frame: CGRect(x: 20, y: 25, width: 60, height: 85)) | |
| 256 | + iDIconImgView.backgroundColor = UIColor.red | |
| 257 | + return iDIconImgView | |
| 258 | + }() | |
| 230 | 259 | |
| 231 | 260 | } | ... | ... |
metaCode/Classes/Main/HomePage/View/CNMainView.swift
| ... | ... | @@ -152,7 +152,18 @@ class CNFrontMainView : UIView{ |
| 152 | 152 | } |
| 153 | 153 | @objc func addStandBtnAction() { |
| 154 | 154 | //跳转到添加身份页面 |
| 155 | - currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: true) | |
| 155 | +// currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: false) | |
| 156 | +// DispatchQueue.main.asyncAfter(deadline: .now()+0.5){ | |
| 157 | + | |
| 158 | + let vc:CNLiveBaseViewController = currentViewController() as! CNLiveBaseViewController | |
| 159 | + if(vc.isKind(of: CNMetaCodeHomePageController.self)){ | |
| 160 | + currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: true) | |
| 161 | +// currentViewController()?.navigationController?.pushViewController(CNTempController(), animated: true) | |
| 162 | + }else{ | |
| 163 | + print("notclass") | |
| 164 | + } | |
| 165 | + | |
| 166 | +// } | |
| 156 | 167 | } |
| 157 | 168 | } |
| 158 | 169 | ... | ... |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
| ... | ... | @@ -253,7 +253,7 @@ class CNLiveMineViewModel: NSObject { |
| 253 | 253 | /// - resultBlock: 返回 |
| 254 | 254 | static func requestAuthStandList(page: NSInteger, resultBlock: @escaping resultNewsBlock) { |
| 255 | 255 | let param = NSMutableDictionary() |
| 256 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | |
| 256 | + param.setValue("10458139", forKey: "sid")//10458139 UserInfoManager.shared.userInfo.uid | |
| 257 | 257 | param.setValue("10", forKey: "pageSize") |
| 258 | 258 | param.setValue("\(page)", forKey: "page") |
| 259 | 259 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| ... | ... | @@ -431,7 +431,7 @@ class CNLiveMineViewModel: NSObject { |
| 431 | 431 | /// - resultBlock: 返回 |
| 432 | 432 | static func requestsStandInfo(identityId: String, type: CNLiveMineGetWriteType, resultBlock: @escaping resultNewsBlock) { |
| 433 | 433 | let param = NSMutableDictionary() |
| 434 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | |
| 434 | + param.setValue("10458139", forKey: "sid")//UserInfoManager.shared.userInfo.uid //10458139 | |
| 435 | 435 | param.setValue(identityId, forKey: "identityId") |
| 436 | 436 | showLoading(message: "") |
| 437 | 437 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | ... | ... |