Commit 398862a1febf50781aa5f48ef59db95ce4352bd3

Authored by liushiyu
2 parents 2c55aac9 753c5c4b
metaCode.xcodeproj/project.pbxproj
@@ -1131,7 +1131,7 @@ @@ -1131,7 +1131,7 @@
1131 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 1131 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
1132 CLANG_ENABLE_MODULES = YES; 1132 CLANG_ENABLE_MODULES = YES;
1133 CODE_SIGN_STYLE = Automatic; 1133 CODE_SIGN_STYLE = Automatic;
1134 - CURRENT_PROJECT_VERSION = 1.0.0.23.09.20.10; 1134 + CURRENT_PROJECT_VERSION = 1.0.0.23.09.25.16;
1135 DEVELOPMENT_TEAM = 94X49GG3ZW; 1135 DEVELOPMENT_TEAM = 94X49GG3ZW;
1136 GENERATE_INFOPLIST_FILE = YES; 1136 GENERATE_INFOPLIST_FILE = YES;
1137 INFOPLIST_FILE = metaCode/Info.plist; 1137 INFOPLIST_FILE = metaCode/Info.plist;
@@ -1175,7 +1175,7 @@ @@ -1175,7 +1175,7 @@
1175 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 1175 ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
1176 CLANG_ENABLE_MODULES = YES; 1176 CLANG_ENABLE_MODULES = YES;
1177 CODE_SIGN_STYLE = Automatic; 1177 CODE_SIGN_STYLE = Automatic;
1178 - CURRENT_PROJECT_VERSION = 1.0.0.23.09.20.10; 1178 + CURRENT_PROJECT_VERSION = 1.0.0.23.09.25.16;
1179 DEVELOPMENT_TEAM = 94X49GG3ZW; 1179 DEVELOPMENT_TEAM = 94X49GG3ZW;
1180 GENERATE_INFOPLIST_FILE = YES; 1180 GENERATE_INFOPLIST_FILE = YES;
1181 INFOPLIST_FILE = metaCode/Info.plist; 1181 INFOPLIST_FILE = metaCode/Info.plist;
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
@@ -13,6 +13,12 @@ import CNLiveRequestBastKit @@ -13,6 +13,12 @@ import CNLiveRequestBastKit
13 let Width: CGFloat = UIScreen.main.bounds.size.width 13 let Width: CGFloat = UIScreen.main.bounds.size.width
14 let Height: CGFloat = UIScreen.main.bounds.size.height 14 let Height: CGFloat = UIScreen.main.bounds.size.height
15 15
  16 +///主窗口左右间距
  17 +let LeftGap: CGFloat = UIScreen.main.bounds.size.width <= 375 ? 23 : 40
  18 +
  19 +///主窗口宽度
  20 +let MainViewW: CGFloat = Width-LeftGap*2//Width-50
  21 +
16 ///存储是否第一次显示首页上滑引导 22 ///存储是否第一次显示首页上滑引导
17 let CNKeyIsFirstAppearUpSlideHomeGuide: String = "isFirstAppearUpSlideHomeGuideKey" 23 let CNKeyIsFirstAppearUpSlideHomeGuide: String = "isFirstAppearUpSlideHomeGuideKey"
18 ///存储是否第一次显示首页下滑引导 24 ///存储是否第一次显示首页下滑引导
@@ -71,7 +77,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -71,7 +77,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
71 77
72 ///无网.接口失败View 78 ///无网.接口失败View
73 lazy var notNetworkView: UIView = { 79 lazy var notNetworkView: UIView = {
74 - let W = Width-50 80 + let W = MainViewW
75 let H = W*1.5 81 let H = W*1.5
76 let notNetworkView = UIView.init(frame: CGRect(x: 25, y: KSreenHeight*0.16, width: W, height: H )) 82 let notNetworkView = UIView.init(frame: CGRect(x: 25, y: KSreenHeight*0.16, width: W, height: H ))
77 notNetworkView.backgroundColor = UIColor.white 83 notNetworkView.backgroundColor = UIColor.white
@@ -207,7 +213,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -207,7 +213,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
207 213
208 //提交身份审核后刷新 214 //提交身份审核后刷新
209 NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) 215 NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil)
210 - 216 + //我的身份排序后刷新
  217 + NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthSortNotificationResult, object: nil)
211 218
212 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight 219 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight
213 220
@@ -335,15 +342,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -335,15 +342,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
335 }else{ 342 }else{
336 //没有显示下滑引导 343 //没有显示下滑引导
337 self.pageFlowView.scrollView.isScrollEnabled = false 344 self.pageFlowView.scrollView.isScrollEnabled = false
338 - self.view.addSubview(self.downSlideGuideView)  
339 - self.view.addSubview(self.downSlideGifView) 345 + UIApplication.shared.keyWindow!.addSubview(self.downSlideGuideView)
  346 + UIApplication.shared.keyWindow!.addSubview(self.downSlideGifView)
  347 +// self.tabBarController?.tabBar.isHidden = true
340 } 348 }
341 349
342 }else{ 350 }else{
343 //没显示过上滑引导 351 //没显示过上滑引导
344 self.pageFlowView.scrollView.isScrollEnabled = false 352 self.pageFlowView.scrollView.isScrollEnabled = false
345 - self.view.addSubview(self.upSlideGuideView)  
346 - self.view.addSubview(self.upSlideGifView) 353 +
  354 + UIApplication.shared.keyWindow!.addSubview(self.upSlideGuideView)
  355 + UIApplication.shared.keyWindow!.addSubview(self.upSlideGifView)
  356 +// self.tabBarController?.tabBar.isHidden = true
347 } 357 }
348 } 358 }
349 359
@@ -368,7 +378,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -368,7 +378,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
368 var bannerView:CNCustomIndexView? = flowView.dequeueReusableCell() as? CNCustomIndexView 378 var bannerView:CNCustomIndexView? = flowView.dequeueReusableCell() as? CNCustomIndexView
369 379
370 if (bannerView == nil) { 380 if (bannerView == nil) {
371 - bannerView = CNCustomIndexView.init(frame: CGRectMake(0, 0, Width-50, Height)) 381 + bannerView = CNCustomIndexView.init(frame: CGRectMake(0, 0, MainViewW, Height))
372 bannerView?.tag = index + 100 382 bannerView?.tag = index + 100
373 bannerView?.layer.cornerRadius = 4 383 bannerView?.layer.cornerRadius = 4
374 bannerView?.layer.masksToBounds = false 384 bannerView?.layer.masksToBounds = false
@@ -384,7 +394,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -384,7 +394,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
384 } 394 }
385 395
386 func sizeForPage(in flowView: NewPagedFlowView!) -> CGSize { 396 func sizeForPage(in flowView: NewPagedFlowView!) -> CGSize {
387 - return CGSize(width: Width-50, height: Height) 397 + return CGSize(width: MainViewW, height: Height)
388 } 398 }
389 399
390 ///NewPagedFlowView 开始滑动 400 ///NewPagedFlowView 开始滑动
@@ -436,7 +446,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -436,7 +446,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
436 446
437 scrollView.isScrollEnabled = true 447 scrollView.isScrollEnabled = true
438 448
439 - let toIndex:Int = Int(scrollView.contentOffset.x/(Width-50)) 449 + let toIndex:Int = Int(scrollView.contentOffset.x/(MainViewW))
440 450
441 if toIndex == self.backgroupView.currentApearViewIndex{ 451 if toIndex == self.backgroupView.currentApearViewIndex{
442 return 452 return
@@ -463,12 +473,12 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -463,12 +473,12 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
463 473
464 //移除下滑引导 474 //移除下滑引导
465 if (self.downSlideGuideView.superview != nil) { 475 if (self.downSlideGuideView.superview != nil) {
  476 +
466 self.downSlideGuideView.removeFromSuperview() 477 self.downSlideGuideView.removeFromSuperview()
467 self.downSlideGifView.removeFromSuperview() 478 self.downSlideGifView.removeFromSuperview()
468 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearDownSlideHomeGuide) 479 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearDownSlideHomeGuide)
469 self.pageFlowView.scrollView.isScrollEnabled = true 480 self.pageFlowView.scrollView.isScrollEnabled = true
470 } 481 }
471 -  
472 482
473 } 483 }
474 func customIndexViewDidScroll(scrollView: UIScrollView) { 484 func customIndexViewDidScroll(scrollView: UIScrollView) {
@@ -502,8 +512,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -502,8 +512,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
502 print("不该进来") 512 print("不该进来")
503 }else{ 513 }else{
504 //没有显示下滑引导 514 //没有显示下滑引导
505 - self.view.addSubview(self.downSlideGuideView)  
506 - self.view.addSubview(self.downSlideGifView) 515 + UIApplication.shared.keyWindow!.addSubview(self.downSlideGuideView)
  516 + UIApplication.shared.keyWindow!.addSubview(self.downSlideGifView)
507 self.pageFlowView.scrollView.isScrollEnabled = false 517 self.pageFlowView.scrollView.isScrollEnabled = false
508 } 518 }
509 } 519 }
metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift
@@ -118,8 +118,8 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange @@ -118,8 +118,8 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange
118 set{ 118 set{
119 self.mainView.idModel = newValue! 119 self.mainView.idModel = newValue!
120 _idModel = newValue 120 _idModel = newValue
121 - self.upSlideView.url = _idModel?.upPath  
122 - self.downSlideView.url = _idModel?.downPath 121 + self.upSlideView.url = _idModel?.downPath
  122 + self.downSlideView.url = _idModel?.upPath
123 self.topNavView.setTitleString(title:(_idModel?.name)!) 123 self.topNavView.setTitleString(title:(_idModel?.name)!)
124 } 124 }
125 125
metaCode/Classes/Main/HomePage/View/CNHomePageGuideView.swift
@@ -58,9 +58,9 @@ class CNHomePageGuideView: UIView{ @@ -58,9 +58,9 @@ class CNHomePageGuideView: UIView{
58 let path:UIBezierPath = UIBezierPath.init(rect: UIScreen.main.bounds) 58 let path:UIBezierPath = UIBezierPath.init(rect: UIScreen.main.bounds)
59 59
60 //rect 首页被镂空的区域 60 //rect 首页被镂空的区域
61 - let W = KSreenWidth-50 61 + let W = MainViewW
62 let H = W*1.5 62 let H = W*1.5
63 - let rect = CGRectMake(25, KSreenHeight*0.16,W, H) 63 + let rect = CGRectMake(LeftGap, KSreenHeight*0.16,W, H)
64 64
65 let appendPath: UIBezierPath = UIBezierPath.init(roundedRect: rect, cornerRadius: 20) 65 let appendPath: UIBezierPath = UIBezierPath.init(roundedRect: rect, cornerRadius: 20)
66 path.append(appendPath.reversing()) 66 path.append(appendPath.reversing())
metaCode/Classes/Main/HomePage/View/CNMainView.swift
@@ -334,7 +334,7 @@ class CNMainView : UIView{ @@ -334,7 +334,7 @@ class CNMainView : UIView{
334 334
335 } 335 }
336 336
337 - // MARK: - <##><##>设置前置视图容器 337 + // MARK: -设置前置视图容器
338 func isHiddenMainFrontContentView(isHidden:Bool){ 338 func isHiddenMainFrontContentView(isHidden:Bool){
339 self.frontView.frontTotolContentView.isHidden = isHidden 339 self.frontView.frontTotolContentView.isHidden = isHidden
340 } 340 }
metaCode/Classes/Main/LoginPage/Controller/CNLiveLoginViewController.swift
@@ -89,7 +89,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate { @@ -89,7 +89,7 @@ class CNLiveLoginViewController : CNLiveBaseViewController, UITextViewDelegate {
89 self.setupVeriCodeView() 89 self.setupVeriCodeView()
90 self.setupLoginButtonView() 90 self.setupLoginButtonView()
91 91
92 - LoginAuthInfoView.showAuthView() 92 +// LoginAuthInfoView.showAuthView()
93 } 93 }
94 94
95 deinit { 95 deinit {
metaCode/Classes/Main/MinePage/Controller/CNLiveTypeFeedBackViewController.swift
@@ -7,12 +7,13 @@ @@ -7,12 +7,13 @@
7 7
8 import Foundation 8 import Foundation
9 import APButton 9 import APButton
  10 +import Photos
10 11
11 enum ListShowType { 12 enum ListShowType {
12 case feedback 13 case feedback
13 case setting 14 case setting
14 case privacy 15 case privacy
15 - case manager 16 + case manager//系统权限管理
16 case about 17 case about
17 case info 18 case info
18 } 19 }
@@ -50,9 +51,9 @@ class CNLiveTypeFeedBackViewController : CNLiveBaseViewController, UITableViewDe @@ -50,9 +51,9 @@ class CNLiveTypeFeedBackViewController : CNLiveBaseViewController, UITableViewDe
50 dataArray.add(["icon":"","name":"个人信息保护政策"]) 51 dataArray.add(["icon":"","name":"个人信息保护政策"])
51 } 52 }
52 if _show_type == .manager { 53 if _show_type == .manager {
53 - dataArray.add(["icon":"mine_list_sub_set_poistion","name":"位置","desc":"用于判断您的所在位置"]) 54 +// dataArray.add(["icon":"mine_list_sub_set_poistion","name":"位置","desc":"用于判断您的所在位置"])
54 dataArray.add(["icon":"mine_list_sub_set_photo","name":"相册","desc":"用于上传反馈问题截图等业务流程"]) 55 dataArray.add(["icon":"mine_list_sub_set_photo","name":"相册","desc":"用于上传反馈问题截图等业务流程"])
55 - dataArray.add(["icon":"mine_list_sub_set_note","name":"通知","desc":"用于及时接收消息用于账户安全等风险控制"]) 56 +// dataArray.add(["icon":"mine_list_sub_set_note","name":"通知","desc":"用于及时接收消息用于账户安全等风险控制"])
56 } 57 }
57 if _show_type == .about { 58 if _show_type == .about {
58 dataArray.add(["icon":"","name":"版本更新","more":"当前已经是最新版本"]) 59 dataArray.add(["icon":"","name":"版本更新","more":"当前已经是最新版本"])
@@ -284,6 +285,24 @@ extension CNLiveTypeFeedBackViewController { @@ -284,6 +285,24 @@ extension CNLiveTypeFeedBackViewController {
284 self.navigationController?.pushViewController(CNLiveInfoShowViewController.init(show_type: .privacy,is_login: false), animated: true) 285 self.navigationController?.pushViewController(CNLiveInfoShowViewController.init(show_type: .privacy,is_login: false), animated: true)
285 } 286 }
286 } 287 }
  288 + if _show_type == .manager {
  289 +
  290 + // 已弹窗则直接跳转到系统设置;
  291 + //未弹窗 先弹窗再跳转系统设置
  292 + PHPhotoLibrary.requestAuthorization(
  293 + { (status) in
  294 +
  295 + DispatchQueue.main.async
  296 + {
  297 + if let settingUrl = URL(string:UIApplication.openSettingsURLString)
  298 + {
  299 + if UIApplication.shared.canOpenURL(settingUrl){
  300 + UIApplication.shared.open(settingUrl, options: [:], completionHandler: nil)
  301 + }
  302 + }
  303 + }
  304 + })
  305 + }
287 if _show_type == .about { 306 if _show_type == .about {
288 if indexPath.section == 0 { 307 if indexPath.section == 0 {
289 print("跳转app商店") 308 print("跳转app商店")
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
@@ -148,8 +148,8 @@ final class StandListModel: BaseModel, TableCodable { @@ -148,8 +148,8 @@ final class StandListModel: BaseModel, TableCodable {
148 var descBackgroundImg: String = ""//首页文字背景图 148 var descBackgroundImg: String = ""//首页文字背景图
149 var cardImg: String = ""//卡片背景图 149 var cardImg: String = ""//卡片背景图
150 var cardBackgroundImg: String = ""//首页卡片背景图 150 var cardBackgroundImg: String = ""//首页卡片背景图
151 - var upPath: String = ""//上滑h5  
152 - var downPath: String = ""//下滑h5 151 + var upPath: String = ""//顶部h5
  152 + var downPath: String = ""//底部h5
153 var auth: Bool = false//身份是否验证 153 var auth: Bool = false//身份是否验证
154 154
155 var createTimeString: String = "" 155 var createTimeString: String = ""
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
@@ -322,7 +322,7 @@ class CNLiveMineViewModel: NSObject { @@ -322,7 +322,7 @@ class CNLiveMineViewModel: NSObject {
322 if (error == nil) { 322 if (error == nil) {
323 let resp = result as! NSDictionary 323 let resp = result as! NSDictionary
324 let errorCode = "\(resp["errorCode"] ?? "0")" 324 let errorCode = "\(resp["errorCode"] ?? "0")"
325 - if (errorCode == "0" && resp["data"] is NSNull) { 325 + if (errorCode == "0" && !(resp["data"] is NSNull)) {
326 let listModel = dictionaryToModel(resp as! [String : Any], MineAuthListBaseModel.self,"data") as! MineAuthListBaseModel 326 let listModel = dictionaryToModel(resp as! [String : Any], MineAuthListBaseModel.self,"data") as! MineAuthListBaseModel
327 if page == 1 && listModel.list.count > 0 { 327 if page == 1 && listModel.list.count > 0 {
328 CNLiveSaveAuthDB.shared.insertObjects(objects: listModel.list) 328 CNLiveSaveAuthDB.shared.insertObjects(objects: listModel.list)