Commit 58fda385099e9ef393495d48149acd9ad6432e42

Authored by 张旭
1 parent 4e7a1997

我的身份判断逻辑修复

metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
... ... @@ -12,9 +12,12 @@ import CNLiveRequestBastKit
12 12  
13 13 let Width: CGFloat = UIScreen.main.bounds.size.width
14 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 23 let CNKeyIsFirstAppearUpSlideHomeGuide: String = "isFirstAppearUpSlideHomeGuideKey"
... ... @@ -210,7 +213,8 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
210 213  
211 214 //提交身份审核后刷新
212 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 219 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight
216 220  
... ... @@ -340,6 +344,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
340 344 self.pageFlowView.scrollView.isScrollEnabled = false
341 345 self.view.addSubview(self.downSlideGuideView)
342 346 self.view.addSubview(self.downSlideGifView)
  347 + self.tabBarController?.tabBar.isHidden = true
343 348 }
344 349  
345 350 }else{
... ... @@ -347,6 +352,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
347 352 self.pageFlowView.scrollView.isScrollEnabled = false
348 353 self.view.addSubview(self.upSlideGuideView)
349 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 465  
460 466 //移除上滑引导
461 467 if(self.upSlideGuideView.superview != nil){
  468 + self.tabBarController?.tabBar.isHidden = false
462 469 self.upSlideGuideView.removeFromSuperview()
463 470 self.upSlideGifView.removeFromSuperview()
464 471 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearUpSlideHomeGuide)
... ... @@ -466,6 +473,7 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
466 473  
467 474 //移除下滑引导
468 475 if (self.downSlideGuideView.superview != nil) {
  476 + self.tabBarController?.tabBar.isHidden = false
469 477 self.downSlideGuideView.removeFromSuperview()
470 478 self.downSlideGifView.removeFromSuperview()
471 479 UserDefaults.standard.set("flase", forKey: CNKeyIsFirstAppearDownSlideHomeGuide)
... ...
metaCode/Classes/Main/HomePage/View/CNHomePageGuideView.swift
... ... @@ -58,9 +58,9 @@ class CNHomePageGuideView: UIView{
58 58 let path:UIBezierPath = UIBezierPath.init(rect: UIScreen.main.bounds)
59 59  
60 60 //rect 首页被镂空的区域
61   - let W = KSreenWidth-50
  61 + let W = MainViewW//KSreenWidth-50
62 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 65 let appendPath: UIBezierPath = UIBezierPath.init(roundedRect: rect, cornerRadius: 20)
66 66 path.append(appendPath.reversing())
... ...
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
... ... @@ -321,7 +321,7 @@ class CNLiveMineViewModel: NSObject {
321 321 if (error == nil) {
322 322 let resp = result as! NSDictionary
323 323 let errorCode = "\(resp["errorCode"] ?? "0")"
324   - if (errorCode == "0" && resp["data"] is NSNull) {
  324 + if (errorCode == "0" && !(resp["data"] is NSNull)) {
325 325 let listModel = dictionaryToModel(resp as! [String : Any], MineAuthListBaseModel.self,"data") as! MineAuthListBaseModel
326 326 if page == 1 && listModel.list.count > 0 {
327 327 CNLiveSaveAuthDB.shared.insertObjects(objects: listModel.list)
... ...