Commit 684d5f8ad7e4037095036907b248b163cdd96033

Authored by liushiyu
2 parents 29699912 c89b1a43
metaCode/Classes/Common/Base/CNLiveBaseNavigationController.swift
@@ -29,7 +29,8 @@ class CNLiveBaseNavigationController : UINavigationController, UIGestureRecogniz @@ -29,7 +29,8 @@ class CNLiveBaseNavigationController : UINavigationController, UIGestureRecogniz
29 func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { 29 func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
30 return viewControllers.count > 1 30 return viewControllers.count > 1
31 } 31 }
32 - 32 +
  33 +
33 /// 重写push方法的目的 : 拦截所有push进来的子控制器 34 /// 重写push方法的目的 : 拦截所有push进来的子控制器
34 override func pushViewController(_ viewController: UIViewController, animated: Bool) { 35 override func pushViewController(_ viewController: UIViewController, animated: Bool) {
35 if (self.children.count > 0 ) { 36 if (self.children.count > 0 ) {
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
@@ -36,7 +36,7 @@ enum NetAPIStatus { @@ -36,7 +36,7 @@ enum NetAPIStatus {
36 case notNetwork 36 case notNetwork
37 } 37 }
38 38
39 -class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDelegate, NewPagedFlowViewDataSource, CNCustomIndexViewDelegate{ 39 +class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDelegate, NewPagedFlowViewDataSource, CNCustomIndexViewDelegate,UIGestureRecognizerDelegate{
40 40
41 41
42 ///NewPagedFlowView 开始滑动时的偏移量 42 ///NewPagedFlowView 开始滑动时的偏移量
@@ -184,12 +184,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -184,12 +184,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
184 184
185 self.setupUI() 185 self.setupUI()
186 186
  187 + self.navigationController?.interactivePopGestureRecognizer?.delegate = self
  188 +
187 /// 网络通知 189 /// 网络通知
188 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionNotReachable), name: Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationNotReachable, object: nil) 190 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionNotReachable), name: Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationNotReachable, object: nil)
189 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionUnknown), name: Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationUnknown, object: nil) 191 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionUnknown), name: Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationUnknown, object: nil)
190 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionReachableViaWWAN), name:Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationReachableViaWWAN, object: nil) 192 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionReachableViaWWAN), name:Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationReachableViaWWAN, object: nil)
191 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionReachableViaWiFi), name: Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationReachableViaWiFi, object: nil) 193 NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationActionReachableViaWiFi), name: Notification.Name.NetworkStatus.CNLiveNetworkStatusNotificationReachableViaWiFi, object: nil)
192 194
  195 + //提交身份审核后刷新
  196 + NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil)
  197 +
  198 +
193 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight 199 // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight
194 200
195 } 201 }
@@ -256,6 +262,13 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -256,6 +262,13 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
256 @objc func networkStatusNotificationActionReachableViaWiFi(){ 262 @objc func networkStatusNotificationActionReachableViaWiFi(){
257 self.getUserIdentityApi() 263 self.getUserIdentityApi()
258 } 264 }
  265 +
  266 + //身份审核后刷新接口
  267 + @objc func StandAuthNotificationSuccessAction(){
  268 + self.getUserIdentityApi()
  269 + print("StandAuthNotificationSuccessAction")
  270 + }
  271 +
259 272
260 // MARK: -添加约束 273 // MARK: -添加约束
261 func makeConstraints(){ 274 func makeConstraints(){
@@ -312,6 +325,17 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -312,6 +325,17 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
312 } 325 }
313 } 326 }
314 327
  328 + // MARK: -左滑手势代理
  329 + func gestureRecognizerShouldBegin(_ gestureRecognizer:UIGestureRecognizer) ->Bool{
  330 +
  331 + if (gestureRecognizer == self.navigationController?.interactivePopGestureRecognizer) && (self.navigationController?.visibleViewController == self.navigationController?.viewControllers.first) {
  332 + ///解决执行了 push 之后,push不出界面的 bug,要在 rootvc 中实现这个方法 ,页面透明 , 只能用Debug view Hierarchy图层中看到
  333 + return false
  334 + }
  335 +
  336 + return true
  337 + }
  338 +
315 // MARK: - NewPagedFlowView代理 339 // MARK: - NewPagedFlowView代理
316 340
317 func numberOfPages(in flowView: NewPagedFlowView!) -> Int { 341 func numberOfPages(in flowView: NewPagedFlowView!) -> Int {
metaCode/Classes/Main/HomePage/View/CNIDCardView.swift
@@ -255,7 +255,7 @@ class CNIDCardView: UIView{ @@ -255,7 +255,7 @@ class CNIDCardView: UIView{
255 lazy var iDIconImgView:UIImageView = { 255 lazy var iDIconImgView:UIImageView = {
256 256
257 let iDIconImgView:UIImageView = UIImageView(frame: CGRect(x: 20, y: 25, width: 60, height: 85)) 257 let iDIconImgView:UIImageView = UIImageView(frame: CGRect(x: 20, y: 25, width: 60, height: 85))
258 - iDIconImgView.backgroundColor = UIColor.red 258 + iDIconImgView.backgroundColor = UIColor.clear
259 return iDIconImgView 259 return iDIconImgView
260 }() 260 }()
261 261
metaCode/Classes/Main/HomePage/View/CNMainView.swift
@@ -112,7 +112,6 @@ class CNFrontMainView : UIView{ @@ -112,7 +112,6 @@ class CNFrontMainView : UIView{
112 if(auth == true){ 112 if(auth == true){
113 //已认证身份 113 //已认证身份
114 //显示证件View 114 //显示证件View
115 - print("已认证身份")  
116 iDCardView.isHidden = false 115 iDCardView.isHidden = false
117 iDCardView.idModel = newValue! 116 iDCardView.idModel = newValue!
118 contentView.isHidden = true 117 contentView.isHidden = true