Commit 629643d74c7937e52dc726de56dbd4ce11d38056
1 parent
1d7d00f3
实名认证页面
Showing
9 changed files
with
294 additions
and
9 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -103,6 +103,8 @@ | @@ -103,6 +103,8 @@ | ||
| 103 | 1941348A2C200E4E004FC047 /* CNLiveDigitalFirstCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134892C200E4E004FC047 /* CNLiveDigitalFirstCell.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 */; }; | 104 | 1941348C2C20261C004FC047 /* CNLiveDigitalSecCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941348B2C20261C004FC047 /* CNLiveDigitalSecCell.swift */; }; |
| 105 | 1941348E2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */; }; | 105 | 1941348E2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */; }; |
| 106 | + 194134902C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1941348F2C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift */; }; | ||
| 107 | + 194134922C22C920004FC047 /* CNLiveDigitalMineRealNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194134912C22C920004FC047 /* CNLiveDigitalMineRealNameCell.swift */; }; | ||
| 106 | 194455A12B6B3310006C5A2A /* CNWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194455A02B6B3310006C5A2A /* CNWebView.swift */; }; | 108 | 194455A12B6B3310006C5A2A /* CNWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 194455A02B6B3310006C5A2A /* CNWebView.swift */; }; |
| 107 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; | 109 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */; }; |
| 108 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; | 110 | 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */; }; |
| @@ -405,6 +407,8 @@ | @@ -405,6 +407,8 @@ | ||
| 405 | 194134892C200E4E004FC047 /* CNLiveDigitalFirstCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalFirstCell.swift; sourceTree = "<group>"; }; | 407 | 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>"; }; | 408 | 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>"; }; | 409 | 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalSecCollectionCell.swift; sourceTree = "<group>"; }; |
| 410 | + 1941348F2C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalMineRealNameController.swift; sourceTree = "<group>"; }; | ||
| 411 | + 194134912C22C920004FC047 /* CNLiveDigitalMineRealNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveDigitalMineRealNameCell.swift; sourceTree = "<group>"; }; | ||
| 408 | 194455A02B6B3310006C5A2A /* CNWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNWebView.swift; sourceTree = "<group>"; }; | 412 | 194455A02B6B3310006C5A2A /* CNWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNWebView.swift; sourceTree = "<group>"; }; |
| 409 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; | 413 | 19565EBF2AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailBtnsCell.swift; sourceTree = "<group>"; }; |
| 410 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; | 414 | 19565EC12AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopDetailOrderAssetCell.swift; sourceTree = "<group>"; }; |
| @@ -1101,6 +1105,7 @@ | @@ -1101,6 +1105,7 @@ | ||
| 1101 | 19C735CD2C12D19D00CACF4E /* CNLiveRealNameAuthController.swift */, | 1105 | 19C735CD2C12D19D00CACF4E /* CNLiveRealNameAuthController.swift */, |
| 1102 | 194134772C17F83B004FC047 /* CNLiveFaceAuthController.swift */, | 1106 | 194134772C17F83B004FC047 /* CNLiveFaceAuthController.swift */, |
| 1103 | 194134872C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift */, | 1107 | 194134872C1FE4E7004FC047 /* CNLiveDigitalAssetsController.swift */, |
| 1108 | + 1941348F2C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift */, | ||
| 1104 | ); | 1109 | ); |
| 1105 | path = DigitalAuth; | 1110 | path = DigitalAuth; |
| 1106 | sourceTree = "<group>"; | 1111 | sourceTree = "<group>"; |
| @@ -1123,6 +1128,7 @@ | @@ -1123,6 +1128,7 @@ | ||
| 1123 | 194134892C200E4E004FC047 /* CNLiveDigitalFirstCell.swift */, | 1128 | 194134892C200E4E004FC047 /* CNLiveDigitalFirstCell.swift */, |
| 1124 | 1941348B2C20261C004FC047 /* CNLiveDigitalSecCell.swift */, | 1129 | 1941348B2C20261C004FC047 /* CNLiveDigitalSecCell.swift */, |
| 1125 | 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */, | 1130 | 1941348D2C2165EE004FC047 /* CNLiveDigitalSecCollectionCell.swift */, |
| 1131 | + 194134912C22C920004FC047 /* CNLiveDigitalMineRealNameCell.swift */, | ||
| 1126 | ); | 1132 | ); |
| 1127 | path = DigitalAuthViews; | 1133 | path = DigitalAuthViews; |
| 1128 | sourceTree = "<group>"; | 1134 | sourceTree = "<group>"; |
| @@ -1890,6 +1896,7 @@ | @@ -1890,6 +1896,7 @@ | ||
| 1890 | 7989B5C72A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift in Sources */, | 1896 | 7989B5C72A4BDC7200A19B10 /* CNLiveMineEarnListViewController.swift in Sources */, |
| 1891 | 191733502B2C3E1F007BCC04 /* CNLivePickerView.swift in Sources */, | 1897 | 191733502B2C3E1F007BCC04 /* CNLivePickerView.swift in Sources */, |
| 1892 | 191733622B3538DC007BCC04 /* CNLiveShopCouponsManagerViewController.swift in Sources */, | 1898 | 191733622B3538DC007BCC04 /* CNLiveShopCouponsManagerViewController.swift in Sources */, |
| 1899 | + 194134922C22C920004FC047 /* CNLiveDigitalMineRealNameCell.swift in Sources */, | ||
| 1893 | 191732902B0348F6007BCC04 /* CNLiveSwitchView.swift in Sources */, | 1900 | 191732902B0348F6007BCC04 /* CNLiveSwitchView.swift in Sources */, |
| 1894 | 19C0F76B2BDB432A0097CC8F /* CNLiveMineBindingManagerController.swift in Sources */, | 1901 | 19C0F76B2BDB432A0097CC8F /* CNLiveMineBindingManagerController.swift in Sources */, |
| 1895 | 792B53282AFCD7640009AB49 /* CNLiveShopOrderExpressDetailViewController.swift in Sources */, | 1902 | 792B53282AFCD7640009AB49 /* CNLiveShopOrderExpressDetailViewController.swift in Sources */, |
| @@ -1901,6 +1908,7 @@ | @@ -1901,6 +1908,7 @@ | ||
| 1901 | 798A44FB2A30999900815935 /* CNLiveAlertTool.swift in Sources */, | 1908 | 798A44FB2A30999900815935 /* CNLiveAlertTool.swift in Sources */, |
| 1902 | 191732EB2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift in Sources */, | 1909 | 191732EB2B070943007BCC04 /* CNLiveShopGoodsManageDetailsGoodsCategoryModel.swift in Sources */, |
| 1903 | 19AD65AA2BA041210045A444 /* CNLiveGoodsDetailsTableViewCell.swift in Sources */, | 1910 | 19AD65AA2BA041210045A444 /* CNLiveGoodsDetailsTableViewCell.swift in Sources */, |
| 1911 | + 194134902C22C25A004FC047 /* CNLiveDigitalMineRealNameController.swift in Sources */, | ||
| 1904 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */, | 1912 | 19565EC02AF4DE0E007D6727 /* CNLiveShopDetailBtnsCell.swift in Sources */, |
| 1905 | 191732E92B0706B3007BCC04 /* CNLiveShopClassifyCell.swift in Sources */, | 1913 | 191732E92B0706B3007BCC04 /* CNLiveShopClassifyCell.swift in Sources */, |
| 1906 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */, | 1914 | 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */, |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveDigitalAssetsController.swift
| @@ -45,14 +45,6 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | @@ -45,14 +45,6 @@ class CNLiveDigitalAssetsController:CNLiveBaseViewController, UITableViewDataSou | ||
| 45 | navigationBarHidden = false | 45 | navigationBarHidden = false |
| 46 | titleName = "元码数字认证" | 46 | titleName = "元码数字认证" |
| 47 | 47 | ||
| 48 | - if UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers.count ?? 0 > 0{ | ||
| 49 | - //实名认证过 | ||
| 50 | - | ||
| 51 | - }else{ | ||
| 52 | - //未实名认证 | ||
| 53 | - | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | self.initUI() | 48 | self.initUI() |
| 57 | self.loadData() | 49 | self.loadData() |
| 58 | } | 50 | } |
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/CNLiveDigitalMineRealNameController.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveDigitalMineRealNameController.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/6/19. | ||
| 6 | +// 我的实名认证 | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +class CNLiveDigitalMineRealNameController:CNLiveBaseViewController,UITableViewDataSource,UITableViewDelegate{ | ||
| 10 | + | ||
| 11 | + lazy var dataArray :NSMutableArray = { | ||
| 12 | + let dataArray = NSMutableArray() | ||
| 13 | + return dataArray | ||
| 14 | + }() | ||
| 15 | + let kCNLiveDigitalMineRealNameCellIdentifier = "kCNLiveDigitalMineRealNameCellIdentifier" | ||
| 16 | + lazy var tableView : UITableView = { | ||
| 17 | + let tableView = UITableView(frame: CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight), style: .plain) | ||
| 18 | + tableView.dataSource = self | ||
| 19 | + tableView.delegate = self | ||
| 20 | + tableView.separatorStyle = .none | ||
| 21 | + tableView.tableFooterView = UIView.init() | ||
| 22 | + tableView.register(CNLiveDigitalMineRealNameCell.self, forCellReuseIdentifier: kCNLiveDigitalMineRealNameCellIdentifier) | ||
| 23 | + tableView.backgroundColor = HexColor("#F9F9F9") | ||
| 24 | + return tableView | ||
| 25 | + }() | ||
| 26 | + | ||
| 27 | + override func viewDidLoad() { | ||
| 28 | + super.viewDidLoad() | ||
| 29 | + navigationBarHidden = false | ||
| 30 | + titleName = "我的实名认证" | ||
| 31 | + | ||
| 32 | + self.view.addSubview(self.tableView) | ||
| 33 | + | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + deinit { | ||
| 37 | + | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
| 41 | + return UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers.count ?? 0 | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
| 45 | + guard let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveDigitalMineRealNameCellIdentifier) as? CNLiveDigitalMineRealNameCell | ||
| 46 | + else { | ||
| 47 | + let cell = CNLiveDigitalMineRealNameCell() | ||
| 48 | + return cell | ||
| 49 | + } | ||
| 50 | + let userMdl = UserInfoManager.shared.userInfo.userMsgUsers?.verifyUsers[indexPath.row] | ||
| 51 | + cell.userMdl = userMdl | ||
| 52 | + return cell | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
| 56 | + | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
| 60 | + return 167 | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | +} |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/CNLiveDigitalFirstCell.swift
| @@ -210,7 +210,7 @@ class CNLiveDigitalFirstCell: UITableViewCell { | @@ -210,7 +210,7 @@ class CNLiveDigitalFirstCell: UITableViewCell { | ||
| 210 | } | 210 | } |
| 211 | //实名认证页面 | 211 | //实名认证页面 |
| 212 | @objc func realNameViewAction(){ | 212 | @objc func realNameViewAction(){ |
| 213 | - | 213 | + navigationViewController().pushViewController(CNLiveDigitalMineRealNameController(), animated: true) |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | 216 |
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/CNLiveDigitalMineRealNameCell.swift
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveDigitalMineRealNameCell.swift | ||
| 3 | +// metaCode | ||
| 4 | +// | ||
| 5 | +// Created by zx on 2024/6/19. | ||
| 6 | +// 我的实名认证 页面cell | ||
| 7 | + | ||
| 8 | +import Foundation | ||
| 9 | +import SnapKit | ||
| 10 | + | ||
| 11 | +class CNLiveDigitalMineRealNameCell:UITableViewCell{ | ||
| 12 | + | ||
| 13 | + var _userMdl : MineGetUserMsgVerifyUsersModel? | ||
| 14 | + var userMdl : MineGetUserMsgVerifyUsersModel? { | ||
| 15 | + get{ | ||
| 16 | + _userMdl | ||
| 17 | + } | ||
| 18 | + set{ | ||
| 19 | + _userMdl = newValue! | ||
| 20 | + setupNewUI(model: _userMdl!) | ||
| 21 | + } | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + lazy var whiteView :UIView = { | ||
| 25 | + let whiteView = UIView(frame: CGRect(x: 15, y:0, width: KSreenWidth-30, height:152+15 )) | ||
| 26 | + whiteView.backgroundColor = .white | ||
| 27 | + whiteView.layer.cornerRadius = 12 | ||
| 28 | + whiteView.clipsToBounds = true | ||
| 29 | + return whiteView | ||
| 30 | + }() | ||
| 31 | + lazy var authNameTitleLabel: UILabel = { | ||
| 32 | + let titleLabel = UILabel() | ||
| 33 | + titleLabel.textColor = HexColor("#333333") | ||
| 34 | + titleLabel.textAlignment = .center | ||
| 35 | + titleLabel.text = "我的实名认证" | ||
| 36 | + titleLabel.font = UIFont(name: "PingFangSC-Medium", size: 17.0) | ||
| 37 | + return titleLabel | ||
| 38 | + }() | ||
| 39 | + lazy var yanjingBtn: UIButton = { | ||
| 40 | + let closeBtn = UIButton(type: .custom) | ||
| 41 | + closeBtn.frame = CGRect(x: 0, y: 0, width: 27+20, height: 24+10) | ||
| 42 | + closeBtn.setImage(UIImage(named: "auth_real_biyan"), for: .normal) | ||
| 43 | + closeBtn.setImage(UIImage(named: "auth_real_zhengyan"), for: .selected) | ||
| 44 | + closeBtn.addTarget(self, action: #selector(yanjingBtnAction), for: .touchUpInside) | ||
| 45 | + return closeBtn | ||
| 46 | + }() | ||
| 47 | + | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + lazy var nameBgView :UIView = { | ||
| 51 | + let whiteView = UIView() | ||
| 52 | + whiteView.backgroundColor = HexColor("#F4F7FE") | ||
| 53 | + whiteView.layer.cornerRadius = 12 | ||
| 54 | + whiteView.clipsToBounds = true | ||
| 55 | + return whiteView | ||
| 56 | + }() | ||
| 57 | + lazy var nameTitleLabel: UILabel = { | ||
| 58 | + let titleLabel = UILabel() | ||
| 59 | + titleLabel.textColor = HexColor("#333333") | ||
| 60 | + titleLabel.textAlignment = .left | ||
| 61 | + titleLabel.text = "" | ||
| 62 | + titleLabel.font = Font_15 | ||
| 63 | + return titleLabel | ||
| 64 | + }() | ||
| 65 | + lazy var idTitleLabel: UILabel = { | ||
| 66 | + let titleLabel = UILabel() | ||
| 67 | + titleLabel.textColor = HexColor("#333333") | ||
| 68 | + titleLabel.textAlignment = .left | ||
| 69 | + titleLabel.text = "" | ||
| 70 | + titleLabel.font = Font_15 | ||
| 71 | + return titleLabel | ||
| 72 | + }() | ||
| 73 | + lazy var nameLineView :UIView = { | ||
| 74 | + let whiteView = UIView() | ||
| 75 | + whiteView.backgroundColor = HexColor("#1961FE") | ||
| 76 | + return whiteView | ||
| 77 | + }() | ||
| 78 | + | ||
| 79 | + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
| 80 | + super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
| 81 | + self.selectionStyle = .none | ||
| 82 | + self.contentView.backgroundColor = .clear | ||
| 83 | + self.backgroundColor = .clear | ||
| 84 | + self.initUI() | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + required init?(coder: NSCoder) { | ||
| 88 | + fatalError("init(coder:) has not been implemented") | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + func initUI(){ | ||
| 92 | + self.contentView.addSubview(self.whiteView) | ||
| 93 | + self.whiteView.addSubview(self.authNameTitleLabel) | ||
| 94 | + self.authNameTitleLabel.snp.makeConstraints { make in | ||
| 95 | + make.left.equalTo(15) | ||
| 96 | + make.top.equalTo(15) | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + self.whiteView.addSubview(self.yanjingBtn) | ||
| 100 | + self.yanjingBtn.snp.makeConstraints { make in | ||
| 101 | + make.right.equalToSuperview() | ||
| 102 | + make.centerY.equalTo(self.authNameTitleLabel.snp.centerY) | ||
| 103 | + make.width.equalTo(27+20) | ||
| 104 | + make.height.equalTo(24+10) | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + self.whiteView.addSubview(self.nameBgView) | ||
| 108 | + self.nameBgView.snp.makeConstraints { make in | ||
| 109 | + make.left.equalTo(15) | ||
| 110 | + make.top.equalTo(self.authNameTitleLabel.snp.bottom).offset(15) | ||
| 111 | + make.right.equalToSuperview().offset(-15) | ||
| 112 | + make.height.equalTo(83) | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + self.nameBgView.addSubview(self.nameTitleLabel) | ||
| 116 | + self.nameTitleLabel.snp.makeConstraints { make in | ||
| 117 | + make.left.equalTo(15) | ||
| 118 | + make.top.equalTo(15) | ||
| 119 | + } | ||
| 120 | + self.nameBgView.addSubview(self.idTitleLabel) | ||
| 121 | + self.idTitleLabel.snp.makeConstraints { make in | ||
| 122 | + make.left.equalTo(15) | ||
| 123 | + make.top.equalTo(self.nameTitleLabel.snp.bottom).offset(10) | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + self.nameBgView.addSubview(self.nameLineView) | ||
| 127 | + self.nameLineView.snp.makeConstraints { make in | ||
| 128 | + make.left.equalTo(0) | ||
| 129 | + make.width.equalTo(2.5) | ||
| 130 | + make.height.equalTo(13) | ||
| 131 | + make.centerY.equalTo(self.nameTitleLabel.snp.centerY) | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + func setupNewUI(model:MineGetUserMsgVerifyUsersModel){ | ||
| 138 | + //闭眼,隐藏部分数据 | ||
| 139 | + let nameStr = (self.userMdl?.name ?? "") | ||
| 140 | + let maskedName = maskName(name: nameStr) | ||
| 141 | + self.nameTitleLabel.text = "姓 名:"+maskedName | ||
| 142 | + | ||
| 143 | + let idStr = (self.userMdl?.idNo ?? "") | ||
| 144 | + let maskedIDCardNumber = maskIDCardNumber(idCardNumber: idStr) // 输出:123***********5678 | ||
| 145 | + self.idTitleLabel.text = "证件号:"+maskedIDCardNumber | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + @objc func yanjingBtnAction(button:UIButton){ | ||
| 149 | + button.isSelected = !button.isSelected | ||
| 150 | + if !button.isSelected{ | ||
| 151 | + //闭眼,隐藏部分数据 | ||
| 152 | + let nameStr = (self.userMdl?.name ?? "") | ||
| 153 | + let maskedName = maskName(name: nameStr) | ||
| 154 | + self.nameTitleLabel.text = "姓 名:"+maskedName | ||
| 155 | + | ||
| 156 | + let idStr = (self.userMdl?.idNo ?? "") | ||
| 157 | + let maskedIDCardNumber = maskIDCardNumber(idCardNumber: idStr) // 输出:123***********5678 | ||
| 158 | + self.idTitleLabel.text = "证件号:"+maskedIDCardNumber | ||
| 159 | + }else{ | ||
| 160 | + //睁眼,显示全部数据 | ||
| 161 | + self.nameTitleLabel.text = "姓 名:"+(self.userMdl?.name ?? "") | ||
| 162 | + self.idTitleLabel.text = "证件号:"+(self.userMdl?.idNo ?? "") | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + func maskName(name: String) -> String { | ||
| 166 | + guard name.count > 0 else { return "" } | ||
| 167 | + // 假设我们只显示姓名的第一个字符,其余用星号代替 | ||
| 168 | + return name.prefix(1) + String(repeating: "*", count: name.count - 1) | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + func maskIDCardNumber(idCardNumber: String) -> String { | ||
| 172 | + guard idCardNumber.count >= 4 && idCardNumber.count <= 18 else { return "" } // 假设身份证号码至少4位,最多18位 | ||
| 173 | + | ||
| 174 | + // 显示前3位和后4位,中间用星号代替 | ||
| 175 | + let start = idCardNumber.prefix(3) | ||
| 176 | + let end = idCardNumber.suffix(4) | ||
| 177 | + let middle = String(repeating: "*", count: idCardNumber.count - 7) | ||
| 178 | + return start + middle + end | ||
| 179 | + } | ||
| 180 | +} |
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_real_biyan.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "auth_real_biyan@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "author" : "xcode", | ||
| 19 | + "version" : 1 | ||
| 20 | + } | ||
| 21 | +} |
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_real_biyan.imageset/auth_real_biyan@2x.png
0 → 100644
5.38 KB
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_real_zhengyan.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "auth_real_zhengyan@2x.png", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "author" : "xcode", | ||
| 19 | + "version" : 1 | ||
| 20 | + } | ||
| 21 | +} |
metaCode/Supporting Files/Assets.xcassets/AuthPage/auth_real_zhengyan.imageset/auth_real_zhengyan@2x.png
0 → 100644
4.64 KB