Commit 9500ca2a1fffe6e87e6ba0c16f5db1f0b31ea780
1 parent
3e3aedfd
界面显示异常修改
Showing
9 changed files
with
55 additions
and
29 deletions
metaCode/Classes/Common/Base/CNLiveBaseViewController.swift
| @@ -139,7 +139,7 @@ class CNLiveBaseViewController: UIViewController { | @@ -139,7 +139,7 @@ class CNLiveBaseViewController: UIViewController { | ||
| 139 | 139 | ||
| 140 | override func viewWillLayoutSubviews() { | 140 | override func viewWillLayoutSubviews() { |
| 141 | super.viewWillLayoutSubviews() | 141 | super.viewWillLayoutSubviews() |
| 142 | - topNavView.frame = CGRect(x: 0, y: 0, width: view.width, height: topNavViewHeight) | 142 | + topNavView.frame = CGRect(x: 0, y: get_system_statusBar_height(), width: view.width, height: topNavViewHeight + get_system_statusBar_height()) |
| 143 | let lrSpace = leftNavSpace > rightNavSpace ? leftNavSpace : rightNavSpace | 143 | let lrSpace = leftNavSpace > rightNavSpace ? leftNavSpace : rightNavSpace |
| 144 | titleLabel.frame = CGRect(x: CGFloat(Int(lrSpace)) , y: topNavViewHeight - get_system_nav_ui_height() - topNavViewSubUIContentOffsetY, width: topNavView.width - (lrSpace * 2), height: get_system_nav_ui_height()) | 144 | titleLabel.frame = CGRect(x: CGFloat(Int(lrSpace)) , y: topNavViewHeight - get_system_nav_ui_height() - topNavViewSubUIContentOffsetY, width: topNavView.width - (lrSpace * 2), height: get_system_nav_ui_height()) |
| 145 | leftNavBtns.forEach { currentBtn in | 145 | leftNavBtns.forEach { currentBtn in |
metaCode/Classes/Main/LoginPage/Controller/CNLiveLoginViewController.swift
| @@ -299,8 +299,8 @@ extension CNLiveLoginViewController { | @@ -299,8 +299,8 @@ extension CNLiveLoginViewController { | ||
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | @objc func pushInfoActionMothod() { | 301 | @objc func pushInfoActionMothod() { |
| 302 | - self.present(CNLiveInfoShowViewController.init(show_type: .service, is_login: true), animated: true) | ||
| 303 | -// navi.pushViewController(CNLiveInfoShowViewController.init(show_type: .privacy), animated: true) | 302 | + self.present(CNLiveInfoShowViewController.init(show_type: .privacy, is_login: true), animated: true) |
| 303 | +// navi.pushViewController(CNLiveInfoShowViewController.init(show_type: .privacy, is_login: true), animated: true) | ||
| 304 | } | 304 | } |
| 305 | } | 305 | } |
| 306 | 306 |
metaCode/Classes/Main/MinePage/Controller/CNLiveHelpFeedBackViewController.swift
| @@ -41,12 +41,10 @@ class CNLiveHelpFeedBackViewController : CNLiveBaseViewController, UICollectionV | @@ -41,12 +41,10 @@ class CNLiveHelpFeedBackViewController : CNLiveBaseViewController, UICollectionV | ||
| 41 | 41 | ||
| 42 | view.addSubview(collectionView) | 42 | view.addSubview(collectionView) |
| 43 | collectionView.snp.makeConstraints { make in | 43 | collectionView.snp.makeConstraints { make in |
| 44 | - make.top.equalToSuperview().offset(get_system_nav_height()) | 44 | + make.top.equalToSuperview().offset(KNavigationHeight) |
| 45 | make.left.bottom.right.equalToSuperview() | 45 | make.left.bottom.right.equalToSuperview() |
| 46 | } | 46 | } |
| 47 | - | ||
| 48 | } | 47 | } |
| 49 | - | ||
| 50 | } | 48 | } |
| 51 | 49 | ||
| 52 | extension CNLiveHelpFeedBackViewController { | 50 | extension CNLiveHelpFeedBackViewController { |
metaCode/Classes/Main/MinePage/Controller/CNLiveInfoShowViewController.swift
| @@ -70,7 +70,7 @@ class CNLiveInfoShowViewController: CNLiveBaseViewController, WKNavigationDelega | @@ -70,7 +70,7 @@ class CNLiveInfoShowViewController: CNLiveBaseViewController, WKNavigationDelega | ||
| 70 | 70 | ||
| 71 | view.addSubview(webView) | 71 | view.addSubview(webView) |
| 72 | webView.snp.makeConstraints { make in | 72 | webView.snp.makeConstraints { make in |
| 73 | - make.top.equalToSuperview().offset(get_system_nav_height()) | 73 | + make.top.equalToSuperview().offset(KNavigationHeight) |
| 74 | make.left.right.bottom.equalToSuperview() | 74 | make.left.right.bottom.equalToSuperview() |
| 75 | } | 75 | } |
| 76 | 76 |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAddInfoViewController.swift
| @@ -114,7 +114,7 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | @@ -114,7 +114,7 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | ||
| 114 | navigationBarHidden = false | 114 | navigationBarHidden = false |
| 115 | view.addSubview(tableView) | 115 | view.addSubview(tableView) |
| 116 | tableView.snp.makeConstraints { make in | 116 | tableView.snp.makeConstraints { make in |
| 117 | - make.top.equalTo(get_system_nav_height()) | 117 | + make.top.equalTo(get_system_nav_height()+get_system_statusBar_height()) |
| 118 | make.left.right.bottom.equalToSuperview() | 118 | make.left.right.bottom.equalToSuperview() |
| 119 | } | 119 | } |
| 120 | } | 120 | } |
| @@ -131,12 +131,16 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | @@ -131,12 +131,16 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | ||
| 131 | if listBaseModel.pageNum == 1 { | 131 | if listBaseModel.pageNum == 1 { |
| 132 | self!.dataArray.removeAllObjects() | 132 | self!.dataArray.removeAllObjects() |
| 133 | self!.dataArray.addObjects(from: (result as! StandListBaseModel).list) | 133 | self!.dataArray.addObjects(from: (result as! StandListBaseModel).list) |
| 134 | - self!.tableView.reloadData() | ||
| 135 | - self!.tableView.mj_header?.endRefreshing() | ||
| 136 | - self!.tableView.mj_footer?.endRefreshing() | ||
| 137 | - }else{ | ||
| 138 | - | ||
| 139 | } | 134 | } |
| 135 | + if listBaseModel.pageNum > 1 { | ||
| 136 | + self!.dataArray.addObjects(from: (result as! StandListBaseModel).list) | ||
| 137 | + } | ||
| 138 | + if self!.dataArray.count > 0 { | ||
| 139 | + self!.checkAlreadyAuthStatue() | ||
| 140 | + } | ||
| 141 | + self!.tableView.reloadData() | ||
| 142 | + self!.tableView.mj_header?.endRefreshing() | ||
| 143 | + self!.tableView.mj_footer?.endRefreshing() | ||
| 140 | if listBaseModel.total == listBaseModel.pageNum { | 144 | if listBaseModel.total == listBaseModel.pageNum { |
| 141 | self!.tableView.mj_footer?.endRefreshing() | 145 | self!.tableView.mj_footer?.endRefreshing() |
| 142 | self!.tableView.mj_footer?.endRefreshingWithNoMoreData() | 146 | self!.tableView.mj_footer?.endRefreshingWithNoMoreData() |
| @@ -197,13 +201,25 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | @@ -197,13 +201,25 @@ class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDel | ||
| 197 | self!.pageNum = 1 | 201 | self!.pageNum = 1 |
| 198 | self!.loadData() | 202 | self!.loadData() |
| 199 | }) | 203 | }) |
| 200 | - tableView.mj_footer = MJRefreshAutoNormalFooter.init(refreshingBlock: {[weak self] in | 204 | + |
| 205 | + tableView.mj_footer = MJRefreshBackFooter.init(refreshingBlock: {[weak self] in | ||
| 201 | self!.pageNum += 1 | 206 | self!.pageNum += 1 |
| 202 | self!.loadData() | 207 | self!.loadData() |
| 203 | }) | 208 | }) |
| 204 | } | 209 | } |
| 205 | } | 210 | } |
| 206 | 211 | ||
| 212 | + /// 判断是不是有已经有认证的情况 | ||
| 213 | + func checkAlreadyAuthStatue() { | ||
| 214 | + for item in self.dataArray { | ||
| 215 | + let authModel = item as! StandListModel | ||
| 216 | + if authModel.auth { | ||
| 217 | + is_sort = true | ||
| 218 | + break | ||
| 219 | + } | ||
| 220 | + } | ||
| 221 | + } | ||
| 222 | + | ||
| 207 | @objc func StandAuthNotificationSuccessAction() { | 223 | @objc func StandAuthNotificationSuccessAction() { |
| 208 | self.pageNum = 1 | 224 | self.pageNum = 1 |
| 209 | loadData() | 225 | loadData() |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAuthResultViewController.swift
| @@ -146,6 +146,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | @@ -146,6 +146,7 @@ class CNLiveMineAuthResultViewController: CNLiveBaseViewController { | ||
| 146 | self?.tipDesc.text = listBaseModel.name!.count > 0 ? "您已是\(listBaseModel.name ?? "")!" : "恭喜您通过认证" | 146 | self?.tipDesc.text = listBaseModel.name!.count > 0 ? "您已是\(listBaseModel.name ?? "")!" : "恭喜您通过认证" |
| 147 | self?._status = .default | 147 | self?._status = .default |
| 148 | self?.setNeedsStatusBarAppearanceUpdate() | 148 | self?.setNeedsStatusBarAppearanceUpdate() |
| 149 | + NotificationCenter.default.post(name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) | ||
| 149 | }else{ | 150 | }else{ |
| 150 | self?.iDCardView.isHidden = true | 151 | self?.iDCardView.isHidden = true |
| 151 | self?.mainView.image = UIImage(named: "mine_auth_result_header_failer") | 152 | self?.mainView.image = UIImage(named: "mine_auth_result_header_failer") |
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
| @@ -70,6 +70,8 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | @@ -70,6 +70,8 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | ||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) | 72 | NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) |
| 73 | + NotificationCenter.default.addObserver(self, selector: #selector(StandAuthNotificationSuccessAction), name: Notification.Name.StandAuth.StandAuthSortNotificationResult, object: nil) | ||
| 74 | + StandAuthNotificationSuccessAction() | ||
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | 77 | ||
| @@ -95,11 +97,16 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | @@ -95,11 +97,16 @@ class CNLiveMineViewController : CNLiveBaseViewController, UITableViewDelegate, | ||
| 95 | 97 | ||
| 96 | 98 | ||
| 97 | @objc func StandAuthNotificationSuccessAction() { | 99 | @objc func StandAuthNotificationSuccessAction() { |
| 98 | - tableView.reloadData() | 100 | + CNLiveMineViewModel.requestsGETAuthInfoList(page: 1) { [self] result, respStatue in |
| 101 | + if respStatue == .success { | ||
| 102 | + tableView.reloadData() | ||
| 103 | + } | ||
| 104 | + } | ||
| 99 | } | 105 | } |
| 100 | 106 | ||
| 101 | deinit { | 107 | deinit { |
| 102 | NotificationCenter.default.removeObserver(self, name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) | 108 | NotificationCenter.default.removeObserver(self, name: Notification.Name.StandAuth.StandAuthNotificationSuccess, object: nil) |
| 109 | + NotificationCenter.default.removeObserver(self, name: Notification.Name.StandAuth.StandAuthSortNotificationResult, object: nil) | ||
| 103 | } | 110 | } |
| 104 | } | 111 | } |
| 105 | 112 |
metaCode/Classes/Main/MinePage/Controller/CNLiveTypeFeedBackViewController.swift
| @@ -168,7 +168,7 @@ class CNLiveTypeFeedBackViewController : CNLiveBaseViewController, UITableViewDe | @@ -168,7 +168,7 @@ class CNLiveTypeFeedBackViewController : CNLiveBaseViewController, UITableViewDe | ||
| 168 | 168 | ||
| 169 | view.addSubview(tableView) | 169 | view.addSubview(tableView) |
| 170 | tableView.snp.makeConstraints { make in | 170 | tableView.snp.makeConstraints { make in |
| 171 | - make.top.equalToSuperview().offset(get_system_nav_height()) | 171 | + make.top.equalToSuperview().offset(KNavigationHeight) |
| 172 | make.left.right.bottom.equalToSuperview() | 172 | make.left.right.bottom.equalToSuperview() |
| 173 | } | 173 | } |
| 174 | 174 |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
| @@ -254,7 +254,7 @@ class CNLiveMineViewModel: NSObject { | @@ -254,7 +254,7 @@ class CNLiveMineViewModel: NSObject { | ||
| 254 | static func requestAuthStandList(page: NSInteger, resultBlock: @escaping resultNewsBlock) { | 254 | static func requestAuthStandList(page: NSInteger, resultBlock: @escaping resultNewsBlock) { |
| 255 | let param = NSMutableDictionary() | 255 | let param = NSMutableDictionary() |
| 256 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 256 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 257 | - param.setValue("10", forKey: "pageSize") | 257 | + param.setValue("30", forKey: "pageSize") |
| 258 | param.setValue("\(page)", forKey: "page") | 258 | param.setValue("\(page)", forKey: "page") |
| 259 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 259 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 260 | CNLiveNetworking.setupShowDataResult(false) | 260 | CNLiveNetworking.setupShowDataResult(false) |
| @@ -313,7 +313,7 @@ class CNLiveMineViewModel: NSObject { | @@ -313,7 +313,7 @@ class CNLiveMineViewModel: NSObject { | ||
| 313 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | 313 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") |
| 314 | param.setValue("1", forKey: "type") //0正在审核 1已认证 -1审核失败 | 314 | param.setValue("1", forKey: "type") //0正在审核 1已认证 -1审核失败 |
| 315 | param.setValue("\(page)", forKey: "page") | 315 | param.setValue("\(page)", forKey: "page") |
| 316 | - param.setValue("10", forKey: "pageSize") | 316 | + param.setValue("30", forKey: "pageSize") |
| 317 | CNLiveNetworking.setAllowRequestDefaultArgument(true) | 317 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 318 | CNLiveNetworking.setupShowDataResult(false) | 318 | CNLiveNetworking.setupShowDataResult(false) |
| 319 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/identityApi/myList", param: param as! [String: String], cacheType: .networkOnly) { task, result, error in | 319 | CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/identityApi/myList", param: param as! [String: String], cacheType: .networkOnly) { task, result, error in |
| @@ -486,14 +486,18 @@ class CNLiveMineViewModel: NSObject { | @@ -486,14 +486,18 @@ class CNLiveMineViewModel: NSObject { | ||
| 486 | let resp = result as! NSDictionary | 486 | let resp = result as! NSDictionary |
| 487 | let errorCode = "\(resp["errorCode"] ?? "0")" | 487 | let errorCode = "\(resp["errorCode"] ?? "0")" |
| 488 | if (errorCode == "0" && (resp["data"] != nil)) { | 488 | if (errorCode == "0" && (resp["data"] != nil)) { |
| 489 | - let userInfoModel = dictionaryToModel(resp as! [String : Any], UpdateInfoModel.self,"data") as! UpdateInfoModel | ||
| 490 | - let ver1 = "\(userInfoModel.version.split(separator: "_").last ?? "0")" | ||
| 491 | - let ver2 = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String | ||
| 492 | - print("获取的新版本号=>\(ver1),原来的版本号=>\(ver2)") | ||
| 493 | - if CNLiveMineViewModel.compare(v1: ver1, v2: ver2) { | ||
| 494 | - resultBlock(userInfoModel,.success) | 489 | + if resp["data"] is NSNull { |
| 490 | + resultBlock(NSNull(),.failed) | ||
| 495 | } else { | 491 | } else { |
| 496 | - print("没有新版本") | 492 | + let userInfoModel = dictionaryToModel(resp as! [String : Any], UpdateInfoModel.self,"data") as! UpdateInfoModel |
| 493 | + let ver1 = "\(userInfoModel.version.split(separator: "_").last ?? "0")" | ||
| 494 | + let ver2 = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String | ||
| 495 | + print("获取的新版本号=>\(ver1),原来的版本号=>\(ver2)") | ||
| 496 | + if CNLiveMineViewModel.compare(v1: ver1, v2: ver2) { | ||
| 497 | + resultBlock(userInfoModel,.success) | ||
| 498 | + } else { | ||
| 499 | + print("没有新版本") | ||
| 500 | + } | ||
| 497 | } | 501 | } |
| 498 | } else { | 502 | } else { |
| 499 | resultBlock(NSNull(),.failed) | 503 | resultBlock(NSNull(),.failed) |
| @@ -672,10 +676,10 @@ class CNLiveMineViewModel: NSObject { | @@ -672,10 +676,10 @@ class CNLiveMineViewModel: NSObject { | ||
| 672 | let param = NSMutableDictionary() | 676 | let param = NSMutableDictionary() |
| 673 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "targetId") | 677 | param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "targetId") |
| 674 | param.setValue("0", forKey: "type")//0全部(默认) 1收入 2支出 | 678 | param.setValue("0", forKey: "type")//0全部(默认) 1收入 2支出 |
| 675 | -// param.setValue("\((timeStamp * 1000) - 30*24*60*60)", forKey: "startTime")//"1600569015000" | ||
| 676 | -// param.setValue("\((timeStamp * 1000))", forKey: "endTime")//"1603074615000" | ||
| 677 | - param.setValue("1600569015000", forKey: "startTime") | ||
| 678 | - param.setValue("1603074615000", forKey: "endTime") | 679 | + param.setValue("\((timeStamp * 1000) - 30*24*60*60)", forKey: "startTime")//"1600569015000" |
| 680 | + param.setValue("\((timeStamp * 1000))", forKey: "endTime")//"1603074615000" | ||
| 681 | +// param.setValue("1600569015000", forKey: "startTime") | ||
| 682 | +// param.setValue("1603074615000", forKey: "endTime") | ||
| 679 | param.setValue("10", forKey: "pageSize") | 683 | param.setValue("10", forKey: "pageSize") |
| 680 | param.setValue("\(page)", forKey: "pageNo") | 684 | param.setValue("\(page)", forKey: "pageNo") |
| 681 | let custom_param = NSMutableDictionary() | 685 | let custom_param = NSMutableDictionary() |