Commit 58fda385099e9ef393495d48149acd9ad6432e42

Authored by 张旭
1 parent 4e7a1997

我的身份判断逻辑修复

metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
@@ -12,9 +12,12 @@ import CNLiveRequestBastKit @@ -12,9 +12,12 @@ import CNLiveRequestBastKit
12 12
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 -///主窗口宽度  
16 -let MainViewW: CGFloat = Width-100  
17 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
18 21
19 ///存储是否第一次显示首页上滑引导 22 ///存储是否第一次显示首页上滑引导
20 let CNKeyIsFirstAppearUpSlideHomeGuide: String = "isFirstAppearUpSlideHomeGuideKey" 23 let CNKeyIsFirstAppearUpSlideHomeGuide: String = "isFirstAppearUpSlideHomeGuideKey"
@@ -210,7 +213,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -210,7 +213,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
210 213
211 //提交身份审核后刷新 214 //提交身份审核后刷新
212 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)
213 - 216 + //我的身份排序后刷新
  217 + NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthSortNotificationResult, object: nil)
214 218
215 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight 219 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight
216 220
@@ -340,6 +344,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -340,6 +344,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
340 self.pageFlowView.scrollView.isScrollEnabled = false 344 self.pageFlowView.scrollView.isScrollEnabled = false
341 self.view.addSubview(self.downSlideGuideView) 345 self.view.addSubview(self.downSlideGuideView)
342 self.view.addSubview(self.downSlideGifView) 346 self.view.addSubview(self.downSlideGifView)
  347 + self.tabBarController?.tabBar.isHidden = true
343 } 348 }
344 349
345 }else{ 350 }else{
@@ -347,6 +352,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -347,6 +352,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
347 self.pageFlowView.scrollView.isScrollEnabled = false 352 self.pageFlowView.scrollView.isScrollEnabled = false
348 self.view.addSubview(self.upSlideGuideView) 353 self.view.addSubview(self.upSlideGuideView)
349 self.view.addSubview(self.upSlideGifView) 354 self.view.addSubview(self.upSlideGifView)
  355 + self.tabBarController?.tabBar.isHidden = true
350 } 356 }
351 } 357 }
352 358
@@ -459,6 +465,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -459,6 +465,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
459 465
460 //移除上滑引导 466 //移除上滑引导
461 if(self.upSlideGuideView.superview != nil){ 467 if(self.upSlideGuideView.superview != nil){
  468 + self.tabBarController?.tabBar.isHidden = false
462 self.upSlideGuideView.removeFromSuperview() 469 self.upSlideGuideView.removeFromSuperview()
463 self.upSlideGifView.removeFromSuperview() 470 self.upSlideGifView.removeFromSuperview()
464 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearUpSlideHomeGuide) 471 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearUpSlideHomeGuide)
@@ -466,6 +473,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -466,6 +473,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
466 473
467 //移除下滑引导 474 //移除下滑引导
468 if (self.downSlideGuideView.superview != nil) { 475 if (self.downSlideGuideView.superview != nil) {
  476 + self.tabBarController?.tabBar.isHidden = false
469 self.downSlideGuideView.removeFromSuperview() 477 self.downSlideGuideView.removeFromSuperview()
470 self.downSlideGifView.removeFromSuperview() 478 self.downSlideGifView.removeFromSuperview()
471 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearDownSlideHomeGuide) 479 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearDownSlideHomeGuide)
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//KSreenWidth-50
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/MinePage/ViewModel/CNLiveMineViewModel.swift
@@ -321,7 +321,7 @@ class CNLiveMineViewModel: NSObject { @@ -321,7 +321,7 @@ class CNLiveMineViewModel: NSObject {
321 if (error == nil) { 321 if (error == nil) {
322 let resp = result as! NSDictionary 322 let resp = result as! NSDictionary
323 let errorCode = "\(resp["errorCode"] ?? "0")" 323 let errorCode = "\(resp["errorCode"] ?? "0")"
324 - if (errorCode == "0" && resp["data"] is NSNull) { 324 + if (errorCode == "0" && !(resp["data"] is NSNull)) {
325 let listModel = dictionaryToModel(resp as! [String : Any], MineAuthListBaseModel.self,"data") as! MineAuthListBaseModel 325 let listModel = dictionaryToModel(resp as! [String : Any], MineAuthListBaseModel.self,"data") as! MineAuthListBaseModel
326 if page == 1 && listModel.list.count > 0 { 326 if page == 1 && listModel.list.count > 0 {
327 CNLiveSaveAuthDB.shared.insertObjects(objects: listModel.list) 327 CNLiveSaveAuthDB.shared.insertObjects(objects: listModel.list)