Commit 1d7d00f31b98b86935097d91f568bf72b1fa7102
1 parent
ac21171f
个人认证-数字资产
Showing
33 changed files
with
1321 additions
and
88 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -99,6 +99,10 @@ | @@ -99,6 +99,10 @@ | ||
| 99 | 194134802C18160C004FC047 /* CNLiveAuthPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941347F2C18160C004FC047 /* CNLiveAuthPreviewView.swift */; }; | 99 | 194134802C18160C004FC047 /* CNLiveAuthPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941347F2C18160C004FC047 /* CNLiveAuthPreviewView.swift */; }; |
| 100 | 194134842C193B17004FC047 /* CNLiveDigitalAuthViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134832C193B17004FC047 /* CNLiveDigitalAuthViewModel.swift */; }; | 100 | 194134842C193B17004FC047 /* CNLiveDigitalAuthViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134832C193B17004FC047 /* CNLiveDigitalAuthViewModel.swift */; }; |
| 101 | 194134862C196F59004FC047 /* CNLiveAuthTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134852C196F59004FC047 /* CNLiveAuthTool.swift */; }; | 101 | 194134862C196F59004FC047 /* CNLiveAuthTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134852C196F59004FC047 /* CNLiveAuthTool.swift */; }; |
| 102 | + 194134882C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134872C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift */; }; | ||
| 103 | + 1941348A2C200E4E004FC047 /* CNLiveDigitalFirstCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134892C200E4E004FC047 /* CNLiveDigitalFirstCell.swift */; }; | ||
| 104 | + 1941348C2C20261C004FC047 /* CNLiveDigitalSecCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941348B2C20261C004FC047 /* CNLiveDigitalSecCell.swift */; }; | ||
| 105 | + 1941348E2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */; }; | ||
| 102 | 194455A12B6B3310006C5A2A /* CNWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194455A02B6B3310006C5A2A /* CNWebView.swift */; }; | 106 | 194455A12B6B3310006C5A2A /* CNWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194455A02B6B3310006C5A2A /* CNWebView.swift */; }; |
| 103 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; | 107 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; |
| 104 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; | 108 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; |
| @@ -397,6 +401,10 @@ | @@ -397,6 +401,10 @@ | ||
| 397 | 1941347F2C18160C004FC047 /* CNLiveAuthPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveAuthPreviewView.swift; sourceTree = "<group>"; }; | 401 | 1941347F2C18160C004FC047 /* CNLiveAuthPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CNLiveAuthPreviewView.swift; sourceTree = "<group>"; }; |
| 398 | 194134832C193B17004FC047 /* CNLiveDigitalAuthViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalAuthViewModel.swift; sourceTree = "<group>"; }; | 402 | 194134832C193B17004FC047 /* CNLiveDigitalAuthViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalAuthViewModel.swift; sourceTree = "<group>"; }; |
| 399 | 194134852C196F59004FC047 /* CNLiveAuthTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAuthTool.swift; sourceTree = "<group>"; }; | 403 | 194134852C196F59004FC047 /* CNLiveAuthTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveAuthTool.swift; sourceTree = "<group>"; }; |
| 404 | + 194134872C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalAssetsController.swift; sourceTree = "<group>"; }; | ||
| 405 | + 194134892C200E4E004FC047 /* CNLiveDigitalFirstCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalFirstCell.swift; sourceTree = "<group>"; }; | ||
| 406 | + 1941348B2C20261C004FC047 /* CNLiveDigitalSecCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalSecCell.swift; sourceTree = "<group>"; }; | ||
| 407 | + 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalSecCollectionCell.swift; sourceTree = "<group>"; }; | ||
| 400 | 194455A02B6B3310006C5A2A /* CNWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNWebView.swift; sourceTree = "<group>"; }; | 408 | 194455A02B6B3310006C5A2A /* CNWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNWebView.swift; sourceTree = "<group>"; }; |
| 401 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; | 409 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; |
| 402 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; | 410 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; |
| @@ -1092,6 +1100,7 @@ | @@ -1092,6 +1100,7 @@ | ||
| 1092 | 19C0F7732BDF71CA0097CC8F /* CNLiveDigitalAuthController.swift */, | 1100 | 19C0F7732BDF71CA0097CC8F /* CNLiveDigitalAuthController.swift */, |
| 1093 | 19C735CD2C12D19D00CACF4E /* CNLiveRealNameAuthController.swift */, | 1101 | 19C735CD2C12D19D00CACF4E /* CNLiveRealNameAuthController.swift */, |
| 1094 | 194134772C17F83B004FC047 /* CNLiveFaceAuthController.swift */, | 1102 | 194134772C17F83B004FC047 /* CNLiveFaceAuthController.swift */, |
| 1103 | + 194134872C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift */, | ||
| 1095 | ); | 1104 | ); |
| 1096 | path = DigitalAuth; | 1105 | path = DigitalAuth; |
| 1097 | sourceTree = "<group>"; | 1106 | sourceTree = "<group>"; |
| @@ -1111,6 +1120,9 @@ | @@ -1111,6 +1120,9 @@ | ||
| 1111 | 19C735CB2C11A1F400CACF4E /* CNLiveDigitalThreeCollectCell.swift */, | 1120 | 19C735CB2C11A1F400CACF4E /* CNLiveDigitalThreeCollectCell.swift */, |
| 1112 | 19C735CF2C12F5F600CACF4E /* CNLiveRealNameCell.swift */, | 1121 | 19C735CF2C12F5F600CACF4E /* CNLiveRealNameCell.swift */, |
| 1113 | 1941347F2C18160C004FC047 /* CNLiveAuthPreviewView.swift */, | 1122 | 1941347F2C18160C004FC047 /* CNLiveAuthPreviewView.swift */, |
| 1123 | + 194134892C200E4E004FC047 /* CNLiveDigitalFirstCell.swift */, | ||
| 1124 | + 1941348B2C20261C004FC047 /* CNLiveDigitalSecCell.swift */, | ||
| 1125 | + 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */, | ||
| 1114 | ); | 1126 | ); |
| 1115 | path = DigitalAuthViews; | 1127 | path = DigitalAuthViews; |
| 1116 | sourceTree = "<group>"; | 1128 | sourceTree = "<group>"; |
| @@ -1225,13 +1237,13 @@ | @@ -1225,13 +1237,13 @@ | ||
| 1225 | 7989B5C42A4BDC6000A19B10 /* CNLiveMineEarnViewController.swift */, | 1237 | 7989B5C42A4BDC6000A19B10 /* CNLiveMineEarnViewController.swift */, |
| 1226 | 7989B5C62A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift */, | 1238 | 7989B5C62A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift */, |
| 1227 | 793CAF512A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift */, | 1239 | 793CAF512A58FCA200882EF4 /* CNLiveMineExchangeViewController.swift */, |
| 1228 | - 79656E372AAEBA8E00119A61 /* CNLiveMineInputViewController.swift */, | ||
| 1229 | - 7905BB482AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift */, | ||
| 1230 | 79803E262AD68D3100F05F68 /* CNLiveMineShopViewController.swift */, | 1240 | 79803E262AD68D3100F05F68 /* CNLiveMineShopViewController.swift */, |
| 1231 | 79E672022AFDFA9C00F2F768 /* CNLiveMineSignOutViewController.swift */, | 1241 | 79E672022AFDFA9C00F2F768 /* CNLiveMineSignOutViewController.swift */, |
| 1232 | 79DC67632B5FB60900261A94 /* CNLiveMineAuthFormViewController.swift */, | 1242 | 79DC67632B5FB60900261A94 /* CNLiveMineAuthFormViewController.swift */, |
| 1233 | 19C0F76A2BDB432A0097CC8F /* CNLiveMineBindingManagerController.swift */, | 1243 | 19C0F76A2BDB432A0097CC8F /* CNLiveMineBindingManagerController.swift */, |
| 1234 | 19C0F7702BDE1A3B0097CC8F /* CNLiveMineChangePhoneController.swift */, | 1244 | 19C0F7702BDE1A3B0097CC8F /* CNLiveMineChangePhoneController.swift */, |
| 1245 | + 7905BB482AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift */, | ||
| 1246 | + 79656E372AAEBA8E00119A61 /* CNLiveMineInputViewController.swift */, | ||
| 1235 | ); | 1247 | ); |
| 1236 | path = Controller; | 1248 | path = Controller; |
| 1237 | sourceTree = "<group>"; | 1249 | sourceTree = "<group>"; |
| @@ -1925,6 +1937,7 @@ | @@ -1925,6 +1937,7 @@ | ||
| 1925 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */, | 1937 | 1926C2912AE0FD4500C71DC3 /* CNLiveDownSlideModel.swift in Sources */, |
| 1926 | 1938BD452B4E49CA00390A34 /* CNLiveDuanjuTitleCell.swift in Sources */, | 1938 | 1938BD452B4E49CA00390A34 /* CNLiveDuanjuTitleCell.swift in Sources */, |
| 1927 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, | 1939 | 7C7C62F62A4D72E9007A912E /* CNLiveIdentityDB.swift in Sources */, |
| 1940 | + 1941348C2C20261C004FC047 /* CNLiveDigitalSecCell.swift in Sources */, | ||
| 1928 | 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */, | 1941 | 19CC4D4F2ADD0FC200308E2A /* CNUpSlideDetailScrollView.swift in Sources */, |
| 1929 | 191733642B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift in Sources */, | 1942 | 191733642B392011007BCC04 /* CNLiveShopGoodsSearchViewController.swift in Sources */, |
| 1930 | 79EABB892AB4497700F3A4E2 /* CNLiveSaveStandDB.swift in Sources */, | 1943 | 79EABB892AB4497700F3A4E2 /* CNLiveSaveStandDB.swift in Sources */, |
| @@ -2096,6 +2109,7 @@ | @@ -2096,6 +2109,7 @@ | ||
| 2096 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, | 2109 | 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, |
| 2097 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, | 2110 | 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, |
| 2098 | 791C1C8A2AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift in Sources */, | 2111 | 791C1C8A2AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift in Sources */, |
| 2112 | + 194134882C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift in Sources */, | ||
| 2099 | 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */, | 2113 | 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */, |
| 2100 | 19565ECF2AF8D8F6007D6727 /* CNLiveShopGoodsListCell.swift in Sources */, | 2114 | 19565ECF2AF8D8F6007D6727 /* CNLiveShopGoodsListCell.swift in Sources */, |
| 2101 | 1965FA3E2AFB176E00F0F435 /* CNLiveShopAddGoodsSingleView.swift in Sources */, | 2115 | 1965FA3E2AFB176E00F0F435 /* CNLiveShopAddGoodsSingleView.swift in Sources */, |
| @@ -2103,8 +2117,10 @@ | @@ -2103,8 +2117,10 @@ | ||
| 2103 | 7939B0772B47F88A005AE981 /* CNLiveShortVideoControlView.swift in Sources */, | 2117 | 7939B0772B47F88A005AE981 /* CNLiveShortVideoControlView.swift in Sources */, |
| 2104 | 191733602B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift in Sources */, | 2118 | 191733602B352488007BCC04 /* CNLiveCouponGoodsListTableViewCell.swift in Sources */, |
| 2105 | 79BB1C142B05C51900C5720C /* CNLiveShopCouponViewController.swift in Sources */, | 2119 | 79BB1C142B05C51900C5720C /* CNLiveShopCouponViewController.swift in Sources */, |
| 2120 | + 1941348A2C200E4E004FC047 /* CNLiveDigitalFirstCell.swift in Sources */, | ||
| 2106 | 798916ED2B048E8200D08302 /* CNLiveShopTransViewController.swift in Sources */, | 2121 | 798916ED2B048E8200D08302 /* CNLiveShopTransViewController.swift in Sources */, |
| 2107 | 191733172B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift in Sources */, | 2122 | 191733172B10A017007BCC04 /* CNLivePlayerBottomNaviView.swift in Sources */, |
| 2123 | + 1941348E2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift in Sources */, | ||
| 2108 | 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */, | 2124 | 19BB1FEC2AF0AB8E0094D962 /* CNLiveDownShopDetailController.swift in Sources */, |
| 2109 | 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */, | 2125 | 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */, |
| 2110 | 794FF1072B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift in Sources */, | 2126 | 794FF1072B01FC9800385E85 /* CNLiveShopOrderSearchListViewController.swift in Sources */, |
metaCode/Classes/Config/CNLiveConfigManager.swift
| @@ -54,6 +54,8 @@ extension Notification.Name { | @@ -54,6 +54,8 @@ extension Notification.Name { | ||
| 54 | public static let StandAuthNotificationSuccess = Notification.Name("StandAuthNotificationSuccess") | 54 | public static let StandAuthNotificationSuccess = Notification.Name("StandAuthNotificationSuccess") |
| 55 | //认证身份失败通知 | 55 | //认证身份失败通知 |
| 56 | public static let StandAuthNotificationUnSuccess = Notification.Name("StandAuthNotificationUnSuccess") | 56 | public static let StandAuthNotificationUnSuccess = Notification.Name("StandAuthNotificationUnSuccess") |
| 57 | + //认证身份审核中通知 | ||
| 58 | + public static let StandAuthNotificationReviewing = Notification.Name("StandAuthNotificationReviewing") | ||
| 57 | //认证身份排序通知 | 59 | //认证身份排序通知 |
| 58 | public static let StandAuthSortNotificationResult = Notification.Name("StandAuthSortNotificationResult") | 60 | public static let StandAuthSortNotificationResult = Notification.Name("StandAuthSortNotificationResult") |
| 59 | } | 61 | } |
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
| @@ -677,28 +677,23 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -677,28 +677,23 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 677 | hiddenLoading() | 677 | hiddenLoading() |
| 678 | if respStatue == .success{ | 678 | if respStatue == .success{ |
| 679 | self.NetApiStatus = .success | 679 | self.NetApiStatus = .success |
| 680 | - let listArray:NSArray = (result as! StandListBaseModel).list as NSArray | 680 | + let listArray:[StandListModel] = (result as! StandListBaseModel).list as [StandListModel] |
| 681 | self.dataArray = NSMutableArray.init() | 681 | self.dataArray = NSMutableArray.init() |
| 682 | - self.dataArray.addObjects(from: listArray as! [Any]) | 682 | + self.dataArray.addObjects(from: listArray) |
| 683 | 683 | ||
| 684 | if (listArray.count > 0){ | 684 | if (listArray.count > 0){ |
| 685 | - | 685 | + |
| 686 | +// for listMdl in listArray { | ||
| 687 | +// if let listModel = listMdl as? StandListModel{ | ||
| 688 | +// print(listModel.id) | ||
| 689 | +// } | ||
| 690 | +// } | ||
| 686 | listArray.forEach { list in | 691 | listArray.forEach { list in |
| 687 | if let listModel = list as? StandListModel{ | 692 | if let listModel = list as? StandListModel{ |
| 688 | 693 | ||
| 689 | - listModel.authenticationsModel.forEach({ childModel in | ||
| 690 | - childModel.child.forEach { childChildModel in | ||
| 691 | - childChildModel.identities.forEach { identities in | ||
| 692 | - if identities.userAuth == 1{ | ||
| 693 | - listModel.userAuth = true//是否已经身份认证 | ||
| 694 | - } | ||
| 695 | - } | ||
| 696 | - } | ||
| 697 | - }) | ||
| 698 | - | ||
| 699 | group.enter() | 694 | group.enter() |
| 700 | - | ||
| 701 | self.getAuthenticationsApi(channelId: String(format: "%d", listModel.id), listModel: listModel) | 695 | self.getAuthenticationsApi(channelId: String(format: "%d", listModel.id), listModel: listModel) |
| 696 | + | ||
| 702 | } | 697 | } |
| 703 | } | 698 | } |
| 704 | 699 | ||
| @@ -735,7 +730,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -735,7 +730,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 735 | let index = self.dataArray.index(of: listModel) | 730 | let index = self.dataArray.index(of: listModel) |
| 736 | let listMdl = listModel | 731 | let listMdl = listModel |
| 737 | listMdl.authenticationsModel = res | 732 | listMdl.authenticationsModel = res |
| 733 | + listMdl.authenticationsModel.forEach({ childModel in | ||
| 734 | + childModel.child.forEach { childChildModel in | ||
| 735 | + childChildModel.identities.forEach { identities in | ||
| 736 | + if identities.userAuth == 1{ | ||
| 737 | + listMdl.userAuth = true//是否已经身份认证 | ||
| 738 | + } | ||
| 739 | + } | ||
| 740 | + } | ||
| 741 | + }) | ||
| 742 | + | ||
| 738 | self.dataArray.replaceObject(at: index, with: listMdl) | 743 | self.dataArray.replaceObject(at: index, with: listMdl) |
| 744 | + | ||
| 739 | self.group.leave() | 745 | self.group.leave() |
| 740 | } | 746 | } |
| 741 | } | 747 | } |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveDigitalAssetsController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveDigitalAssetsController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/6/17. | ||
| 6 | +// 数字资产页面 | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | + | ||
| 10 | +class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSource, UITableViewDelegate{ | ||
| 11 | + | ||
| 12 | + lazy var nextBtn: UIButton = { | ||
| 13 | + let nextBtn = UIButton(type: .custom) | ||
| 14 | + nextBtn.setTitle("培训就业指南", for: .normal) | ||
| 15 | + nextBtn.setTitleColor(.white, for: .normal) | ||
| 16 | + nextBtn.titleLabel?.font = Font_17 | ||
| 17 | + nextBtn.backgroundColor = HexColor("#1961FE") | ||
| 18 | + nextBtn.layer.cornerRadius = 22 | ||
| 19 | + nextBtn.clipsToBounds = true | ||
| 20 | + nextBtn.addTarget(self, action: #selector(nextBtnAction), for: .touchUpInside) | ||
| 21 | + return nextBtn | ||
| 22 | + }() | ||
| 23 | + | ||
| 24 | + let kCNLiveDigitalFirstCellIdentifier = "kCNLiveDigitalFirstCellIdentifier" | ||
| 25 | + let kCNLiveDigitalSecCellIdentifier = "kCNLiveDigitalSecCellIdentifier" | ||
| 26 | + | ||
| 27 | + lazy var tableView : UITableView = { | ||
| 28 | + let tableView = UITableView(frame: .zero, style: .plain) | ||
| 29 | + tableView.dataSource = self | ||
| 30 | + tableView.delegate = self | ||
| 31 | + tableView.separatorStyle = .none | ||
| 32 | + tableView.tableFooterView = UIView.init() | ||
| 33 | + tableView.register(CNLiveDigitalFirstCell.self, forCellReuseIdentifier: kCNLiveDigitalFirstCellIdentifier) | ||
| 34 | + tableView.register(CNLiveDigitalSecCell.self, forCellReuseIdentifier: kCNLiveDigitalSecCellIdentifier) | ||
| 35 | + | ||
| 36 | + return tableView | ||
| 37 | + }() | ||
| 38 | + lazy var dataArray: NSMutableArray = { | ||
| 39 | + var dataArray = NSMutableArray() | ||
| 40 | + return dataArray | ||
| 41 | + }() | ||
| 42 | + | ||
| 43 | + override func viewDidLoad() { | ||
| 44 | + super.viewDidLoad() | ||
| 45 | + navigationBarHidden = false | ||
| 46 | + titleName = "元码数字认证" | ||
| 47 | + | ||
| 48 | + if UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers.count ?? 0 > 0{ | ||
| 49 | + //实名认证过 | ||
| 50 | + | ||
| 51 | + }else{ | ||
| 52 | + //未实名认证 | ||
| 53 | + | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + self.initUI() | ||
| 57 | + self.loadData() | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + func initUI(){ | ||
| 61 | + //背景图 | ||
| 62 | + let layerView = UIView() | ||
| 63 | + layerView.frame = CGRect(x: 0, y: KNavigationHeight, width:KSreenWidth, height: adapt_length(length: 234)) | ||
| 64 | + // fillCode | ||
| 65 | + let bgLayer1 = CAGradientLayer() | ||
| 66 | + bgLayer1.colors = [UIColor(red: 0.16, green: 0.45, blue: 0.99, alpha: 1).cgColor, UIColor(red: 0.96, green: 0.96, blue: 0.98, alpha: 1).cgColor] | ||
| 67 | + bgLayer1.locations = [0, 1] | ||
| 68 | + bgLayer1.frame = layerView.bounds | ||
| 69 | + bgLayer1.startPoint = CGPoint(x: 0.5, y: 0) | ||
| 70 | + bgLayer1.endPoint = CGPoint(x: 1, y: 1) | ||
| 71 | + layerView.layer.addSublayer(bgLayer1) | ||
| 72 | + view.addSubview(layerView) | ||
| 73 | + | ||
| 74 | + view.addSubview(self.tableView) | ||
| 75 | + self.tableView.snp.makeConstraints { make in | ||
| 76 | + make.left.right.equalToSuperview() | ||
| 77 | + make.top.equalToSuperview().offset(KNavigationHeight) | ||
| 78 | + make.bottom.equalToSuperview().offset(adapt_length(length: -59)) | ||
| 79 | + } | ||
| 80 | + self.tableView.backgroundColor = .clear | ||
| 81 | + | ||
| 82 | + self.view.addSubview(self.nextBtn) | ||
| 83 | + self.nextBtn.snp.makeConstraints { make in | ||
| 84 | + make.top.equalTo(self.tableView.snp.bottom).offset(adapt_length(length: 10)) | ||
| 85 | + make.height.equalTo(adapt_length(length: 44)) | ||
| 86 | + make.left.equalTo(15) | ||
| 87 | + make.right.equalToSuperview().offset(-15) | ||
| 88 | + } | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + func loadData(){ | ||
| 92 | + CNLiveMineViewModel.requestsGETAuthInfoList(page: 1) { [weak self] result, respStatue in | ||
| 93 | + if respStatue == .success { | ||
| 94 | + let listBaseModel = result as! MineAuthListBaseModel | ||
| 95 | + self!.dataArray.addObjects(from: listBaseModel.list) | ||
| 96 | + self!.dataArray.add(MineAuthListModel()) | ||
| 97 | + self!.tableView.reloadData() | ||
| 98 | + }else { | ||
| 99 | + | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 105 | + return 2 | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 109 | + if indexPath.row == 0{ | ||
| 110 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDigitalFirstCellIdentifier) as? CNLiveDigitalFirstCell | ||
| 111 | + else { | ||
| 112 | + let cell = CNLiveDigitalFirstCell() | ||
| 113 | + return cell | ||
| 114 | + } | ||
| 115 | + return cell | ||
| 116 | + }else{ | ||
| 117 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDigitalSecCellIdentifier) as? CNLiveDigitalSecCell | ||
| 118 | + else { | ||
| 119 | + let cell = CNLiveDigitalSecCell() | ||
| 120 | + cell.digitalListModels = self.dataArray as? [MineAuthListModel] | ||
| 121 | + return cell | ||
| 122 | + } | ||
| 123 | + cell.digitalListModels = self.dataArray as? [MineAuthListModel] | ||
| 124 | + return cell | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 130 | + if indexPath.row == 0{ | ||
| 131 | + return adapt_length(length: 121+20) | ||
| 132 | + }else{ | ||
| 133 | + return adapt_length(length: 838+15) | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + } | ||
| 137 | + deinit { | ||
| 138 | + | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + @objc func nextBtnAction(){ | ||
| 142 | + showMessage(message: "此功能对您暂未开放") | ||
| 143 | + } | ||
| 144 | +} |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveDigitalAuthController.swift
| @@ -71,6 +71,7 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | @@ -71,6 +71,7 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | ||
| 71 | return tableView | 71 | return tableView |
| 72 | }() | 72 | }() |
| 73 | var currentSeleIndex = 0 | 73 | var currentSeleIndex = 0 |
| 74 | + var currentSeleCollectionIndex = 0 | ||
| 74 | 75 | ||
| 75 | lazy var chengnuoLabel: UILabel = { | 76 | lazy var chengnuoLabel: UILabel = { |
| 76 | let changeLabel = UILabel() | 77 | let changeLabel = UILabel() |
| @@ -100,7 +101,7 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | @@ -100,7 +101,7 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | ||
| 100 | }() | 101 | }() |
| 101 | 102 | ||
| 102 | 103 | ||
| 103 | - var channelId:String = "" | 104 | + var channelId:String = "0" |
| 104 | var vsid:String = "" | 105 | var vsid:String = "" |
| 105 | var sid:String = "" | 106 | var sid:String = "" |
| 106 | init(channelId: String, vsid: String, sid: String) { | 107 | init(channelId: String, vsid: String, sid: String) { |
| @@ -222,9 +223,11 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | @@ -222,9 +223,11 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | ||
| 222 | } | 223 | } |
| 223 | let model = self.dataArray[indexPath.row] as! MineAuthenticationsChildModel | 224 | let model = self.dataArray[indexPath.row] as! MineAuthenticationsChildModel |
| 224 | cell.childModel = model | 225 | cell.childModel = model |
| 225 | - cell.selectBlock = {[weak self] currCell in | 226 | + cell.selectBlock = {[weak self] currCell,identitiesId in |
| 226 | if let idxPath = self?.tableView.indexPath(for: currCell){ | 227 | if let idxPath = self?.tableView.indexPath(for: currCell){ |
| 227 | self!.currentSeleIndex = idxPath.row | 228 | self!.currentSeleIndex = idxPath.row |
| 229 | + self!.currentSeleCollectionIndex = currCell.currentSeleIndex | ||
| 230 | + self!.channelId = identitiesId | ||
| 228 | self!.tableView.reloadData() | 231 | self!.tableView.reloadData() |
| 229 | } | 232 | } |
| 230 | } | 233 | } |
| @@ -232,7 +235,7 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | @@ -232,7 +235,7 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | ||
| 232 | } | 235 | } |
| 233 | 236 | ||
| 234 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | 237 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| 235 | - | 238 | + |
| 236 | } | 239 | } |
| 237 | 240 | ||
| 238 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | 241 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| @@ -241,13 +244,35 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | @@ -241,13 +244,35 @@ class CNLiveDigitalAuthController:CNLiveBaseViewController,UITableViewDataSource | ||
| 241 | 244 | ||
| 242 | 245 | ||
| 243 | @objc func nextBtnAction(){ | 246 | @objc func nextBtnAction(){ |
| 244 | - | 247 | + if let model = self.dataArray[self.currentSeleIndex] as? MineAuthenticationsChildModel{ |
| 248 | + let collModel = model.identities[self.currentSeleCollectionIndex] | ||
| 249 | + if collModel.userAuth == 0{//正在审核 | ||
| 250 | + showMessage(message: "您已认证过该身份,不能重复认证") | ||
| 251 | + return | ||
| 252 | + }else if collModel.userAuth == 1{//审核成功 | ||
| 253 | + //进入身份认证页面 | ||
| 254 | + | ||
| 255 | + }else if collModel.userAuth == -1{//审核失败 | ||
| 256 | + | ||
| 257 | + } | ||
| 258 | + } | ||
| 259 | + | ||
| 245 | if UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers.count ?? 0 > 0{ | 260 | if UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers.count ?? 0 > 0{ |
| 246 | //实名认证过->身份管理页面 | 261 | //实名认证过->身份管理页面 |
| 247 | 262 | ||
| 263 | + //身份管理页面->身份认证页面 | ||
| 264 | + let listModel = StandListModel() | ||
| 265 | + listModel.id = Int(self.channelId) ?? 0 | ||
| 266 | + listModel.name = "" | ||
| 267 | + self.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: listModel, authType: .person), animated: pushAnimated) | ||
| 268 | + | ||
| 248 | }else{ | 269 | }else{ |
| 249 | //未实名认证->实名认证 | 270 | //未实名认证->实名认证 |
| 250 | - self.navigationController?.pushViewController(CNLiveRealNameAuthController(), animated: true) | 271 | + let vc = CNLiveRealNameAuthController() |
| 272 | + vc.channelId = self.channelId | ||
| 273 | + vc.vsid = self.vsid | ||
| 274 | + vc.sid = self.sid | ||
| 275 | + self.navigationController?.pushViewController(vc, animated: true) | ||
| 251 | } | 276 | } |
| 252 | } | 277 | } |
| 253 | 278 |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveFaceAuthController.swift
| @@ -14,6 +14,10 @@ import Vision | @@ -14,6 +14,10 @@ import Vision | ||
| 14 | 14 | ||
| 15 | class CNLiveFaceAuthController:CNLiveBaseViewController{ | 15 | class CNLiveFaceAuthController:CNLiveBaseViewController{ |
| 16 | 16 | ||
| 17 | + var channelId:String = "0" | ||
| 18 | + var vsid:String = "" | ||
| 19 | + var sid:String = "" | ||
| 20 | + | ||
| 17 | lazy var previewView :CNLiveAuthPreviewView = { | 21 | lazy var previewView :CNLiveAuthPreviewView = { |
| 18 | let previewView = CNLiveAuthPreviewView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight)) | 22 | let previewView = CNLiveAuthPreviewView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight)) |
| 19 | return previewView | 23 | return previewView |
| @@ -630,6 +634,7 @@ extension CNLiveFaceAuthController { | @@ -630,6 +634,7 @@ extension CNLiveFaceAuthController { | ||
| 630 | } | 634 | } |
| 631 | } | 635 | } |
| 632 | 636 | ||
| 637 | + // MARK: - 上传人脸图片 | ||
| 633 | func cropImageAndUpload(uiImage:UIImage ,facebounds:CGRect ,cgImage:CGImage){ | 638 | func cropImageAndUpload(uiImage:UIImage ,facebounds:CGRect ,cgImage:CGImage){ |
| 634 | self.isUploadingImage = true | 639 | self.isUploadingImage = true |
| 635 | 640 | ||
| @@ -649,8 +654,11 @@ extension CNLiveFaceAuthController { | @@ -649,8 +654,11 @@ extension CNLiveFaceAuthController { | ||
| 649 | 654 | ||
| 650 | CNLiveDigitalAuthViewModel.postFaceImageDataWithParams(name: self.realName, idNo: self.realNumber, fileData: data) { result, status in | 655 | CNLiveDigitalAuthViewModel.postFaceImageDataWithParams(name: self.realName, idNo: self.realNumber, fileData: data) { result, status in |
| 651 | if status == .success{ | 656 | if status == .success{ |
| 652 | - // | ||
| 653 | - | 657 | + //跳转到身份认证页面 |
| 658 | + let listModel = StandListModel() | ||
| 659 | + listModel.id = Int(self.channelId) ?? 0 | ||
| 660 | + listModel.name = self.realName | ||
| 661 | + self.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: listModel, authType: .person), animated: pushAnimated) | ||
| 654 | }else{ | 662 | }else{ |
| 655 | //提示认证失败 | 663 | //提示认证失败 |
| 656 | CNLiveAuthTool.shared.showAuthFailAlert() | 664 | CNLiveAuthTool.shared.showAuthFailAlert() |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveRealNameAuthController.swift
| @@ -10,6 +10,11 @@ import SnapKit | @@ -10,6 +10,11 @@ import SnapKit | ||
| 10 | import QMUIKit | 10 | import QMUIKit |
| 11 | 11 | ||
| 12 | class CNLiveRealNameAuthController:CNLiveBaseViewController,UITableViewDataSource,UITableViewDelegate{ | 12 | class CNLiveRealNameAuthController:CNLiveBaseViewController,UITableViewDataSource,UITableViewDelegate{ |
| 13 | + | ||
| 14 | + var channelId:String = "0" | ||
| 15 | + var vsid:String = "" | ||
| 16 | + var sid:String = "" | ||
| 17 | + | ||
| 13 | lazy var bgImgView :UIImageView = { | 18 | lazy var bgImgView :UIImageView = { |
| 14 | let iconImgView = UIImageView() | 19 | let iconImgView = UIImageView() |
| 15 | iconImgView.image = UIImage(named: "auth_blueBg") | 20 | iconImgView.image = UIImage(named: "auth_blueBg") |
| @@ -212,6 +217,9 @@ class CNLiveRealNameAuthController:CNLiveBaseViewController,UITableViewDataSourc | @@ -212,6 +217,9 @@ class CNLiveRealNameAuthController:CNLiveBaseViewController,UITableViewDataSourc | ||
| 212 | let vc = CNLiveFaceAuthController() | 217 | let vc = CNLiveFaceAuthController() |
| 213 | vc.realName = self.nameTextStr | 218 | vc.realName = self.nameTextStr |
| 214 | vc.realNumber = self.numberTextStr | 219 | vc.realNumber = self.numberTextStr |
| 220 | + vc.channelId = self.channelId | ||
| 221 | + vc.vsid = self.vsid | ||
| 222 | + vc.sid = self.sid | ||
| 215 | self.navigationController?.pushViewController(vc, animated: true) | 223 | self.navigationController?.pushViewController(vc, animated: true) |
| 216 | } | 224 | } |
| 217 | 225 |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/CNLiveDigitalAuthCell.swift
| @@ -9,7 +9,7 @@ import Foundation | @@ -9,7 +9,7 @@ import Foundation | ||
| 9 | import Kingfisher | 9 | import Kingfisher |
| 10 | import SnapKit | 10 | import SnapKit |
| 11 | 11 | ||
| 12 | -typealias SelectBlock = (_ currentCell: CNLiveDigitalAuthCell) -> Void | 12 | +typealias SelectBlock = (_ currentCell: CNLiveDigitalAuthCell ,_ identitiesId:String) -> Void |
| 13 | class CNLiveDigitalAuthCell: UITableViewCell, UICollectionViewDelegate, UICollectionViewDataSource { | 13 | class CNLiveDigitalAuthCell: UITableViewCell, UICollectionViewDelegate, UICollectionViewDataSource { |
| 14 | 14 | ||
| 15 | lazy var lineView :UIView = { | 15 | lazy var lineView :UIView = { |
| @@ -113,8 +113,9 @@ class CNLiveDigitalAuthCell: UITableViewCell, UICollectionViewDelegate, UICollec | @@ -113,8 +113,9 @@ class CNLiveDigitalAuthCell: UITableViewCell, UICollectionViewDelegate, UICollec | ||
| 113 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | 113 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| 114 | // let identitiesModel = self.threeArr[indexPath.row] | 114 | // let identitiesModel = self.threeArr[indexPath.row] |
| 115 | currentSeleIndex = indexPath.row | 115 | currentSeleIndex = indexPath.row |
| 116 | + let identitiesModel = self.threeArr[indexPath.row] | ||
| 116 | self.threeCollectionView.reloadData() | 117 | self.threeCollectionView.reloadData() |
| 117 | - self.selectBlock?(self) | 118 | + self.selectBlock?(self,identitiesModel.id) |
| 118 | } | 119 | } |
| 119 | 120 | ||
| 120 | } | 121 | } |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/CNLiveDigitalFirstCell.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveDigitalFirstCell.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/6/17. | ||
| 6 | +// 数字资产-实名/未实名cell | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import Kingfisher | ||
| 10 | +import SnapKit | ||
| 11 | + | ||
| 12 | +//typealias SelectBlock = (_ currentCell: CNLiveDigitalAuthCell ,_ identitiesId:String) -> Void | ||
| 13 | +class CNLiveDigitalFirstCell: UITableViewCell { | ||
| 14 | + | ||
| 15 | + lazy var whiteView :UIView = { | ||
| 16 | + let whiteView = UIView(frame: CGRect(x: 15, y:adapt_length(length: 20), width: KSreenWidth-30, height: adapt_length(length: 121))) | ||
| 17 | + whiteView.backgroundColor = .white | ||
| 18 | + whiteView.layer.cornerRadius = 12 | ||
| 19 | + whiteView.clipsToBounds = true | ||
| 20 | + return whiteView | ||
| 21 | + }() | ||
| 22 | + | ||
| 23 | + lazy var unAuthTitleLabel: UILabel = { | ||
| 24 | + let titleLabel = UILabel() | ||
| 25 | + titleLabel.textColor = HexColor("#333333") | ||
| 26 | + titleLabel.textAlignment = .center | ||
| 27 | + titleLabel.text = "数字认证前,你实名了吗?" | ||
| 28 | + titleLabel.font = BoldFont_17 | ||
| 29 | + return titleLabel | ||
| 30 | + }() | ||
| 31 | + lazy var authBtn: UIButton = { | ||
| 32 | + let closeBtn = UIButton(type: .custom) | ||
| 33 | + closeBtn.frame = CGRect(x: 0, y: 0, width: 86, height: 34) | ||
| 34 | + closeBtn.setTitle("立即实名", for: .normal) | ||
| 35 | + closeBtn.setTitleColor(.white, for: .normal) | ||
| 36 | + closeBtn.layer.cornerRadius = 6 | ||
| 37 | + closeBtn.clipsToBounds = true | ||
| 38 | + | ||
| 39 | + // fillCode | ||
| 40 | + let bgLayer1 = CAGradientLayer() | ||
| 41 | + bgLayer1.colors = [UIColor(red: 0.17, green: 0.41, blue: 0.99, alpha: 1).cgColor, UIColor(red: 0.27, green: 0.68, blue: 0.99, alpha: 1).cgColor] | ||
| 42 | + bgLayer1.locations = [0, 1] | ||
| 43 | + bgLayer1.frame = closeBtn.bounds | ||
| 44 | + bgLayer1.startPoint = CGPoint(x: 0.5, y: 1) | ||
| 45 | + bgLayer1.endPoint = CGPoint(x: 0, y: 0) | ||
| 46 | + closeBtn.layer.addSublayer(bgLayer1) | ||
| 47 | + | ||
| 48 | + closeBtn.addTarget(self, action: #selector(authBtnAction), for: .touchUpInside) | ||
| 49 | + return closeBtn | ||
| 50 | + }() | ||
| 51 | + | ||
| 52 | + //已认证 名字 | ||
| 53 | + lazy var authNameTitleLabel: UILabel = { | ||
| 54 | + let titleLabel = UILabel() | ||
| 55 | + titleLabel.textColor = HexColor("#333333") | ||
| 56 | + titleLabel.textAlignment = .center | ||
| 57 | + titleLabel.text = "" | ||
| 58 | + titleLabel.font = BoldFont_24 | ||
| 59 | + return titleLabel | ||
| 60 | + }() | ||
| 61 | + lazy var changePersonBtn: UIButton = { | ||
| 62 | + let closeBtn = UIButton(type: .custom) | ||
| 63 | + closeBtn.backgroundColor = HexColor("#FFF8DB") | ||
| 64 | + closeBtn.layer.cornerRadius = 3 | ||
| 65 | + closeBtn.clipsToBounds = true | ||
| 66 | + closeBtn.setTitle("实名对象切换", for: .normal) | ||
| 67 | + closeBtn.setTitleColor(HexColor("#F2A62E"), for: .normal) | ||
| 68 | + closeBtn.titleLabel?.font = Font_12 | ||
| 69 | + closeBtn.addTarget(self, action: #selector(changePersonBtnAction), for: .touchUpInside) | ||
| 70 | + return closeBtn | ||
| 71 | + }() | ||
| 72 | + lazy var phoneTitleLabel: UILabel = { | ||
| 73 | + let titleLabel = UILabel() | ||
| 74 | + titleLabel.textColor = HexColor("#999999") | ||
| 75 | + titleLabel.textAlignment = .left | ||
| 76 | + titleLabel.text = "男 | xx岁 | 10000000000" | ||
| 77 | + titleLabel.font = Font_14 | ||
| 78 | + return titleLabel | ||
| 79 | + }() | ||
| 80 | + lazy var realNameView :UIView = { | ||
| 81 | + let bottomNavView = UIView(frame: CGRect(x: 0, y: 0, width: adapt_length(length: 80), height: adapt_length(length: 106))) | ||
| 82 | + bottomNavView.clipsToBounds = true | ||
| 83 | + bottomNavView.layer.cornerRadius = 44 | ||
| 84 | + bottomNavView.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMaxXMaxYCorner] | ||
| 85 | + // fillCode | ||
| 86 | + let bgLayer1 = CAGradientLayer() | ||
| 87 | + bgLayer1.colors = [UIColor(red: 0.25, green: 0.27, blue: 0.4, alpha: 1).cgColor, UIColor(red: 0.56, green: 0.64, blue: 0.78, alpha: 1).cgColor] | ||
| 88 | + bgLayer1.locations = [0, 1] | ||
| 89 | + bgLayer1.frame = bottomNavView.bounds | ||
| 90 | + bgLayer1.startPoint = CGPoint(x: 0.5, y: -0.37) | ||
| 91 | + bgLayer1.endPoint = CGPoint(x: 0.71, y: 0.71) | ||
| 92 | + bottomNavView.layer.addSublayer(bgLayer1) | ||
| 93 | + | ||
| 94 | + let iconImgView = UIImageView(frame: CGRect(x: adapt_length(length: 6), y: adapt_length(length: 32), width: adapt_length(length: 68), height: adapt_length(length: 68))) | ||
| 95 | + iconImgView.image = UIImage(named: "auth_realIcon") | ||
| 96 | + bottomNavView.addSubview(iconImgView) | ||
| 97 | + | ||
| 98 | + let titleLabel = UILabel(frame: CGRect(x: 0, y: adapt_length(length: 10), width: adapt_length(length: 80), height: 17)) | ||
| 99 | + titleLabel.textColor = HexColor("#FFFFFE") | ||
| 100 | + titleLabel.textAlignment = .center | ||
| 101 | + titleLabel.text = "去实名认证" | ||
| 102 | + titleLabel.font = Font_12 | ||
| 103 | + bottomNavView.addSubview(titleLabel) | ||
| 104 | + | ||
| 105 | + bottomNavView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(realNameViewAction))) | ||
| 106 | + return bottomNavView | ||
| 107 | + }() | ||
| 108 | + | ||
| 109 | + | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| 113 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| 114 | + self.contentView.backgroundColor = .clear | ||
| 115 | + self.backgroundColor = .clear | ||
| 116 | + self.selectionStyle = .none | ||
| 117 | + | ||
| 118 | + if UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers.count ?? 0 > 0{ | ||
| 119 | + //实名认证过 | ||
| 120 | + self.contentView.addSubview(self.whiteView) | ||
| 121 | + self.whiteView.addSubview(self.authNameTitleLabel) | ||
| 122 | + self.authNameTitleLabel.snp.makeConstraints { make in | ||
| 123 | + make.left.equalTo(adapt_length(length: 15)) | ||
| 124 | + make.top.equalTo(adapt_length(length: 20)) | ||
| 125 | + } | ||
| 126 | + self.authNameTitleLabel.text = UserInfoManager.shared.userInfo.currentUser?.name | ||
| 127 | + | ||
| 128 | + self.whiteView.addSubview(self.changePersonBtn) | ||
| 129 | + self.changePersonBtn.snp.makeConstraints { make in | ||
| 130 | + make.left.equalTo(self.authNameTitleLabel.snp.right).offset(adapt_length(length: 5)) | ||
| 131 | + make.centerY.equalTo(self.authNameTitleLabel.snp.centerY) | ||
| 132 | + make.width.equalTo(adapt_length(length: 91)) | ||
| 133 | + make.height.equalTo(adapt_length(length: 21)) | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + self.whiteView.addSubview(self.phoneTitleLabel) | ||
| 137 | + self.phoneTitleLabel.snp.makeConstraints { make in | ||
| 138 | + make.left.equalTo(adapt_length(length: 15)) | ||
| 139 | + make.top.equalTo(self.authNameTitleLabel.snp.bottom).offset(adapt_length(length: 8)) | ||
| 140 | + } | ||
| 141 | + let (gender, age) = self.extractGenderAndAge(fromIDCardNumber: UserInfoManager.shared.userInfo.currentUser?.idNo ?? "") | ||
| 142 | + let ageStr = String(format: "%d", age ?? 0) | ||
| 143 | + self.phoneTitleLabel.text = gender+" | "+ageStr+"岁"+" | "+UserInfoManager.shared.userInfo.mobile | ||
| 144 | + | ||
| 145 | + self.whiteView.addSubview(self.realNameView) | ||
| 146 | + self.realNameView.snp.makeConstraints { make in | ||
| 147 | + make.right.equalToSuperview().offset(adapt_length(length: -35)) | ||
| 148 | + make.top.equalToSuperview() | ||
| 149 | + make.width.equalTo(adapt_length(length: 80)) | ||
| 150 | + make.height.equalTo(adapt_length(length: 106)) | ||
| 151 | + } | ||
| 152 | + }else{ | ||
| 153 | + //未实名认证 | ||
| 154 | + self.contentView.addSubview(self.whiteView) | ||
| 155 | + self.whiteView.addSubview(self.unAuthTitleLabel) | ||
| 156 | + self.whiteView.addSubview(self.authBtn) | ||
| 157 | + | ||
| 158 | + self.unAuthTitleLabel.snp.makeConstraints { make in | ||
| 159 | + make.centerX.equalToSuperview() | ||
| 160 | + make.top.equalToSuperview().offset(30) | ||
| 161 | + make.left.equalTo(5) | ||
| 162 | + make.right.equalToSuperview().offset(-5) | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + self.authBtn.snp.makeConstraints { make in | ||
| 166 | + make.centerX.equalToSuperview() | ||
| 167 | + make.width.equalTo(86) | ||
| 168 | + make.height.equalTo(34) | ||
| 169 | + make.top.equalTo(self.unAuthTitleLabel.snp.bottom).offset(12) | ||
| 170 | + } | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + } | ||
| 174 | + required init?(coder: NSCoder) { | ||
| 175 | + fatalError("init(coder:) has not been implemented") | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + //身份证号提取 性别和年龄 | ||
| 179 | + func extractGenderAndAge(fromIDCardNumber idCardNumber: String) -> (gender: String, age: Int?) { | ||
| 180 | + guard idCardNumber.count == 18 else { | ||
| 181 | + return ("未知", nil) | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + // 提取出生年份(身份证号码的第7位到第14位) | ||
| 185 | + let birthYearStr = idCardNumber.subString(start: 6, length: 4) | ||
| 186 | + guard let birthYear = Int(birthYearStr) else { | ||
| 187 | + return ("未知", nil) | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + // 计算年龄 | ||
| 191 | + let currentYear = Calendar.current.component(.year, from: Date()) | ||
| 192 | + let age = currentYear - birthYear | ||
| 193 | + | ||
| 194 | + // 提取性别(身份证号码的第17位,奇数代表男,偶数代表女) | ||
| 195 | + let genderCode = Int(String(idCardNumber[idCardNumber.index(idCardNumber.startIndex, offsetBy: 16)])) | ||
| 196 | + let gender = genderCode != nil && genderCode! % 2 == 0 ? "女" : "男" | ||
| 197 | + | ||
| 198 | + return (gender, age >= 0 ? age : nil) | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + //未认证 | ||
| 202 | + @objc func authBtnAction(){ | ||
| 203 | + | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + //已认证 | ||
| 207 | + //切换实名身份 | ||
| 208 | + @objc func changePersonBtnAction(){ | ||
| 209 | + | ||
| 210 | + } | ||
| 211 | + //实名认证页面 | ||
| 212 | + @objc func realNameViewAction(){ | ||
| 213 | + | ||
| 214 | + } | ||
| 215 | + | ||
| 216 | + | ||
| 217 | + | ||
| 218 | +} |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/CNLiveDigitalSecCell.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveDigitalSecCell.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/6/17. | ||
| 6 | +// 数字资产-身份cell | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import Kingfisher | ||
| 10 | +import SnapKit | ||
| 11 | + | ||
| 12 | +class CNLiveDigitalSecCell: UITableViewCell, UICollectionViewDelegate, UICollectionViewDataSource { | ||
| 13 | + | ||
| 14 | + lazy var whiteView :UIView = { | ||
| 15 | + let whiteView = UIView(frame: CGRect(x: 15, y:adapt_length(length: 15), width: KSreenWidth-30, height: adapt_length(length: 838))) | ||
| 16 | + whiteView.backgroundColor = .white | ||
| 17 | + whiteView.layer.cornerRadius = 12 | ||
| 18 | + whiteView.clipsToBounds = true | ||
| 19 | + return whiteView | ||
| 20 | + }() | ||
| 21 | + | ||
| 22 | + lazy var myIdentityTitleLabel: UILabel = { | ||
| 23 | + let titleLabel = UILabel() | ||
| 24 | + titleLabel.textColor = HexColor("#333333") | ||
| 25 | + titleLabel.textAlignment = .center | ||
| 26 | + titleLabel.text = "我的身份" | ||
| 27 | + titleLabel.font = BoldFont_16 | ||
| 28 | + return titleLabel | ||
| 29 | + }() | ||
| 30 | + | ||
| 31 | + let kCNLiveDigitalSecCollectCellID = "kCNLiveDigitalSecCollectCellID" | ||
| 32 | + lazy var threeCollectionView: UICollectionView = { | ||
| 33 | + let layout = UICollectionViewFlowLayout() | ||
| 34 | + layout.itemSize = CGSizeMake(adapt_length(length: 60), adapt_length(length: 60+3+17)) | ||
| 35 | + layout.minimumLineSpacing = 22 | ||
| 36 | + layout.scrollDirection = .horizontal | ||
| 37 | + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) | ||
| 38 | + collectionView.delegate = self | ||
| 39 | + collectionView.dataSource = self | ||
| 40 | + collectionView.backgroundColor = .white | ||
| 41 | + collectionView.register(CNLiveDigitalSecCollectionCell.self, forCellWithReuseIdentifier: kCNLiveDigitalSecCollectCellID) | ||
| 42 | + return collectionView | ||
| 43 | + }() | ||
| 44 | + var currSeleIndex = 0 | ||
| 45 | + | ||
| 46 | + var _digitalListModels : [MineAuthListModel]? | ||
| 47 | + var digitalListModels : [MineAuthListModel]? { | ||
| 48 | + get{ | ||
| 49 | + _digitalListModels | ||
| 50 | + } | ||
| 51 | + set{ | ||
| 52 | + _digitalListModels = newValue! | ||
| 53 | + setupNewUI(models: _digitalListModels!) | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + //关联证书 | ||
| 58 | + lazy var zhengshuView :UIView = { | ||
| 59 | + let bottomNavView = UIView(frame: CGRect(x: 15, y: self.threeCollectionView.bottom+17, width: self.width-30, height: 231)) | ||
| 60 | + bottomNavView.backgroundColor = HexColor("#F9F9F9") | ||
| 61 | + bottomNavView.layer.cornerRadius = 9 | ||
| 62 | + bottomNavView.clipsToBounds = true | ||
| 63 | + return bottomNavView | ||
| 64 | + }() | ||
| 65 | + lazy var zhengshuTitleLabel: UILabel = { | ||
| 66 | + let titleLabel = UILabel() | ||
| 67 | + titleLabel.textColor = HexColor("#333333") | ||
| 68 | + titleLabel.textAlignment = .center | ||
| 69 | + titleLabel.text = "关联证书" | ||
| 70 | + titleLabel.font = BoldFont_16 | ||
| 71 | + return titleLabel | ||
| 72 | + }() | ||
| 73 | + lazy var zhengshuDescTitleLabel: UILabel = { | ||
| 74 | + let titleLabel = UILabel() | ||
| 75 | + titleLabel.textColor = HexColor("#999999") | ||
| 76 | + titleLabel.textAlignment = .left | ||
| 77 | + titleLabel.text = "关联技能证书或身份证书,见证你的实力" | ||
| 78 | + titleLabel.font = Font_12 | ||
| 79 | + return titleLabel | ||
| 80 | + }() | ||
| 81 | + lazy var zhengshuImgView :UIImageView = { | ||
| 82 | + let iconImgView = UIImageView() | ||
| 83 | + iconImgView.image = UIImage(named: "auth_zhengshu") | ||
| 84 | + return iconImgView | ||
| 85 | + }() | ||
| 86 | + lazy var zhengshuBtn: UIButton = { | ||
| 87 | + let closeBtn = UIButton(type: .custom) | ||
| 88 | + closeBtn.setTitle("关联证书", for: .normal) | ||
| 89 | + closeBtn.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 90 | + closeBtn.titleLabel?.font = BoldFont_14 | ||
| 91 | + closeBtn.layer.borderColor = HexColor("#999999")?.cgColor | ||
| 92 | + closeBtn.layer.borderWidth = 0.5 | ||
| 93 | + closeBtn.layer.cornerRadius = 6 | ||
| 94 | + closeBtn.clipsToBounds = true | ||
| 95 | + closeBtn.addTarget(self, action: #selector(zhengshuBtnAction), for: .touchUpInside) | ||
| 96 | + return closeBtn | ||
| 97 | + }() | ||
| 98 | + | ||
| 99 | + //关联工作记录 | ||
| 100 | + lazy var gongzuoView :UIView = { | ||
| 101 | + let bottomNavView = UIView(frame: CGRect(x: 15, y: self.zhengshuView.bottom+15, width: self.width-30, height: 131)) | ||
| 102 | + bottomNavView.backgroundColor = HexColor("#F9F9F9") | ||
| 103 | + bottomNavView.layer.cornerRadius = 9 | ||
| 104 | + bottomNavView.clipsToBounds = true | ||
| 105 | + return bottomNavView | ||
| 106 | + }() | ||
| 107 | + lazy var gongzuoTitleLabel: UILabel = { | ||
| 108 | + let titleLabel = UILabel() | ||
| 109 | + titleLabel.textColor = HexColor("#333333") | ||
| 110 | + titleLabel.textAlignment = .center | ||
| 111 | + titleLabel.text = "关联工作记录" | ||
| 112 | + titleLabel.font = BoldFont_16 | ||
| 113 | + return titleLabel | ||
| 114 | + }() | ||
| 115 | + lazy var gongzuoDescTitleLabel: UILabel = { | ||
| 116 | + let titleLabel = UILabel() | ||
| 117 | + titleLabel.textColor = HexColor("#999999") | ||
| 118 | + titleLabel.textAlignment = .left | ||
| 119 | + titleLabel.text = "关联工作记录,见证你的专业经验" | ||
| 120 | + titleLabel.font = Font_12 | ||
| 121 | + return titleLabel | ||
| 122 | + }() | ||
| 123 | + lazy var gongzuoBtn: UIButton = { | ||
| 124 | + let closeBtn = UIButton(type: .custom) | ||
| 125 | + closeBtn.setTitle("关联工作记录", for: .normal) | ||
| 126 | + closeBtn.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 127 | + closeBtn.titleLabel?.font = BoldFont_14 | ||
| 128 | + closeBtn.layer.borderColor = HexColor("#999999")?.cgColor | ||
| 129 | + closeBtn.layer.borderWidth = 0.5 | ||
| 130 | + closeBtn.layer.cornerRadius = 6 | ||
| 131 | + closeBtn.clipsToBounds = true | ||
| 132 | + closeBtn.addTarget(self, action: #selector(gongzuoBtnAction), for: .touchUpInside) | ||
| 133 | + return closeBtn | ||
| 134 | + }() | ||
| 135 | + | ||
| 136 | + //关联社团经历 | ||
| 137 | + lazy var shetuanView :UIView = { | ||
| 138 | + let bottomNavView = UIView(frame: CGRect(x: 15, y: self.gongzuoView.bottom+15, width: self.width-30, height: 131)) | ||
| 139 | + bottomNavView.backgroundColor = HexColor("#F9F9F9") | ||
| 140 | + bottomNavView.layer.cornerRadius = 9 | ||
| 141 | + bottomNavView.clipsToBounds = true | ||
| 142 | + return bottomNavView | ||
| 143 | + }() | ||
| 144 | + lazy var shetuanTitleLabel: UILabel = { | ||
| 145 | + let titleLabel = UILabel() | ||
| 146 | + titleLabel.textColor = HexColor("#333333") | ||
| 147 | + titleLabel.textAlignment = .center | ||
| 148 | + titleLabel.text = "关联社团经历" | ||
| 149 | + titleLabel.font = BoldFont_16 | ||
| 150 | + return titleLabel | ||
| 151 | + }() | ||
| 152 | + lazy var shetuanDescTitleLabel: UILabel = { | ||
| 153 | + let titleLabel = UILabel() | ||
| 154 | + titleLabel.textColor = HexColor("#999999") | ||
| 155 | + titleLabel.textAlignment = .left | ||
| 156 | + titleLabel.text = "关联社团经历,见证全面成长与技能发展" | ||
| 157 | + titleLabel.font = Font_12 | ||
| 158 | + return titleLabel | ||
| 159 | + }() | ||
| 160 | + lazy var shetuanBtn: UIButton = { | ||
| 161 | + let closeBtn = UIButton(type: .custom) | ||
| 162 | + closeBtn.setTitle("关联社团经历", for: .normal) | ||
| 163 | + closeBtn.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 164 | + closeBtn.titleLabel?.font = BoldFont_14 | ||
| 165 | + closeBtn.layer.borderColor = HexColor("#999999")?.cgColor | ||
| 166 | + closeBtn.layer.borderWidth = 0.5 | ||
| 167 | + closeBtn.layer.cornerRadius = 6 | ||
| 168 | + closeBtn.clipsToBounds = true | ||
| 169 | + closeBtn.addTarget(self, action: #selector(shetuanBtnAction), for: .touchUpInside) | ||
| 170 | + return closeBtn | ||
| 171 | + }() | ||
| 172 | + | ||
| 173 | + //关联获奖情况 | ||
| 174 | + lazy var huojiangView :UIView = { | ||
| 175 | + let bottomNavView = UIView(frame: CGRect(x: 15, y: self.gongzuoView.bottom+15, width: self.width-30, height: 131)) | ||
| 176 | + bottomNavView.backgroundColor = HexColor("#F9F9F9") | ||
| 177 | + bottomNavView.layer.cornerRadius = 9 | ||
| 178 | + bottomNavView.clipsToBounds = true | ||
| 179 | + return bottomNavView | ||
| 180 | + }() | ||
| 181 | + lazy var huojiangTitleLabel: UILabel = { | ||
| 182 | + let titleLabel = UILabel() | ||
| 183 | + titleLabel.textColor = HexColor("#333333") | ||
| 184 | + titleLabel.textAlignment = .center | ||
| 185 | + titleLabel.text = "关联获奖情况" | ||
| 186 | + titleLabel.font = BoldFont_16 | ||
| 187 | + return titleLabel | ||
| 188 | + }() | ||
| 189 | + lazy var huojiangDescTitleLabel: UILabel = { | ||
| 190 | + let titleLabel = UILabel() | ||
| 191 | + titleLabel.textColor = HexColor("#999999") | ||
| 192 | + titleLabel.textAlignment = .left | ||
| 193 | + titleLabel.text = "关联获奖情况,见证全面成长与技能发展" | ||
| 194 | + titleLabel.font = Font_12 | ||
| 195 | + return titleLabel | ||
| 196 | + }() | ||
| 197 | + lazy var huojiangBtn: UIButton = { | ||
| 198 | + let closeBtn = UIButton(type: .custom) | ||
| 199 | + closeBtn.setTitle("关联获奖情况", for: .normal) | ||
| 200 | + closeBtn.setTitleColor(HexColor("#999999"), for: .normal) | ||
| 201 | + closeBtn.titleLabel?.font = BoldFont_14 | ||
| 202 | + closeBtn.layer.borderColor = HexColor("#999999")?.cgColor | ||
| 203 | + closeBtn.layer.borderWidth = 0.5 | ||
| 204 | + closeBtn.layer.cornerRadius = 6 | ||
| 205 | + closeBtn.clipsToBounds = true | ||
| 206 | + closeBtn.addTarget(self, action: #selector(huojiangBtnAction), for: .touchUpInside) | ||
| 207 | + return closeBtn | ||
| 208 | + }() | ||
| 209 | + let delegate = UIApplication.shared.delegate as! AppDelegate | ||
| 210 | + /// 未认证-inputType17时弹窗背景图 | ||
| 211 | + lazy var alertBgImgView:UIImageView = { | ||
| 212 | + let alertBgImgView:UIImageView = UIImageView() | ||
| 213 | + alertBgImgView.tag = 20001 | ||
| 214 | + alertBgImgView.isUserInteractionEnabled = true | ||
| 215 | + let ges = UITapGestureRecognizer(target: self, action: #selector(alertBgImgViewClickAction)) | ||
| 216 | + alertBgImgView.addGestureRecognizer(ges) | ||
| 217 | + | ||
| 218 | + return alertBgImgView | ||
| 219 | + }() | ||
| 220 | + lazy var alertBgView:UIView = { | ||
| 221 | + let alertBgView:UIView = UIView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: KSreenHeight)) | ||
| 222 | + alertBgView.backgroundColor = HexColor("#000000") | ||
| 223 | + alertBgView.alpha = 0.6 | ||
| 224 | + alertBgView.isUserInteractionEnabled = true | ||
| 225 | + alertBgView.tag = 20000 | ||
| 226 | + | ||
| 227 | + let ges = UITapGestureRecognizer(target: self, action: #selector(alertBgViewClickAction)) | ||
| 228 | + alertBgView.addGestureRecognizer(ges) | ||
| 229 | + | ||
| 230 | + return alertBgView | ||
| 231 | + }() | ||
| 232 | + | ||
| 233 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| 234 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| 235 | + self.contentView.backgroundColor = .clear | ||
| 236 | + self.backgroundColor = .clear | ||
| 237 | + self.selectionStyle = .none | ||
| 238 | + self.contentView.addSubview(self.whiteView) | ||
| 239 | + self.whiteView.addSubview(self.myIdentityTitleLabel) | ||
| 240 | + self.myIdentityTitleLabel.snp.makeConstraints { make in | ||
| 241 | + make.top.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 242 | + make.left.equalTo(adapt_length(length: 15)) | ||
| 243 | + } | ||
| 244 | + | ||
| 245 | + self.whiteView.addSubview(self.threeCollectionView) | ||
| 246 | + self.threeCollectionView.snp.makeConstraints { make in | ||
| 247 | + make.left.right.equalToSuperview().offset(adapt_length(length: 18)) | ||
| 248 | + make.top.equalTo(adapt_length(length: 53)) | ||
| 249 | + make.height.equalTo(adapt_length(length: 60+7+17)) | ||
| 250 | + make.width.equalToSuperview().offset(adapt_length(length: -36)) | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + self.whiteView.addSubview(self.zhengshuView) | ||
| 254 | + self.zhengshuView.snp.makeConstraints { make in | ||
| 255 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 256 | + make.right.equalToSuperview().offset(adapt_length(length: -15)) | ||
| 257 | + make.top.equalTo(self.threeCollectionView.snp.bottom).offset(adapt_length(length: 17)) | ||
| 258 | + make.height.equalTo(adapt_length(length: 231)) | ||
| 259 | + } | ||
| 260 | + self.zhengshuView.addSubview(self.zhengshuTitleLabel) | ||
| 261 | + self.zhengshuTitleLabel.snp.makeConstraints { make in | ||
| 262 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 263 | + make.top.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 264 | + } | ||
| 265 | + self.zhengshuView.addSubview(self.zhengshuDescTitleLabel) | ||
| 266 | + self.zhengshuDescTitleLabel.snp.makeConstraints { make in | ||
| 267 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 268 | + make.top.equalTo(self.zhengshuTitleLabel.snp.bottom).offset(adapt_length(length: 3)) | ||
| 269 | + } | ||
| 270 | + self.zhengshuView.addSubview(self.zhengshuImgView) | ||
| 271 | + self.zhengshuImgView.snp.makeConstraints { make in | ||
| 272 | + make.centerX.equalToSuperview() | ||
| 273 | + make.top.equalTo(self.zhengshuDescTitleLabel.snp.bottom).offset(adapt_length(length: 20)) | ||
| 274 | + make.width.equalTo(adapt_length(length: 125)) | ||
| 275 | + make.height.equalTo(adapt_length(length: 85)) | ||
| 276 | + } | ||
| 277 | + self.zhengshuView.addSubview(self.zhengshuBtn) | ||
| 278 | + self.zhengshuBtn.snp.makeConstraints { make in | ||
| 279 | + make.centerX.equalToSuperview() | ||
| 280 | + make.top.equalTo(self.zhengshuImgView.snp.bottom).offset(adapt_length(length: 15)) | ||
| 281 | + make.width.equalTo(adapt_length(length: 86)) | ||
| 282 | + make.height.equalTo(adapt_length(length: 34)) | ||
| 283 | + } | ||
| 284 | + | ||
| 285 | + self.whiteView.addSubview(self.gongzuoView) | ||
| 286 | + self.gongzuoView.snp.makeConstraints { make in | ||
| 287 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 288 | + make.right.equalToSuperview().offset(adapt_length(length: -15)) | ||
| 289 | + make.top.equalTo(self.zhengshuView.snp.bottom).offset(adapt_length(length: 15)) | ||
| 290 | + make.height.equalTo(adapt_length(length: 131)) | ||
| 291 | + } | ||
| 292 | + self.gongzuoView.addSubview(self.gongzuoTitleLabel) | ||
| 293 | + self.gongzuoTitleLabel.snp.makeConstraints { make in | ||
| 294 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 295 | + make.top.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 296 | + } | ||
| 297 | + self.gongzuoView.addSubview(self.gongzuoDescTitleLabel) | ||
| 298 | + self.gongzuoDescTitleLabel.snp.makeConstraints { make in | ||
| 299 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 300 | + make.top.equalTo(self.gongzuoTitleLabel.snp.bottom).offset(adapt_length(length: 3)) | ||
| 301 | + } | ||
| 302 | + self.gongzuoView.addSubview(self.gongzuoBtn) | ||
| 303 | + self.gongzuoBtn.snp.makeConstraints { make in | ||
| 304 | + make.centerX.equalToSuperview() | ||
| 305 | + make.top.equalTo(self.gongzuoDescTitleLabel.snp.bottom).offset(adapt_length(length: 20)) | ||
| 306 | + make.width.equalTo(adapt_length(length: 86)) | ||
| 307 | + make.height.equalTo(adapt_length(length: 34)) | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + self.whiteView.addSubview(self.shetuanView) | ||
| 311 | + self.shetuanView.snp.makeConstraints { make in | ||
| 312 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 313 | + make.right.equalToSuperview().offset(adapt_length(length: -15)) | ||
| 314 | + make.top.equalTo(self.gongzuoView.snp.bottom).offset(adapt_length(length: 15)) | ||
| 315 | + make.height.equalTo(adapt_length(length: 131)) | ||
| 316 | + } | ||
| 317 | + self.shetuanView.addSubview(self.shetuanTitleLabel) | ||
| 318 | + self.shetuanTitleLabel.snp.makeConstraints { make in | ||
| 319 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 320 | + make.top.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 321 | + } | ||
| 322 | + self.shetuanView.addSubview(self.shetuanDescTitleLabel) | ||
| 323 | + self.shetuanDescTitleLabel.snp.makeConstraints { make in | ||
| 324 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 325 | + make.top.equalTo(self.shetuanTitleLabel.snp.bottom).offset(adapt_length(length: 3)) | ||
| 326 | + } | ||
| 327 | + self.shetuanView.addSubview(self.shetuanBtn) | ||
| 328 | + self.shetuanBtn.snp.makeConstraints { make in | ||
| 329 | + make.centerX.equalToSuperview() | ||
| 330 | + make.top.equalTo(self.shetuanDescTitleLabel.snp.bottom).offset(adapt_length(length: 20)) | ||
| 331 | + make.width.equalTo(adapt_length(length: 86)) | ||
| 332 | + make.height.equalTo(adapt_length(length: 34)) | ||
| 333 | + } | ||
| 334 | + | ||
| 335 | + self.whiteView.addSubview(self.huojiangView) | ||
| 336 | + self.huojiangView.snp.makeConstraints { make in | ||
| 337 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 338 | + make.right.equalToSuperview().offset(adapt_length(length: -15)) | ||
| 339 | + make.top.equalTo(self.shetuanView.snp.bottom).offset(adapt_length(length: 15)) | ||
| 340 | + make.height.equalTo(adapt_length(length: 131)) | ||
| 341 | + } | ||
| 342 | + self.huojiangView.addSubview(self.huojiangTitleLabel) | ||
| 343 | + self.huojiangTitleLabel.snp.makeConstraints { make in | ||
| 344 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 345 | + make.top.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 346 | + } | ||
| 347 | + self.huojiangView.addSubview(self.huojiangDescTitleLabel) | ||
| 348 | + self.huojiangDescTitleLabel.snp.makeConstraints { make in | ||
| 349 | + make.left.equalToSuperview().offset(adapt_length(length: 15)) | ||
| 350 | + make.top.equalTo(self.huojiangTitleLabel.snp.bottom).offset(adapt_length(length: 3)) | ||
| 351 | + } | ||
| 352 | + self.huojiangView.addSubview(self.huojiangBtn) | ||
| 353 | + self.huojiangBtn.snp.makeConstraints { make in | ||
| 354 | + make.centerX.equalToSuperview() | ||
| 355 | + make.top.equalTo(self.huojiangDescTitleLabel.snp.bottom).offset(adapt_length(length: 20)) | ||
| 356 | + make.width.equalTo(adapt_length(length: 86)) | ||
| 357 | + make.height.equalTo(adapt_length(length: 34)) | ||
| 358 | + } | ||
| 359 | + | ||
| 360 | + } | ||
| 361 | + required init?(coder: NSCoder) { | ||
| 362 | + fatalError("init(coder:) has not been implemented") | ||
| 363 | + } | ||
| 364 | + | ||
| 365 | + @objc func zhengshuBtnAction(){ | ||
| 366 | + self.show17Alert() | ||
| 367 | + } | ||
| 368 | + @objc func gongzuoBtnAction(){ | ||
| 369 | + self.show17Alert() | ||
| 370 | + } | ||
| 371 | + @objc func shetuanBtnAction(){ | ||
| 372 | + self.show17Alert() | ||
| 373 | + } | ||
| 374 | + @objc func huojiangBtnAction(){ | ||
| 375 | + self.show17Alert() | ||
| 376 | + } | ||
| 377 | + | ||
| 378 | + // MARK: - 点击弹窗,按类型跳转 | ||
| 379 | + @objc func alertBgImgViewClickAction() { | ||
| 380 | + self.hiden17Alert() | ||
| 381 | + } | ||
| 382 | + @objc func alertBgViewClickAction() { | ||
| 383 | + //点击蒙版隐藏view | ||
| 384 | + self.hiden17Alert() | ||
| 385 | + } | ||
| 386 | + | ||
| 387 | + //弹出弹窗 | ||
| 388 | + func show17Alert(){ | ||
| 389 | + | ||
| 390 | + delegate.window?.addSubview(self.alertBgView) | ||
| 391 | + delegate.window?.addSubview(self.alertBgImgView) | ||
| 392 | + alertBgImgView.snp.makeConstraints { make in | ||
| 393 | + make.centerX.equalToSuperview() | ||
| 394 | + make.centerY.equalToSuperview() | ||
| 395 | + make.width.equalTo(KSreenWidth-80) | ||
| 396 | + make.height.equalTo((KSreenWidth-80)*170.5/295) | ||
| 397 | + } | ||
| 398 | + | ||
| 399 | + self.alertBgImgView.image = UIImage(named: "auth_alert_unOpen") | ||
| 400 | + } | ||
| 401 | + func hiden17Alert(){ | ||
| 402 | + delegate.window?.subviews.forEach({ view in | ||
| 403 | + if view.tag >= 20000{ | ||
| 404 | + view.removeFromSuperview() | ||
| 405 | + } | ||
| 406 | + }) | ||
| 407 | + } | ||
| 408 | + | ||
| 409 | + | ||
| 410 | + func setupNewUI(models:[MineAuthListModel]){ | ||
| 411 | + | ||
| 412 | + self.threeCollectionView.reloadData() | ||
| 413 | + } | ||
| 414 | + | ||
| 415 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
| 416 | + self.digitalListModels?.count ?? 0 | ||
| 417 | + } | ||
| 418 | + | ||
| 419 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
| 420 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCNLiveDigitalSecCollectCellID, for: indexPath) as! CNLiveDigitalSecCollectionCell | ||
| 421 | + cell.authListModel = self.digitalListModels?[indexPath.row] | ||
| 422 | + if indexPath.row == currSeleIndex | ||
| 423 | + {// | ||
| 424 | + cell.cellIsSelected = true | ||
| 425 | + }else{ | ||
| 426 | + // | ||
| 427 | + cell.cellIsSelected = false | ||
| 428 | + } | ||
| 429 | + return cell | ||
| 430 | + } | ||
| 431 | + | ||
| 432 | + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
| 433 | + self.currSeleIndex = indexPath.row | ||
| 434 | + self.threeCollectionView.reloadData() | ||
| 435 | + } | ||
| 436 | +} |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/CNLiveDigitalSecCollectionCell.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveDigitalSecCollectionCell.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/6/18. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import Kingfisher | ||
| 10 | + | ||
| 11 | +class CNLiveDigitalSecCollectionCell: UICollectionViewCell { | ||
| 12 | + | ||
| 13 | + var _authListModel : MineAuthListModel? | ||
| 14 | + var authListModel : MineAuthListModel? { | ||
| 15 | + get{ | ||
| 16 | + _authListModel | ||
| 17 | + } | ||
| 18 | + set{ | ||
| 19 | + _authListModel = newValue! | ||
| 20 | + setupNewUI(model: _authListModel!) | ||
| 21 | + } | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + lazy var iconImgView :UIImageView = { | ||
| 25 | + let iconImgView = UIImageView(frame: CGRect(x: 0, y: 0, width: 60, height: 60)) | ||
| 26 | + iconImgView.clipsToBounds = true | ||
| 27 | + iconImgView.layer.cornerRadius = 30 | ||
| 28 | + iconImgView.contentMode = .scaleAspectFill | ||
| 29 | + iconImgView.clipsToBounds = true | ||
| 30 | + return iconImgView | ||
| 31 | + }() | ||
| 32 | +// lazy var rightIconImgView :UIImageView = { | ||
| 33 | +// let iconImgView = UIImageView(frame: CGRect(x: self.iconImgView.width-15, y: self.iconImgView.height-15, width: 15, height: 15)) | ||
| 34 | +// iconImgView.image = UIImage(named: "auth_selected") | ||
| 35 | +// return iconImgView | ||
| 36 | +// }() | ||
| 37 | + //是否选中 | ||
| 38 | + var _cellIsSelected : Bool = false | ||
| 39 | + var cellIsSelected : Bool { | ||
| 40 | + get{ | ||
| 41 | + _cellIsSelected | ||
| 42 | + } | ||
| 43 | + set{ | ||
| 44 | + _cellIsSelected = newValue | ||
| 45 | + | ||
| 46 | + if _cellIsSelected == true{ | ||
| 47 | + //选中 | ||
| 48 | + self.iconImgView.layer.borderWidth = 1 | ||
| 49 | + self.iconImgView.layer.borderColor = HexColor("#1961FE")?.cgColor | ||
| 50 | + }else{ | ||
| 51 | + //未选中 | ||
| 52 | + self.iconImgView.layer.borderWidth = 0 | ||
| 53 | + self.iconImgView.layer.borderColor = HexColor("#1961FE")?.cgColor | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + | ||
| 57 | +// self.rightIconImgView.isHidden = !_cellIsSelected | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + lazy var titleLabel: UILabel = { | ||
| 62 | + let titleLabel = UILabel.init(frame: CGRectMake(0, self.iconImgView.bottom+8, 60, 17)) | ||
| 63 | + titleLabel.textColor = HexColor("#1961FE") | ||
| 64 | + titleLabel.textAlignment = .center | ||
| 65 | + titleLabel.adjustsFontSizeToFitWidth = true | ||
| 66 | + titleLabel.font = Font_12 | ||
| 67 | + return titleLabel | ||
| 68 | + }() | ||
| 69 | + | ||
| 70 | + lazy var addBtn: UIButton = { | ||
| 71 | + let closeBtn = UIButton(type: .custom) | ||
| 72 | + closeBtn.frame = CGRect(x: 0, y: 0, width: 60, height: 60) | ||
| 73 | + closeBtn.setImage(UIImage(named: "auth_add"), for: .normal) | ||
| 74 | + closeBtn.addTarget(self, action: #selector(addBtnAction), for: .touchUpInside) | ||
| 75 | + return closeBtn | ||
| 76 | + }() | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + override init(frame: CGRect) { | ||
| 80 | + super.init(frame: frame) | ||
| 81 | + self.contentView.addSubview(self.iconImgView) | ||
| 82 | +// self.iconImgView.addSubview(self.rightIconImgView) | ||
| 83 | + self.contentView.addSubview(self.titleLabel) | ||
| 84 | + self.contentView.addSubview(self.addBtn) | ||
| 85 | + | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + required init?(coder: NSCoder) { | ||
| 89 | + fatalError("init(coder:) has not been implemented") | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + func setupNewUI(model:MineAuthListModel){ | ||
| 93 | + if model.identityId != 0{ | ||
| 94 | + self.titleLabel.text = model.name | ||
| 95 | + self.iconImgView.kf.setImage(with: URL(string: model.icon ?? "")) | ||
| 96 | + self.addBtn.isHidden = true | ||
| 97 | + self.titleLabel.isHidden = false | ||
| 98 | + self.iconImgView.isHidden = false | ||
| 99 | + }else{ | ||
| 100 | + self.addBtn.isHidden = false | ||
| 101 | + self.titleLabel.isHidden = true | ||
| 102 | + self.iconImgView.isHidden = true | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + @objc func addBtnAction(){ | ||
| 107 | + | ||
| 108 | + } | ||
| 109 | +} |
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
| @@ -648,9 +648,10 @@ class CNFrontMainView : UIView{ | @@ -648,9 +648,10 @@ class CNFrontMainView : UIView{ | ||
| 648 | }else{ | 648 | }else{ |
| 649 | if self.idModel!.userAuth{ | 649 | if self.idModel!.userAuth{ |
| 650 | //我的数字认证 | 650 | //我的数字认证 |
| 651 | + navigationViewController().pushViewController(CNLiveDigitalAssetsController(), animated: true) | ||
| 651 | print("1") | 652 | print("1") |
| 652 | }else{ | 653 | }else{ |
| 653 | - //个人认证 | 654 | + //个人认证 3个按钮 |
| 654 | print("1") | 655 | print("1") |
| 655 | } | 656 | } |
| 656 | } | 657 | } |
metaCode/Classes/Main/HomePage/ViewModel/DigitalAuth/CNLiveDigitalAuthViewModel.swift
| @@ -19,8 +19,8 @@ class CNLiveDigitalAuthViewModel:NSObject{ | @@ -19,8 +19,8 @@ class CNLiveDigitalAuthViewModel:NSObject{ | ||
| 19 | static func postFaceImageDataWithParams(name:String,idNo:String,fileData:Data,resultBlock: @escaping downSlideResultBlock) { | 19 | static func postFaceImageDataWithParams(name:String,idNo:String,fileData:Data,resultBlock: @escaping downSlideResultBlock) { |
| 20 | let param = NSMutableDictionary() | 20 | let param = NSMutableDictionary() |
| 21 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 21 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 22 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "name") | ||
| 23 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "idNo") | 22 | + param.setValue(name, forKey: "name") |
| 23 | + param.setValue(idNo, forKey: "idNo") | ||
| 24 | // param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "file") | 24 | // param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "file") |
| 25 | 25 | ||
| 26 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 26 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAuthResultViewController.swift
| @@ -30,12 +30,19 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -30,12 +30,19 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 30 | return mainView | 30 | return mainView |
| 31 | }() | 31 | }() |
| 32 | 32 | ||
| 33 | + lazy var iconView: UIImageView = { | ||
| 34 | + let mainView = UIImageView() | ||
| 35 | + mainView.contentMode = .scaleToFill | ||
| 36 | + mainView.image = UIImage(named: (_show_type == .result_success ? "auth_shenhezhong" : "auth_shenhezhong")) | ||
| 37 | + return mainView | ||
| 38 | + }() | ||
| 39 | + | ||
| 33 | lazy var tipName: UILabel = { | 40 | lazy var tipName: UILabel = { |
| 34 | let tipName = UILabel.init() | 41 | let tipName = UILabel.init() |
| 35 | if _show_type == .detail_shop { | 42 | if _show_type == .detail_shop { |
| 36 | tipName.text = "恭喜您,提交成功" | 43 | tipName.text = "恭喜您,提交成功" |
| 37 | } else { | 44 | } else { |
| 38 | - tipName.text = "资料审核中" | 45 | + tipName.text = "认证申请已提交" |
| 39 | } | 46 | } |
| 40 | tipName.font = BoldFont_18_Fit | 47 | tipName.font = BoldFont_18_Fit |
| 41 | tipName.textAlignment = .center | 48 | tipName.textAlignment = .center |
| @@ -48,7 +55,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -48,7 +55,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 48 | if _show_type == .detail_shop { | 55 | if _show_type == .detail_shop { |
| 49 | tipDesc.text = "请等待3个工作日,审核通过即可入驻平台!" | 56 | tipDesc.text = "请等待3个工作日,审核通过即可入驻平台!" |
| 50 | } else { | 57 | } else { |
| 51 | - tipDesc.text = "请耐心等待,预计一分钟之内完成审核" | 58 | + tipDesc.text = "请耐心等待,可随时关注审核进度" |
| 52 | } | 59 | } |
| 53 | tipDesc.textColor = HexColor("#A9A9A9") | 60 | tipDesc.textColor = HexColor("#A9A9A9") |
| 54 | tipDesc.textAlignment = .center | 61 | tipDesc.textAlignment = .center |
| @@ -130,6 +137,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -130,6 +137,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 130 | super.viewDidLoad() | 137 | super.viewDidLoad() |
| 131 | 138 | ||
| 132 | navigationBarHidden = false | 139 | navigationBarHidden = false |
| 140 | + | ||
| 133 | if _show_type == .detail_shop { | 141 | if _show_type == .detail_shop { |
| 134 | view.backgroundColor = HexColor("#F7F8FA") | 142 | view.backgroundColor = HexColor("#F7F8FA") |
| 135 | topNavView.backgroundColor = .clear | 143 | topNavView.backgroundColor = .clear |
| @@ -140,7 +148,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -140,7 +148,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 140 | } else { | 148 | } else { |
| 141 | view.backgroundColor = .white | 149 | view.backgroundColor = .white |
| 142 | topNavView.backgroundColor = .clear | 150 | topNavView.backgroundColor = .clear |
| 143 | - titleName = "添加\(_listModel.name!)" | 151 | + titleName = "元码数字认证"//"添加\(_listModel.name!)" |
| 144 | titleLabel.textColor = .white | 152 | titleLabel.textColor = .white |
| 145 | leftBtnWhite = true | 153 | leftBtnWhite = true |
| 146 | _status = .lightContent | 154 | _status = .lightContent |
| @@ -155,13 +163,20 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -155,13 +163,20 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 155 | make.size.equalTo(150) | 163 | make.size.equalTo(150) |
| 156 | } else { | 164 | } else { |
| 157 | make.left.top.right.equalToSuperview() | 165 | make.left.top.right.equalToSuperview() |
| 158 | - make.height.equalTo(346) | 166 | + make.height.equalTo(0)//346 |
| 159 | } | 167 | } |
| 160 | } | 168 | } |
| 169 | + | ||
| 170 | + view.addSubview(iconView) | ||
| 171 | + iconView.snp.makeConstraints { make in | ||
| 172 | + make.centerX.equalToSuperview() | ||
| 173 | + make.top.equalTo(adapt_length(length: 130)) | ||
| 174 | + } | ||
| 175 | + | ||
| 161 | view.addSubview(tipName) | 176 | view.addSubview(tipName) |
| 162 | tipName.snp.makeConstraints { make in | 177 | tipName.snp.makeConstraints { make in |
| 163 | make.centerX.equalToSuperview() | 178 | make.centerX.equalToSuperview() |
| 164 | - make.top.equalTo(mainView.snp.bottom).offset(20) | 179 | + make.top.equalTo(iconView.snp.bottom).offset(20) |
| 165 | } | 180 | } |
| 166 | 181 | ||
| 167 | view.addSubview(tipDesc) | 182 | view.addSubview(tipDesc) |
| @@ -225,6 +240,9 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -225,6 +240,9 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 225 | } | 240 | } |
| 226 | 241 | ||
| 227 | @objc func sendInfoActionMothod() { | 242 | @objc func sendInfoActionMothod() { |
| 228 | - self.navigationController?.popViewController(animated: true) | 243 | + self.navigationController?.popToRootViewController(animated: true) |
| 244 | + } | ||
| 245 | + override func ClickBackBtn() { | ||
| 246 | + self.navigationController?.popToRootViewController(animated: true) | ||
| 229 | } | 247 | } |
| 230 | } | 248 | } |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineInputViewController.swift
| @@ -35,22 +35,22 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | @@ -35,22 +35,22 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | ||
| 35 | lazy var tipLabel: UILabel = { | 35 | lazy var tipLabel: UILabel = { |
| 36 | let tipLabel = UILabel.init() | 36 | let tipLabel = UILabel.init() |
| 37 | tipLabel.textColor = HexColor("#999999") | 37 | tipLabel.textColor = HexColor("#999999") |
| 38 | - tipLabel.text = "请填写真实信息,提交完成后,不可更改!" | ||
| 39 | - tipLabel.font = Font_11_Fit | 38 | + tipLabel.text = "中国网元码保障您的信息安全" |
| 39 | + tipLabel.font = Font_12 | ||
| 40 | tipLabel.isHidden = true | 40 | tipLabel.isHidden = true |
| 41 | tipLabel.textAlignment = .center | 41 | tipLabel.textAlignment = .center |
| 42 | return tipLabel | 42 | return tipLabel |
| 43 | }() | 43 | }() |
| 44 | 44 | ||
| 45 | - lazy var sendButton: APButton = { | ||
| 46 | - let sendButton = APButton() | ||
| 47 | - sendButton.setTitle("添加身份", for: .normal) | 45 | + lazy var sendButton: UIButton = { |
| 46 | + let sendButton = UIButton() | ||
| 47 | + sendButton.setTitle("下一步", for: .normal) | ||
| 48 | sendButton.setTitleColor(.white, for: .normal) | 48 | sendButton.setTitleColor(.white, for: .normal) |
| 49 | - sendButton.titleLabel?.font = BoldFont_16_Fit | ||
| 50 | - sendButton.layer.cornerRadius = 20 | 49 | + sendButton.titleLabel?.font = Font_18 |
| 50 | + sendButton.layer.cornerRadius = 22 | ||
| 51 | sendButton.layer.masksToBounds = true | 51 | sendButton.layer.masksToBounds = true |
| 52 | sendButton.isHidden = true | 52 | sendButton.isHidden = true |
| 53 | - sendButton.activityIndicator.color = .white | 53 | + sendButton.backgroundColor = HexColor("#1961FE") |
| 54 | sendButton.addTarget(self, action: #selector(sendInfoActionMothod), for: .touchUpInside) | 54 | sendButton.addTarget(self, action: #selector(sendInfoActionMothod), for: .touchUpInside) |
| 55 | return sendButton | 55 | return sendButton |
| 56 | }() | 56 | }() |
| @@ -73,6 +73,64 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | @@ -73,6 +73,64 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | ||
| 73 | fatalError("init(coder:) has not been implemented") | 73 | fatalError("init(coder:) has not been implemented") |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | + lazy var bgImgView :UIImageView = { | ||
| 77 | + let iconImgView = UIImageView() | ||
| 78 | + iconImgView.image = UIImage(named: "auth_blueBg") | ||
| 79 | + return iconImgView | ||
| 80 | + }() | ||
| 81 | + | ||
| 82 | + lazy var yuanmaLabel: UILabel = { | ||
| 83 | + let titleLabel = UILabel() | ||
| 84 | + titleLabel.textColor = .white | ||
| 85 | + titleLabel.text = "元码数字认证" | ||
| 86 | + titleLabel.font = Font_24 | ||
| 87 | + titleLabel.adjustsFontSizeToFitWidth=true | ||
| 88 | + return titleLabel | ||
| 89 | + }() | ||
| 90 | + | ||
| 91 | + lazy var yuanmaDescLabel: UILabel = { | ||
| 92 | + let titleLabel = UILabel() | ||
| 93 | + titleLabel.textColor = .white | ||
| 94 | + titleLabel.text = "真我,连接世界\n实名认证,让信任搭建沟通的桥梁" | ||
| 95 | + titleLabel.numberOfLines = 2 | ||
| 96 | + titleLabel.font = Font_13 | ||
| 97 | + return titleLabel | ||
| 98 | + }() | ||
| 99 | + | ||
| 100 | + lazy var whiteBgView :UIView = { | ||
| 101 | + let whiteBgView = UIView() | ||
| 102 | + whiteBgView.backgroundColor = .white | ||
| 103 | + whiteBgView.layer.cornerRadius = 12 | ||
| 104 | + whiteBgView.clipsToBounds = true | ||
| 105 | + return whiteBgView | ||
| 106 | + }() | ||
| 107 | + | ||
| 108 | + lazy var whiteTopBgView :UIImageView = { | ||
| 109 | + let whiteBgView = UIImageView() | ||
| 110 | + whiteBgView.image = UIImage(named: "realName_bg") | ||
| 111 | + return whiteBgView | ||
| 112 | + }() | ||
| 113 | + lazy var whiteTopBgZGWView :UIImageView = { | ||
| 114 | + let whiteBgView = UIImageView() | ||
| 115 | + whiteBgView.image = UIImage(named: "realName_zgw") | ||
| 116 | + return whiteBgView | ||
| 117 | + }() | ||
| 118 | + lazy var whiteTopBgSFZView :UIImageView = { | ||
| 119 | + let whiteBgView = UIImageView() | ||
| 120 | + whiteBgView.image = UIImage(named: "realName_jumin") | ||
| 121 | + return whiteBgView | ||
| 122 | + }() | ||
| 123 | + lazy var tishiDescLabel: UILabel = { | ||
| 124 | + let titleLabel = UILabel() | ||
| 125 | + titleLabel.textColor = HexColor("#748DC1") | ||
| 126 | + titleLabel.text = "公安部推出的法定身份证件,由中国网元码根据国家相关法律法规要求,由特定行政机关签发,请放心使用" | ||
| 127 | + titleLabel.numberOfLines = 2 | ||
| 128 | + titleLabel.font = Font_12 | ||
| 129 | + titleLabel.adjustsFontSizeToFitWidth = true | ||
| 130 | + return titleLabel | ||
| 131 | + }() | ||
| 132 | + | ||
| 133 | + | ||
| 76 | override func viewDidLoad() { | 134 | override func viewDidLoad() { |
| 77 | super.viewDidLoad() | 135 | super.viewDidLoad() |
| 78 | 136 | ||
| @@ -81,30 +139,92 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | @@ -81,30 +139,92 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | ||
| 81 | view.backgroundColor = HexColor("#F7F8FA") | 139 | view.backgroundColor = HexColor("#F7F8FA") |
| 82 | 140 | ||
| 83 | loadStandInfoData() | 141 | loadStandInfoData() |
| 84 | - | 142 | + |
| 143 | +// setupWithSendBtnStatue(statue: false) | ||
| 144 | + | ||
| 145 | + self.view.backgroundColor = .white | ||
| 146 | + self.view.addSubview(self.bgImgView) | ||
| 147 | + self.bgImgView.snp.makeConstraints { make in | ||
| 148 | + make.top.equalTo(KNavigationHeight) | ||
| 149 | + make.left.right.equalToSuperview() | ||
| 150 | + make.height.equalTo(KSreenWidth*457/375) | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + self.view.addSubview(self.yuanmaLabel) | ||
| 154 | + self.yuanmaLabel.snp.makeConstraints { make in | ||
| 155 | + make.top.equalTo(KNavigationHeight+adapt_length(length: 45)) | ||
| 156 | + make.left.equalTo(adapt_length(length: 30)) | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + self.view.addSubview(self.yuanmaDescLabel) | ||
| 160 | + self.yuanmaDescLabel.snp.makeConstraints { make in | ||
| 161 | + make.top.equalTo(self.yuanmaLabel.snp.bottom).offset(adapt_length(length: 10)) | ||
| 162 | + make.left.equalTo(adapt_length(length: 30)) | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + self.view.addSubview(self.whiteBgView) | ||
| 166 | + self.whiteBgView.snp.makeConstraints { make in | ||
| 167 | + make.top.equalTo(self.yuanmaDescLabel.snp.bottom).offset(adapt_length(length: 31)) | ||
| 168 | + make.bottom.equalToSuperview() | ||
| 169 | + make.left.equalTo(15) | ||
| 170 | + make.right.equalToSuperview().offset(-15) | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + self.whiteBgView.addSubview(self.whiteTopBgView) | ||
| 174 | + self.whiteTopBgView.snp.makeConstraints { make in | ||
| 175 | + make.centerX.equalToSuperview() | ||
| 176 | + make.top.equalToSuperview() | ||
| 177 | + make.width.equalTo(KSreenWidth*235/375) | ||
| 178 | + make.height.equalTo(KSreenWidth*45/375) | ||
| 179 | + } | ||
| 180 | + | ||
| 181 | + self.whiteTopBgView.addSubview(self.whiteTopBgZGWView) | ||
| 182 | + self.whiteTopBgZGWView.snp.makeConstraints { make in | ||
| 183 | +// make.left.equalTo(KSreenWidth*44.5/375) | ||
| 184 | + make.centerX.equalToSuperview() | ||
| 185 | + make.centerY.equalToSuperview() | ||
| 186 | + make.width.equalTo(KSreenWidth*40.5/375) | ||
| 187 | + make.height.equalTo(KSreenWidth*30/375) | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | +// self.whiteTopBgView.addSubview(self.whiteTopBgSFZView) | ||
| 191 | +// self.whiteTopBgSFZView.snp.makeConstraints { make in | ||
| 192 | +// make.right.equalToSuperview().offset(-KSreenWidth*44.5/375) | ||
| 193 | +// make.centerY.equalToSuperview() | ||
| 194 | +// make.width.equalTo(KSreenWidth*84.5/375) | ||
| 195 | +// make.height.equalTo(KSreenWidth*25.5/375) | ||
| 196 | +// } | ||
| 197 | + self.whiteBgView.addSubview(self.tishiDescLabel) | ||
| 198 | + self.tishiDescLabel.snp.makeConstraints { make in | ||
| 199 | + make.top.equalTo(self.whiteTopBgView.snp.bottom).offset(10) | ||
| 200 | + make.left.equalTo(15) | ||
| 201 | + make.right.equalToSuperview().offset(-15) | ||
| 202 | + make.height.equalTo(33) | ||
| 203 | + } | ||
| 204 | + | ||
| 205 | + self.whiteBgView.addSubview(self.tableView) | ||
| 206 | + self.tableView.snp.makeConstraints { make in | ||
| 207 | + make.top.equalTo(self.tishiDescLabel.snp.bottom).offset(10) | ||
| 208 | + make.left.equalToSuperview() | ||
| 209 | + make.right.equalToSuperview() | ||
| 210 | + make.height.equalTo(122*2+50) | ||
| 211 | + } | ||
| 212 | + | ||
| 213 | + | ||
| 85 | view.addSubview(sendButton) | 214 | view.addSubview(sendButton) |
| 86 | sendButton.snp.makeConstraints { make in | 215 | sendButton.snp.makeConstraints { make in |
| 87 | - make.bottom.equalToSuperview().offset(-get_system_tabbar_ui_offsetHeight() - 20) | ||
| 88 | - make.left.equalToSuperview().offset(10) | ||
| 89 | - make.right.equalToSuperview().offset(-10) | ||
| 90 | - make.height.equalTo(40) | 216 | + make.bottom.equalToSuperview().offset(-42) |
| 217 | + make.left.equalToSuperview().offset(15) | ||
| 218 | + make.right.equalToSuperview().offset(-15) | ||
| 219 | + make.height.equalTo(44) | ||
| 91 | } | 220 | } |
| 92 | 221 | ||
| 93 | view.addSubview(tipLabel) | 222 | view.addSubview(tipLabel) |
| 94 | tipLabel.snp.makeConstraints { make in | 223 | tipLabel.snp.makeConstraints { make in |
| 95 | - make.bottom.equalTo(sendButton.snp.top).offset(-10) | 224 | + make.top.equalTo(sendButton.snp.bottom).offset(10) |
| 96 | make.centerX.equalToSuperview() | 225 | make.centerX.equalToSuperview() |
| 97 | make.left.right.equalToSuperview() | 226 | make.left.right.equalToSuperview() |
| 98 | } | 227 | } |
| 99 | - | ||
| 100 | - setupWithSendBtnStatue(statue: false) | ||
| 101 | - | ||
| 102 | - view.addSubview(tableView) | ||
| 103 | - tableView.snp.makeConstraints { make in | ||
| 104 | - make.top.equalTo(get_system_nav_height()) | ||
| 105 | - make.left.right.equalToSuperview() | ||
| 106 | - make.bottom.equalTo(tipLabel.snp.top).offset(-10) | ||
| 107 | - } | ||
| 108 | } | 228 | } |
| 109 | 229 | ||
| 110 | private func loadStandInfoData() { | 230 | private func loadStandInfoData() { |
| @@ -126,25 +246,25 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | @@ -126,25 +246,25 @@ class CNLiveMineInputViewController : CNLiveBaseViewController, UITableViewDeleg | ||
| 126 | } | 246 | } |
| 127 | } | 247 | } |
| 128 | 248 | ||
| 129 | - private func setupWithSendBtnStatue(statue: Bool) { | ||
| 130 | - var alpha = 0.3 | ||
| 131 | - if statue { | ||
| 132 | - alpha = 1 | ||
| 133 | - } | ||
| 134 | - sendButton.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: alpha),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: alpha)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 135 | - sendButton.isUserInteractionEnabled = statue | ||
| 136 | - } | 249 | +// private func setupWithSendBtnStatue(statue: Bool) { |
| 250 | +// var alpha = 0.3 | ||
| 251 | +// if statue { | ||
| 252 | +// alpha = 1 | ||
| 253 | +// } | ||
| 254 | +// sendButton.setGradient(colors: [UIColor(red: 103/255.0, green: 197/255.0, blue: 255/255.0, alpha: alpha),UIColor(red: 96/255.0, green: 154/255.0, blue: 255/255.0, alpha: alpha)], startPoint: CGPoint(x: 0, y: 0.5), endPoint: CGPoint(x: 1, y: 0.5)) | ||
| 255 | +// sendButton.isUserInteractionEnabled = statue | ||
| 256 | +// } | ||
| 137 | 257 | ||
| 138 | @objc func sendInfoActionMothod() { | 258 | @objc func sendInfoActionMothod() { |
| 139 | setupWithContentUploadImage { [self] url in | 259 | setupWithContentUploadImage { [self] url in |
| 140 | if (self.tempCell != nil) { | 260 | if (self.tempCell != nil) { |
| 141 | self.tempCell._infoModel?.value = url | 261 | self.tempCell._infoModel?.value = url |
| 142 | } | 262 | } |
| 143 | - sendButton.startAnimating() | 263 | +// sendButton.startAnimating() |
| 144 | CNLiveMineViewModel.requestsPOSTAuthInfo(identityId: "\(_listModel.id)", infos: self.dataArray) { [self] result, respStatue in | 264 | CNLiveMineViewModel.requestsPOSTAuthInfo(identityId: "\(_listModel.id)", infos: self.dataArray) { [self] result, respStatue in |
| 145 | if respStatue == .success { | 265 | if respStatue == .success { |
| 146 | showMessage(message: "上传成功") | 266 | showMessage(message: "上传成功") |
| 147 | - sendButton.stopAnimating() | 267 | +// sendButton.stopAnimating() |
| 148 | DispatchQueue.main.asyncAfter(deadline: .now()+1) { [self] in | 268 | DispatchQueue.main.asyncAfter(deadline: .now()+1) { [self] in |
| 149 | self.navigationController?.pushViewController(CNLiveMineAuthResultViewController.init(_listModel,show_type: .result_success, authType: _authType), animated: true) | 269 | self.navigationController?.pushViewController(CNLiveMineAuthResultViewController.init(_listModel,show_type: .result_success, authType: _authType), animated: true) |
| 150 | } | 270 | } |
| @@ -197,8 +317,8 @@ extension CNLiveMineInputViewController { | @@ -197,8 +317,8 @@ extension CNLiveMineInputViewController { | ||
| 197 | let cell = tableView.dequeueReusableCell(withIdentifier: CNLiveMineInputViewController.kMineBodyInputAuthCellIdentifier+"\(indexPath.row)") as! MineBodyInputAuthCell | 317 | let cell = tableView.dequeueReusableCell(withIdentifier: CNLiveMineInputViewController.kMineBodyInputAuthCellIdentifier+"\(indexPath.row)") as! MineBodyInputAuthCell |
| 198 | cell.setListModel(infoModel: self.dataArray[indexPath.row] as! MineStandInfoModel, is_last: indexPath.row == self.dataArray.count - 1) {[weak self] type in | 318 | cell.setListModel(infoModel: self.dataArray[indexPath.row] as! MineStandInfoModel, is_last: indexPath.row == self.dataArray.count - 1) {[weak self] type in |
| 199 | if type == .end { | 319 | if type == .end { |
| 200 | - let is_result = self?.inspectResult() | ||
| 201 | - self?.setupWithSendBtnStatue(statue: is_result ?? true) | 320 | +// let is_result = self?.inspectResult() |
| 321 | +// self?.setupWithSendBtnStatue(statue: is_result ?? true) | ||
| 202 | } | 322 | } |
| 203 | if type == .select { | 323 | if type == .select { |
| 204 | var crop = PhotoCroppingConfiguration.init() | 324 | var crop = PhotoCroppingConfiguration.init() |
| @@ -242,8 +362,8 @@ extension CNLiveMineInputViewController { | @@ -242,8 +362,8 @@ extension CNLiveMineInputViewController { | ||
| 242 | MineStandListAlertView.showStandListView(infos: infoModel.children as NSArray,name: "选择\(infoModel.name ?? "")", show_type: show_type) {[weak self] text in | 362 | MineStandListAlertView.showStandListView(infos: infoModel.children as NSArray,name: "选择\(infoModel.name ?? "")", show_type: show_type) {[weak self] text in |
| 243 | infoModel.value = text as? String | 363 | infoModel.value = text as? String |
| 244 | self?.tableView.reloadData() | 364 | self?.tableView.reloadData() |
| 245 | - let is_result = self?.inspectResult() | ||
| 246 | - self?.setupWithSendBtnStatue(statue: is_result ?? true) | 365 | +// let is_result = self?.inspectResult() |
| 366 | +// self?.setupWithSendBtnStatue(statue: is_result ?? true) | ||
| 247 | } | 367 | } |
| 248 | } | 368 | } |
| 249 | } | 369 | } |
metaCode/Classes/Main/MinePage/View/CNLiveMineBodyListView.swift
| @@ -827,10 +827,10 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | @@ -827,10 +827,10 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | ||
| 827 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | 827 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
| 828 | super.init(style: style, reuseIdentifier: reuseIdentifier) | 828 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| 829 | selectionStyle = .none | 829 | selectionStyle = .none |
| 830 | - backgroundColor = .clear | ||
| 831 | - contentView.backgroundColor = .clear | 830 | + backgroundColor = .white |
| 831 | + contentView.backgroundColor = .white | ||
| 832 | 832 | ||
| 833 | - addSubview(mainView) | 833 | + contentView.addSubview(mainView) |
| 834 | mainView.addSubview(nameLabel) | 834 | mainView.addSubview(nameLabel) |
| 835 | mainView.addSubview(moreBtn) | 835 | mainView.addSubview(moreBtn) |
| 836 | mainView.addSubview(contentField) | 836 | mainView.addSubview(contentField) |
| @@ -889,13 +889,13 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | @@ -889,13 +889,13 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | ||
| 889 | contentTextView.isHidden = false | 889 | contentTextView.isHidden = false |
| 890 | nameLabel.snp.remakeConstraints { make in | 890 | nameLabel.snp.remakeConstraints { make in |
| 891 | make.top.equalToSuperview().offset(adapt_length(length: 10)) | 891 | make.top.equalToSuperview().offset(adapt_length(length: 10)) |
| 892 | - make.left.equalToSuperview().offset(15) | 892 | + make.left.equalToSuperview() |
| 893 | } | 893 | } |
| 894 | contentTextView.snp.remakeConstraints { make in | 894 | contentTextView.snp.remakeConstraints { make in |
| 895 | make.centerX.equalToSuperview() | 895 | make.centerX.equalToSuperview() |
| 896 | make.top.equalTo(nameLabel.snp.bottom).offset(adapt_length(length: 10)) | 896 | make.top.equalTo(nameLabel.snp.bottom).offset(adapt_length(length: 10)) |
| 897 | make.left.equalToSuperview().offset(adapt_length(length: 10)) | 897 | make.left.equalToSuperview().offset(adapt_length(length: 10)) |
| 898 | - make.bottom.right.equalToSuperview().offset(-adapt_length(length: 10)) | 898 | + make.bottom.right.equalToSuperview() |
| 899 | } | 899 | } |
| 900 | } | 900 | } |
| 901 | } | 901 | } |
| @@ -904,8 +904,8 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | @@ -904,8 +904,8 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | ||
| 904 | mainView.snp.makeConstraints { make in | 904 | mainView.snp.makeConstraints { make in |
| 905 | make.top.equalToSuperview() | 905 | make.top.equalToSuperview() |
| 906 | make.bottom.equalToSuperview() | 906 | make.bottom.equalToSuperview() |
| 907 | - make.left.equalToSuperview().offset(10) | ||
| 908 | - make.right.equalToSuperview().offset(-10) | 907 | + make.left.equalToSuperview() |
| 908 | + make.right.equalToSuperview() | ||
| 909 | } | 909 | } |
| 910 | nameLabel.snp.makeConstraints { make in | 910 | nameLabel.snp.makeConstraints { make in |
| 911 | make.centerY.equalToSuperview() | 911 | make.centerY.equalToSuperview() |
| @@ -918,10 +918,12 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | @@ -918,10 +918,12 @@ class MineBodyInputAuthCell: UITableViewCell, UITextFieldDelegate, QMUITextViewD | ||
| 918 | contentField.snp.makeConstraints { make in | 918 | contentField.snp.makeConstraints { make in |
| 919 | make.centerY.equalToSuperview() | 919 | make.centerY.equalToSuperview() |
| 920 | make.right.equalToSuperview().offset(-10) | 920 | make.right.equalToSuperview().offset(-10) |
| 921 | + make.left.greaterThanOrEqualTo(self.nameLabel.snp.right).offset(5) | ||
| 921 | } | 922 | } |
| 922 | contentTextView.snp.makeConstraints { make in | 923 | contentTextView.snp.makeConstraints { make in |
| 923 | make.centerY.equalToSuperview() | 924 | make.centerY.equalToSuperview() |
| 924 | make.right.equalToSuperview().offset(-10) | 925 | make.right.equalToSuperview().offset(-10) |
| 926 | + make.left.lessThanOrEqualTo(self.nameLabel.snp.right).offset(5) | ||
| 925 | } | 927 | } |
| 926 | moreBtn.snp.makeConstraints { make in | 928 | moreBtn.snp.makeConstraints { make in |
| 927 | make.centerY.equalToSuperview() | 929 | make.centerY.equalToSuperview() |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
| @@ -267,7 +267,7 @@ class MineAuthenticationsChildModel: BaseModel { | @@ -267,7 +267,7 @@ class MineAuthenticationsChildModel: BaseModel { | ||
| 267 | var identities = [MineAuthenticationsChildIdentitiesModel]()//三级 | 267 | var identities = [MineAuthenticationsChildIdentitiesModel]()//三级 |
| 268 | } | 268 | } |
| 269 | class MineAuthenticationsChildIdentitiesModel: BaseModel { | 269 | class MineAuthenticationsChildIdentitiesModel: BaseModel { |
| 270 | - var id: Int = 0 | 270 | + var id: String = "" |
| 271 | var industryId: Int = 0 | 271 | var industryId: Int = 0 |
| 272 | var name: String = "" | 272 | var name: String = "" |
| 273 | var icon: String = "" | 273 | var icon: String = "" |
| @@ -276,7 +276,7 @@ class MineAuthenticationsChildIdentitiesModel: BaseModel { | @@ -276,7 +276,7 @@ class MineAuthenticationsChildIdentitiesModel: BaseModel { | ||
| 276 | var status: Int = 0 | 276 | var status: Int = 0 |
| 277 | var sort: Int = 0 | 277 | var sort: Int = 0 |
| 278 | var type: Int = 0 | 278 | var type: Int = 0 |
| 279 | - var userAuth: Int = 0 | 279 | + var userAuth: Int = -1//是否已认证 null 为进行认证操作 0正在审核 1 审核成功 -1审核失败 null与-1 前端可做同一状态处理 |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | // !!!: /api/identityApi/getUserMsg 接口标记 身份信息 | 282 | // !!!: /api/identityApi/getUserMsg 接口标记 身份信息 |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
| @@ -25,6 +25,7 @@ enum CNLiveMineResponseType { | @@ -25,6 +25,7 @@ enum CNLiveMineResponseType { | ||
| 25 | case failed | 25 | case failed |
| 26 | case noNetwork | 26 | case noNetwork |
| 27 | case unkonw | 27 | case unkonw |
| 28 | + case reviewing//审核中 | ||
| 28 | } | 29 | } |
| 29 | enum CNLiveMineGetWriteType { | 30 | enum CNLiveMineGetWriteType { |
| 30 | case nodate //未填写 | 31 | case nodate //未填写 |
| @@ -644,8 +645,9 @@ class CNLiveMineViewModel: NSObject { | @@ -644,8 +645,9 @@ class CNLiveMineViewModel: NSObject { | ||
| 644 | static func requestsPOSTAuthInfo(identityId: String,infos: NSArray, resultBlock: @escaping resultNewsBlock) { | 645 | static func requestsPOSTAuthInfo(identityId: String,infos: NSArray, resultBlock: @escaping resultNewsBlock) { |
| 645 | 646 | ||
| 646 | let values = NSMutableDictionary() | 647 | let values = NSMutableDictionary() |
| 647 | - values.addEntries(from: ["sid":UserInfoManager.shared.userInfo.uid]) | ||
| 648 | values.addEntries(from: ["identityId":identityId]) | 648 | values.addEntries(from: ["identityId":identityId]) |
| 649 | + values.addEntries(from: ["sid":UserInfoManager.shared.userInfo.uid]) | ||
| 650 | + values.addEntries(from: ["vsid":UserInfoManager.shared.userInfo.currentUser?.vsid ?? ""]) | ||
| 649 | let temp_array = NSMutableArray() | 651 | let temp_array = NSMutableArray() |
| 650 | for info in infos { | 652 | for info in infos { |
| 651 | let value = (info as! MineStandInfoModel).value ?? "" | 653 | let value = (info as! MineStandInfoModel).value ?? "" |
| @@ -768,6 +770,7 @@ class CNLiveMineViewModel: NSObject { | @@ -768,6 +770,7 @@ class CNLiveMineViewModel: NSObject { | ||
| 768 | static func requestsStandInfo(identityId: String, type: CNLiveMineGetWriteType, authType: CNLiveMineInputAuthType,resultBlock: @escaping resultNewsBlock) { | 770 | static func requestsStandInfo(identityId: String, type: CNLiveMineGetWriteType, authType: CNLiveMineInputAuthType,resultBlock: @escaping resultNewsBlock) { |
| 769 | let param = NSMutableDictionary() | 771 | let param = NSMutableDictionary() |
| 770 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 772 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 773 | + param.setValue(UserInfoManager.shared.userInfo.currentUser?.vsid, forKey: "vsid") | ||
| 771 | param.setValue(identityId, forKey: "identityId") | 774 | param.setValue(identityId, forKey: "identityId") |
| 772 | let custom_param = NSMutableDictionary() | 775 | let custom_param = NSMutableDictionary() |
| 773 | custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") | 776 | custom_param.setValue(CNLiveMCEnvironmentManager.shared.appId, forKey: "appId") |
| @@ -842,9 +845,11 @@ class CNLiveMineViewModel: NSObject { | @@ -842,9 +845,11 @@ class CNLiveMineViewModel: NSObject { | ||
| 842 | } | 845 | } |
| 843 | } else { | 846 | } else { |
| 844 | if CNLiveNetworking.isNetworking() { | 847 | if CNLiveNetworking.isNetworking() { |
| 845 | - let resp = result as! NSDictionary | ||
| 846 | - showMessage(message: resp["errorMessage"] as! String) | ||
| 847 | - resultBlock(NSNull(),.failed) | 848 | + showMessage(message: "请求失败") |
| 849 | +// if let resp = result as? NSDictionary{ | ||
| 850 | +// showMessage(message: resp["errorMessage"] as! String) | ||
| 851 | +// resultBlock(NSNull(),.failed) | ||
| 852 | +// } | ||
| 848 | } else { | 853 | } else { |
| 849 | showMessage(message: "似乎与网络断开链接") | 854 | showMessage(message: "似乎与网络断开链接") |
| 850 | resultBlock(NSNull(),.noNetwork) | 855 | resultBlock(NSNull(),.noNetwork) |
| @@ -955,15 +960,19 @@ class CNLiveMineViewModel: NSObject { | @@ -955,15 +960,19 @@ class CNLiveMineViewModel: NSObject { | ||
| 955 | CNLiveMineViewModel.requestsStandInfo(identityId: id, type: .effect, authType: authType) { result, respStatue in | 960 | CNLiveMineViewModel.requestsStandInfo(identityId: id, type: .effect, authType: authType) { result, respStatue in |
| 956 | if respStatue == .success { | 961 | if respStatue == .success { |
| 957 | let listBaseModel = result as! MineStandInfoBaseModel | 962 | let listBaseModel = result as! MineStandInfoBaseModel |
| 958 | - if listBaseModel.authTime > 0 {//|| listBaseModel.code.count > 0 { | ||
| 959 | - showMessage(message: listBaseModel.name.count > 0 ? "恭喜您通过认证,您已是\(listBaseModel.name )" : "恭喜您通过认证") | 963 | + if listBaseModel.userStatus >= 0 {//|| listBaseModel.code.count > 0 { |
| 964 | +// showMessage(message: listBaseModel.name.count > 0 ? "恭喜您通过认证,您已是\(listBaseModel.name )" : "恭喜您通过认证") | ||
| 960 | resultBlock(listBaseModel, .success) | 965 | resultBlock(listBaseModel, .success) |
| 961 | NotificationCenter.default.post(name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) | 966 | NotificationCenter.default.post(name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) |
| 962 | - } else { | 967 | + } else if listBaseModel.userStatus == -1 { |
| 963 | showMessage(message: "审核失败,请您修改后重新提交") | 968 | showMessage(message: "审核失败,请您修改后重新提交") |
| 964 | resultBlock(listBaseModel, .failed) | 969 | resultBlock(listBaseModel, .failed) |
| 965 | NotificationCenter.default.post(name: Notification.Name.StandAuth.StandAuthNotificationUnSuccess, object: nil) | 970 | NotificationCenter.default.post(name: Notification.Name.StandAuth.StandAuthNotificationUnSuccess, object: nil) |
| 966 | - } | 971 | + } |
| 972 | +// else if listBaseModel.userStatus == 0 {//审核中 | ||
| 973 | +// resultBlock(listBaseModel, .reviewing) | ||
| 974 | +// NotificationCenter.default.post(name: Notification.Name.StandAuth.StandAuthNotificationUnSuccess, object: nil) | ||
| 975 | +// } | ||
| 967 | } | 976 | } |
| 968 | } | 977 | } |
| 969 | } | 978 | } |
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_add.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "auth_add@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "auth_add@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/AuthPage/auth_add.imageset/auth_add@2x.png
0 → 100644
4.7 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_add.imageset/auth_add@3x.png
0 → 100644
9.03 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_alert_unOpen.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "auth_alert_unOpen@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "auth_alert_unOpen@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/AuthPage/auth_alert_unOpen.imageset/auth_alert_unOpen@2x.png
0 → 100644
29.5 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_alert_unOpen.imageset/auth_alert_unOpen@3x.png
0 → 100644
56.8 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_realIcon.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "auth_realIcon@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "auth_realIcon@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/AuthPage/auth_realIcon.imageset/auth_realIcon@2x.png
0 → 100644
15.7 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_realIcon.imageset/auth_realIcon@3x.png
0 → 100644
33.2 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_shenhezhong.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "auth_shenhezhong@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "auth_shenhezhong@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/AuthPage/auth_shenhezhong.imageset/auth_shenhezhong@2x.png
0 → 100644
51.7 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_shenhezhong.imageset/auth_shenhezhong@3x.png
0 → 100644
98.6 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_zhengshu.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "auth_zhengshu@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "filename" : "auth_zhengshu@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/AuthPage/auth_zhengshu.imageset/auth_zhengshu@2x.png
0 → 100644
18.6 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_zhengshu.imageset/auth_zhengshu@3x.png
0 → 100644
38 KB