Commit 021651bfbc7d5c33bd79ed8b849b1d185d0312a3
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
# Conflicts: # metaCode/Classes/Other/AppDelegate.swift
Showing
7 changed files
with
152 additions
and
82 deletions
metaCode.xcodeproj/project.pbxproj
| @@ -1123,22 +1123,26 @@ | @@ -1123,22 +1123,26 @@ | ||
| 1123 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | 1123 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 1124 | CLANG_ENABLE_MODULES = YES; | 1124 | CLANG_ENABLE_MODULES = YES; |
| 1125 | CODE_SIGN_STYLE = Automatic; | 1125 | CODE_SIGN_STYLE = Automatic; |
| 1126 | - CURRENT_PROJECT_VERSION = 1.0; | 1126 | + CURRENT_PROJECT_VERSION = 1.0.0.23.09.19.10; |
| 1127 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 1127 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 1128 | GENERATE_INFOPLIST_FILE = YES; | 1128 | GENERATE_INFOPLIST_FILE = YES; |
| 1129 | INFOPLIST_FILE = metaCode/Info.plist; | 1129 | INFOPLIST_FILE = metaCode/Info.plist; |
| 1130 | INFOPLIST_KEY_CFBundleDisplayName = "元码"; | 1130 | INFOPLIST_KEY_CFBundleDisplayName = "元码"; |
| 1131 | + INFOPLIST_KEY_NSCameraUsageDescription = "需要允许开启相机才能使用录制视频和拍照功能"; | ||
| 1132 | + INFOPLIST_KEY_NSMicrophoneUsageDescription = "需要允许开启麦克风才能使用录制视频和语音等服务"; | ||
| 1133 | + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | ||
| 1134 | + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | ||
| 1131 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; | 1135 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
| 1132 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; | 1136 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; |
| 1133 | INFOPLIST_KEY_UIMainStoryboardFile = Main; | 1137 | INFOPLIST_KEY_UIMainStoryboardFile = Main; |
| 1134 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | ||
| 1135 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | 1138 | + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; |
| 1139 | + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; | ||
| 1136 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; | 1140 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; |
| 1137 | LD_RUNPATH_SEARCH_PATHS = ( | 1141 | LD_RUNPATH_SEARCH_PATHS = ( |
| 1138 | "$(inherited)", | 1142 | "$(inherited)", |
| 1139 | "@executable_path/Frameworks", | 1143 | "@executable_path/Frameworks", |
| 1140 | ); | 1144 | ); |
| 1141 | - MARKETING_VERSION = 1.0; | 1145 | + MARKETING_VERSION = 1.0.0; |
| 1142 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode.debug; | 1146 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode.debug; |
| 1143 | PRODUCT_NAME = "$(TARGET_NAME)"; | 1147 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1144 | SWIFT_EMIT_LOC_STRINGS = YES; | 1148 | SWIFT_EMIT_LOC_STRINGS = YES; |
| @@ -1157,22 +1161,26 @@ | @@ -1157,22 +1161,26 @@ | ||
| 1157 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | 1161 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 1158 | CLANG_ENABLE_MODULES = YES; | 1162 | CLANG_ENABLE_MODULES = YES; |
| 1159 | CODE_SIGN_STYLE = Automatic; | 1163 | CODE_SIGN_STYLE = Automatic; |
| 1160 | - CURRENT_PROJECT_VERSION = 1.0; | 1164 | + CURRENT_PROJECT_VERSION = 1.0.0.23.09.19.10; |
| 1161 | DEVELOPMENT_TEAM = 94X49GG3ZW; | 1165 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 1162 | GENERATE_INFOPLIST_FILE = YES; | 1166 | GENERATE_INFOPLIST_FILE = YES; |
| 1163 | INFOPLIST_FILE = metaCode/Info.plist; | 1167 | INFOPLIST_FILE = metaCode/Info.plist; |
| 1164 | INFOPLIST_KEY_CFBundleDisplayName = "元码"; | 1168 | INFOPLIST_KEY_CFBundleDisplayName = "元码"; |
| 1169 | + INFOPLIST_KEY_NSCameraUsageDescription = "需要允许开启相机才能使用录制视频和拍照功能"; | ||
| 1170 | + INFOPLIST_KEY_NSMicrophoneUsageDescription = "需要允许开启麦克风才能使用录制视频和语音等服务"; | ||
| 1171 | + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | ||
| 1172 | + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | ||
| 1165 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; | 1173 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
| 1166 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; | 1174 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; |
| 1167 | INFOPLIST_KEY_UIMainStoryboardFile = Main; | 1175 | INFOPLIST_KEY_UIMainStoryboardFile = Main; |
| 1168 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | ||
| 1169 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | 1176 | + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; |
| 1177 | + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; | ||
| 1170 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; | 1178 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; |
| 1171 | LD_RUNPATH_SEARCH_PATHS = ( | 1179 | LD_RUNPATH_SEARCH_PATHS = ( |
| 1172 | "$(inherited)", | 1180 | "$(inherited)", |
| 1173 | "@executable_path/Frameworks", | 1181 | "@executable_path/Frameworks", |
| 1174 | ); | 1182 | ); |
| 1175 | - MARKETING_VERSION = 1.0; | 1183 | + MARKETING_VERSION = 1.0.0; |
| 1176 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode.debug; | 1184 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode.debug; |
| 1177 | PRODUCT_NAME = "$(TARGET_NAME)"; | 1185 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1178 | SWIFT_EMIT_LOC_STRINGS = YES; | 1186 | SWIFT_EMIT_LOC_STRINGS = YES; |
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
| @@ -184,15 +184,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -184,15 +184,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 184 | 184 | ||
| 185 | self.setupUI() | 185 | self.setupUI() |
| 186 | 186 | ||
| 187 | + /// 通知名 | ||
| 188 | + let notificationName = "CNLiveNetworkStatusNotification" | ||
| 189 | + /// 自定义通知 | ||
| 190 | + NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationAction), name: NSNotification.Name(rawValue: notificationName), object: nil) | ||
| 191 | + | ||
| 187 | // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight | 192 | // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight |
| 188 | 193 | ||
| 189 | - | ||
| 190 | } | 194 | } |
| 191 | override func viewWillAppear(_ animated: Bool) { | 195 | override func viewWillAppear(_ animated: Bool) { |
| 192 | super.viewWillAppear(animated) | 196 | super.viewWillAppear(animated) |
| 193 | 197 | ||
| 194 | print("uid = ",UserInfoManager.shared.userInfo.uid) | 198 | print("uid = ",UserInfoManager.shared.userInfo.uid) |
| 195 | - self.getUserIdentityApi() | ||
| 196 | 199 | ||
| 197 | } | 200 | } |
| 198 | override func viewDidAppear(_ animated: Bool) { | 201 | override func viewDidAppear(_ animated: Bool) { |
| @@ -201,7 +204,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -201,7 +204,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 201 | 204 | ||
| 202 | self.topNavView.isHidden = true | 205 | self.topNavView.isHidden = true |
| 203 | } | 206 | } |
| 204 | - | 207 | + |
| 208 | + deinit { | ||
| 209 | + /// 移除通知 | ||
| 210 | + NotificationCenter.default.removeObserver(self) | ||
| 211 | + } | ||
| 205 | 212 | ||
| 206 | // MARK: - 添加UI | 213 | // MARK: - 添加UI |
| 207 | func setupUI(){ | 214 | func setupUI(){ |
| @@ -225,12 +232,26 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -225,12 +232,26 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 225 | 232 | ||
| 226 | } | 233 | } |
| 227 | 234 | ||
| 228 | - // MARK: -按钮点击事件 | 235 | + // MARK: -事件 |
| 229 | //无网时刷新 | 236 | //无网时刷新 |
| 230 | @objc func errorFreshButtonAction(){ | 237 | @objc func errorFreshButtonAction(){ |
| 231 | self.getUserIdentityApi() | 238 | self.getUserIdentityApi() |
| 232 | } | 239 | } |
| 233 | - | 240 | + /// 接受到通知后的方法回调 |
| 241 | + @objc private func networkStatusNotificationAction(noti: Notification) { | ||
| 242 | + let netStatus:String = noti.object as! String | ||
| 243 | + switch netStatus { | ||
| 244 | +// case "notReachable"://暂时不处理 | ||
| 245 | + | ||
| 246 | + case "reachableViaWWAN": | ||
| 247 | + self.getUserIdentityApi() | ||
| 248 | + case "reachableViaWiFi": | ||
| 249 | + self.getUserIdentityApi() | ||
| 250 | + default: | ||
| 251 | + break | ||
| 252 | + } | ||
| 253 | + } | ||
| 254 | + | ||
| 234 | // MARK: -添加约束 | 255 | // MARK: -添加约束 |
| 235 | func makeConstraints(){ | 256 | func makeConstraints(){ |
| 236 | self.errorImgView.snp.makeConstraints { make in | 257 | self.errorImgView.snp.makeConstraints { make in |
| @@ -426,9 +447,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | @@ -426,9 +447,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel | ||
| 426 | //MARK: - 网络请求获取身份列表 | 447 | //MARK: - 网络请求获取身份列表 |
| 427 | func getUserIdentityApi() | 448 | func getUserIdentityApi() |
| 428 | { | 449 | { |
| 450 | + showLoading(message: "") | ||
| 429 | CNLiveMineViewModel.requestAuthStandList(page: 1) | 451 | CNLiveMineViewModel.requestAuthStandList(page: 1) |
| 430 | { result, respStatue in | 452 | { result, respStatue in |
| 431 | 453 | ||
| 454 | + hiddenLoading() | ||
| 432 | if respStatue == .success{ | 455 | if respStatue == .success{ |
| 433 | self.NetApiStatus = .success | 456 | self.NetApiStatus = .success |
| 434 | let listArray:NSArray = (result as! StandListBaseModel).list as NSArray | 457 | let listArray:NSArray = (result as! StandListBaseModel).list as NSArray |
metaCode/Classes/Main/HomePage/View/CNIDCardView.swift
| @@ -53,24 +53,38 @@ class CNIDCardView: UIView{ | @@ -53,24 +53,38 @@ class CNIDCardView: UIView{ | ||
| 53 | self.contentView.addSubview(self.sexValueLabel) | 53 | self.contentView.addSubview(self.sexValueLabel) |
| 54 | self.contentView.addSubview(self.dateValueLabel) | 54 | self.contentView.addSubview(self.dateValueLabel) |
| 55 | self.contentView.addSubview(self.IDValueLabel) | 55 | self.contentView.addSubview(self.IDValueLabel) |
| 56 | + self.contentView.addSubview(self.iDIconImgView) | ||
| 57 | + | ||
| 56 | } | 58 | } |
| 57 | 59 | ||
| 58 | func loadIDDetailData(){ | 60 | func loadIDDetailData(){ |
| 61 | + showLoading(message: "") | ||
| 59 | CNLiveMineViewModel.requestsStandInfo(identityId: "\(_idModel!.id)", type: .havedate) { result, respStatue in | 62 | CNLiveMineViewModel.requestsStandInfo(identityId: "\(_idModel!.id)", type: .havedate) { result, respStatue in |
| 63 | + hiddenLoading() | ||
| 60 | if respStatue == .success { | 64 | if respStatue == .success { |
| 61 | let cardArray = result as! NSMutableArray | 65 | let cardArray = result as! NSMutableArray |
| 62 | for i in (0..<cardArray.count){ | 66 | for i in (0..<cardArray.count){ |
| 63 | let idCardModel = cardArray[i] as! MineStandInfoModel | 67 | let idCardModel = cardArray[i] as! MineStandInfoModel |
| 64 | switch idCardModel.name { | 68 | switch idCardModel.name { |
| 65 | case "姓名": | 69 | case "姓名": |
| 66 | - self.nameValueLabel.text = idCardModel.userInfo | 70 | + self.nameValueLabel.text = idCardModel.userInfo |
| 67 | case "性别": | 71 | case "性别": |
| 68 | self.sexValueLabel.text = idCardModel.userInfo | 72 | self.sexValueLabel.text = idCardModel.userInfo |
| 69 | case "认证时间": | 73 | case "认证时间": |
| 70 | self.dateValueLabel.text = idCardModel.userInfo | 74 | self.dateValueLabel.text = idCardModel.userInfo |
| 71 | case "编号": | 75 | case "编号": |
| 72 | - self.IDValueLabel.text = idCardModel.userInfo | 76 | + self.IDValueLabel.text = idCardModel.userInfo |
| 77 | + case "证件照": | ||
| 78 | + let str:String = idCardModel.userInfo! | ||
| 79 | + if(str.isEmpty){ | ||
| 80 | + self.iDIconImgView.isHidden = true | ||
| 81 | + }else | ||
| 82 | + { | ||
| 83 | + self.iDIconImgView.isHidden = false | ||
| 84 | + self.iDIconImgView.kf.setImage(with: URL(string: str)) | ||
| 85 | + } | ||
| 73 | 86 | ||
| 87 | + self.iDCardBGView.kf.setImage(with: URL(string: self._idModel!.cardImg), placeholder: UIImage(named: "homePage_idCardBG")) | ||
| 74 | default: | 88 | default: |
| 75 | break | 89 | break |
| 76 | } | 90 | } |
| @@ -79,6 +93,59 @@ class CNIDCardView: UIView{ | @@ -79,6 +93,59 @@ class CNIDCardView: UIView{ | ||
| 79 | } | 93 | } |
| 80 | } | 94 | } |
| 81 | 95 | ||
| 96 | + // MARK: - 约束 | ||
| 97 | + func makeConstraints(){ | ||
| 98 | + self.iDCardBGView.snp.makeConstraints { make in | ||
| 99 | + make.centerX.equalToSuperview() | ||
| 100 | + make.centerY.equalToSuperview() | ||
| 101 | + make.width.equalToSuperview() | ||
| 102 | + make.height.equalToSuperview() | ||
| 103 | + } | ||
| 104 | + //标签 | ||
| 105 | + self.nameLabel.snp.makeConstraints { make in | ||
| 106 | + make.left.equalToSuperview().offset(20) | ||
| 107 | + make.top.equalTo(60) | ||
| 108 | + make.width.equalTo(54) | ||
| 109 | + } | ||
| 110 | + self.sexLabel.snp.makeConstraints { make in | ||
| 111 | + make.left.equalToSuperview().offset(20) | ||
| 112 | + make.top.equalTo(nameLabel.snp.bottom).offset(10) | ||
| 113 | + } | ||
| 114 | + self.dateLabel.snp.makeConstraints { make in | ||
| 115 | + make.left.equalToSuperview().offset(20) | ||
| 116 | + make.top.equalTo(sexLabel.snp.bottom).offset(10) | ||
| 117 | + } | ||
| 118 | + self.IDLabel.snp.makeConstraints { make in | ||
| 119 | + make.left.equalToSuperview().offset(20) | ||
| 120 | + make.top.equalTo(dateLabel.snp.bottom).offset(10) | ||
| 121 | + } | ||
| 122 | + //标签值 | ||
| 123 | + self.nameValueLabel.snp.makeConstraints { make in | ||
| 124 | + make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 125 | + make.top.equalTo(nameLabel.snp.top) | ||
| 126 | + make.right.equalTo(iDIconImgView.snp.left).offset(-5) | ||
| 127 | + } | ||
| 128 | + self.sexValueLabel.snp.makeConstraints { make in | ||
| 129 | + make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 130 | + make.top.equalTo(sexLabel.snp.top) | ||
| 131 | + } | ||
| 132 | + self.dateValueLabel.snp.makeConstraints { make in | ||
| 133 | + make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 134 | + make.top.equalTo(dateLabel.snp.top) | ||
| 135 | + } | ||
| 136 | + self.IDValueLabel.snp.makeConstraints { make in | ||
| 137 | + make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 138 | + make.top.equalTo(IDLabel.snp.top) | ||
| 139 | + make.right.lessThanOrEqualTo(iDIconImgView.snp.left).offset(-5) | ||
| 140 | + } | ||
| 141 | + self.iDIconImgView.snp.makeConstraints { make in | ||
| 142 | + make.right.equalToSuperview().offset(-15) | ||
| 143 | + make.top.equalTo(nameLabel.snp.top) | ||
| 144 | + make.width.equalTo(60) | ||
| 145 | + make.height.equalTo(85) | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | + | ||
| 82 | // MARK: - 懒加载 | 149 | // MARK: - 懒加载 |
| 83 | ///视图总容器 | 150 | ///视图总容器 |
| 84 | lazy var contentView : UIView = { | 151 | lazy var contentView : UIView = { |
| @@ -184,48 +251,12 @@ class CNIDCardView: UIView{ | @@ -184,48 +251,12 @@ class CNIDCardView: UIView{ | ||
| 184 | return IDValueLabel | 251 | return IDValueLabel |
| 185 | }() | 252 | }() |
| 186 | 253 | ||
| 187 | - // MARK: - 约束 | ||
| 188 | - func makeConstraints(){ | ||
| 189 | - self.iDCardBGView.snp.makeConstraints { make in | ||
| 190 | - make.centerX.equalToSuperview() | ||
| 191 | - make.centerY.equalToSuperview() | ||
| 192 | - make.width.equalToSuperview() | ||
| 193 | - make.height.equalToSuperview() | ||
| 194 | - } | ||
| 195 | - //标签 | ||
| 196 | - self.nameLabel.snp.makeConstraints { make in | ||
| 197 | - make.left.equalToSuperview().offset(20) | ||
| 198 | - make.top.equalTo(60) | ||
| 199 | - } | ||
| 200 | - self.sexLabel.snp.makeConstraints { make in | ||
| 201 | - make.left.equalToSuperview().offset(20) | ||
| 202 | - make.top.equalTo(nameLabel.snp.bottom).offset(10) | ||
| 203 | - } | ||
| 204 | - self.dateLabel.snp.makeConstraints { make in | ||
| 205 | - make.left.equalToSuperview().offset(20) | ||
| 206 | - make.top.equalTo(sexLabel.snp.bottom).offset(10) | ||
| 207 | - } | ||
| 208 | - self.IDLabel.snp.makeConstraints { make in | ||
| 209 | - make.left.equalToSuperview().offset(20) | ||
| 210 | - make.top.equalTo(dateLabel.snp.bottom).offset(10) | ||
| 211 | - } | ||
| 212 | - //标签值 | ||
| 213 | - self.nameValueLabel.snp.makeConstraints { make in | ||
| 214 | - make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 215 | - make.top.equalTo(nameLabel.snp.top) | ||
| 216 | - } | ||
| 217 | - self.sexValueLabel.snp.makeConstraints { make in | ||
| 218 | - make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 219 | - make.top.equalTo(sexLabel.snp.top) | ||
| 220 | - } | ||
| 221 | - self.dateValueLabel.snp.makeConstraints { make in | ||
| 222 | - make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 223 | - make.top.equalTo(dateLabel.snp.top) | ||
| 224 | - } | ||
| 225 | - self.IDValueLabel.snp.makeConstraints { make in | ||
| 226 | - make.left.equalTo(nameLabel.snp.right).offset(10) | ||
| 227 | - make.top.equalTo(IDLabel.snp.top) | ||
| 228 | - } | ||
| 229 | - } | 254 | + ///证件照 |
| 255 | + lazy var iDIconImgView:UIImageView = { | ||
| 256 | + | ||
| 257 | + let iDIconImgView:UIImageView = UIImageView(frame: CGRect(x: 20, y: 25, width: 60, height: 85)) | ||
| 258 | + iDIconImgView.backgroundColor = UIColor.red | ||
| 259 | + return iDIconImgView | ||
| 260 | + }() | ||
| 230 | 261 | ||
| 231 | } | 262 | } |
metaCode/Classes/Main/HomePage/View/CNMainView.swift
| @@ -153,7 +153,11 @@ class CNFrontMainView : UIView{ | @@ -153,7 +153,11 @@ class CNFrontMainView : UIView{ | ||
| 153 | 153 | ||
| 154 | @objc func addStandBtnAction() { | 154 | @objc func addStandBtnAction() { |
| 155 | //跳转到添加身份页面 | 155 | //跳转到添加身份页面 |
| 156 | - currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: true) | 156 | +// currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: false) |
| 157 | + DispatchQueue.main.asyncAfter(deadline: .now()+0.25){ | ||
| 158 | + currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!), animated: true) | ||
| 159 | + } | ||
| 160 | + | ||
| 157 | } | 161 | } |
| 158 | } | 162 | } |
| 159 | 163 |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
| @@ -254,7 +254,7 @@ class CNLiveMineViewModel: NSObject { | @@ -254,7 +254,7 @@ class CNLiveMineViewModel: NSObject { | ||
| 254 | /// - resultBlock: 返回 | 254 | /// - resultBlock: 返回 |
| 255 | static func requestAuthStandList(page: NSInteger, resultBlock: @escaping resultNewsBlock) { | 255 | static func requestAuthStandList(page: NSInteger, resultBlock: @escaping resultNewsBlock) { |
| 256 | let param = NSMutableDictionary() | 256 | let param = NSMutableDictionary() |
| 257 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 257 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")//10458139 UserInfoManager.shared.userInfo.uid |
| 258 | param.setValue("10", forKey: "pageSize") | 258 | param.setValue("10", forKey: "pageSize") |
| 259 | param.setValue("\(page)", forKey: "page") | 259 | param.setValue("\(page)", forKey: "page") |
| 260 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 260 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| @@ -434,7 +434,7 @@ class CNLiveMineViewModel: NSObject { | @@ -434,7 +434,7 @@ class CNLiveMineViewModel: NSObject { | ||
| 434 | /// - resultBlock: 返回 | 434 | /// - resultBlock: 返回 |
| 435 | static func requestsStandInfo(identityId: String, type: CNLiveMineGetWriteType, resultBlock: @escaping resultNewsBlock) { | 435 | static func requestsStandInfo(identityId: String, type: CNLiveMineGetWriteType, resultBlock: @escaping resultNewsBlock) { |
| 436 | let param = NSMutableDictionary() | 436 | let param = NSMutableDictionary() |
| 437 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 437 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")//UserInfoManager.shared.userInfo.uid //10458139 |
| 438 | param.setValue(identityId, forKey: "identityId") | 438 | param.setValue(identityId, forKey: "identityId") |
| 439 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 439 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 440 | CNLiveNetworking.setupShowDataResult(false) | 440 | CNLiveNetworking.setupShowDataResult(false) |
metaCode/Classes/Other/AppDelegate.swift
| @@ -17,7 +17,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | @@ -17,7 +17,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate { | ||
| 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { |
| 18 | 18 | ||
| 19 | // Override point for customization after application launch. | 19 | // Override point for customization after application launch. |
| 20 | - | 20 | + CNLiveNetworking.networkStatus { status in |
| 21 | + | ||
| 22 | + if(status == .notReachable || status == .unknown){ | ||
| 23 | + /// 发送简单数据 | ||
| 24 | + NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "CNLiveNetworkStatusNotification"), object: "notReachable") | ||
| 25 | + } | ||
| 26 | + if status == .reachableViaWWAN { | ||
| 27 | + /// 发送简单数据 | ||
| 28 | + NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "CNLiveNetworkStatusNotification"), object: "reachableViaWWAN") | ||
| 29 | + } | ||
| 30 | + if status == .reachableViaWiFi { | ||
| 31 | + /// 发送简单数据 | ||
| 32 | + NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "CNLiveNetworkStatusNotification"), object: "reachableViaWiFi") | ||
| 33 | + } | ||
| 34 | + } | ||
| 21 | 35 | ||
| 22 | //设置APP环境 | 36 | //设置APP环境 |
| 23 | CNLiveEnvironmentManager.shared.setupEnvironment(environment: .development) | 37 | CNLiveEnvironmentManager.shared.setupEnvironment(environment: .development) |
metaCode/Info.plist
| @@ -4,31 +4,21 @@ | @@ -4,31 +4,21 @@ | ||
| 4 | <dict> | 4 | <dict> |
| 5 | <key>CFBundleAllowMixedLocalizations</key> | 5 | <key>CFBundleAllowMixedLocalizations</key> |
| 6 | <true/> | 6 | <true/> |
| 7 | - <key>UIApplicationSceneManifest</key> | 7 | + <key>CFBundleLocalizations</key> |
| 8 | + <array> | ||
| 9 | + <string>zh</string> | ||
| 10 | + </array> | ||
| 11 | + <key>NSAppTransportSecurity</key> | ||
| 8 | <dict> | 12 | <dict> |
| 9 | - <key>UIApplicationSupportsMultipleScenes</key> | ||
| 10 | - <false/> | 13 | + <key>NSAllowsArbitraryLoads</key> |
| 14 | + <true/> | ||
| 11 | </dict> | 15 | </dict> |
| 12 | - <key>NSPhotoLibraryAddUsageDescription</key> | ||
| 13 | - <string>需要允许打开相册才能访问相册照片和保存照片</string> | ||
| 14 | - <key>NSPhotoLibraryUsageDescription</key> | ||
| 15 | - <string>需要允许打开相册才能访问相册照片和保存照片</string> | ||
| 16 | - <key>NSCameraUsageDescription</key> | ||
| 17 | - <string>需要允许开启相机才能使用录制视频和拍照功能</string> | ||
| 18 | - <key>NSMicrophoneUsageDescription</key> | ||
| 19 | - <string>需要允许开启麦克风才能使用录制视频和语音等服务</string> | ||
| 20 | <key>PHPhotoLibraryPreventAutomaticLimitedAccessAlert</key> | 16 | <key>PHPhotoLibraryPreventAutomaticLimitedAccessAlert</key> |
| 21 | <true/> | 17 | <true/> |
| 22 | - <key>NSAppTransportSecurity</key> | 18 | + <key>UIApplicationSceneManifest</key> |
| 23 | <dict> | 19 | <dict> |
| 24 | - <key>NSAllowsArbitraryLoads</key> | ||
| 25 | - <true/> | 20 | + <key>UIApplicationSupportsMultipleScenes</key> |
| 21 | + <false/> | ||
| 26 | </dict> | 22 | </dict> |
| 27 | - <key>CFBundleDevelopmentRegion</key> | ||
| 28 | - <string>zh_CN</string> | ||
| 29 | - <key>CFBundleLocalizations</key> | ||
| 30 | - <array> | ||
| 31 | - <string>zh</string> | ||
| 32 | - </array> | ||
| 33 | </dict> | 23 | </dict> |
| 34 | </plist> | 24 | </plist> |