Commit 1b3087bd0ce04f745f24a11bf0c54aa86b0702fa

Authored by liushiyu
1 parent 0b8f3858

兼容网家家环境库

metaCode/Classes/Environment/CNLiveEnvironment.swift
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 // 6 //
7 7
8 import Foundation 8 import Foundation
  9 +import CNLiveEnvironment
9 10
10 ///当前应用的APPID 11 ///当前应用的APPID
11 let APPId: String = CNLiveEnvironmentManager.shared.appId 12 let APPId: String = CNLiveEnvironmentManager.shared.appId
@@ -135,10 +136,13 @@ class CNLiveEnvironmentManager: NSObject{ @@ -135,10 +136,13 @@ class CNLiveEnvironmentManager: NSObject{
135 switch environment { 136 switch environment {
136 case .development: 137 case .development:
137 self.developmentEnvironment() 138 self.developmentEnvironment()
  139 + CNLiveEnvironmentManager.shared.setupEnvironment(environment: .development)
138 case .testFlight: 140 case .testFlight:
139 self.testFlightEnvironment() 141 self.testFlightEnvironment()
  142 + CNLiveEnvironmentManager.shared.setupEnvironment(environment: .testFlight)
140 case .production: 143 case .production:
141 self.productionEnvironment() 144 self.productionEnvironment()
  145 + CNLiveEnvironmentManager.shared.setupEnvironment(environment: .production)
142 } 146 }
143 } 147 }
144 148
metaCode/Classes/Main/MinePage/Controller/CNLiveMineAuthFormViewController.swift
@@ -82,8 +82,7 @@ class CNLiveMineAuthFormViewController: CNLiveBaseViewController, UITableViewDel @@ -82,8 +82,7 @@ class CNLiveMineAuthFormViewController: CNLiveBaseViewController, UITableViewDel
82 guard let cell = tableView.dequeueReusableCell(withIdentifier: kMIneBodyAuthFormViewCellIdentifier) as? MineAuthFormTableViewCell else { 82 guard let cell = tableView.dequeueReusableCell(withIdentifier: kMIneBodyAuthFormViewCellIdentifier) as? MineAuthFormTableViewCell else {
83 return MineAuthFormTableViewCell() 83 return MineAuthFormTableViewCell()
84 } 84 }
85 - cell.indexPath = indexPath  
86 - cell.clickBlock = {[weak self] indexPath, view in 85 + cell.clickBlock = {[weak self] view in
87 guard let self = self else { return } 86 guard let self = self else { return }
88 let titleLabel = view.viewWithTag(1000) as! UILabel 87 let titleLabel = view.viewWithTag(1000) as! UILabel
89 if titleLabel.text == "个人认证" { 88 if titleLabel.text == "个人认证" {
@@ -147,7 +146,7 @@ extension CNLiveMineAuthFormViewController { @@ -147,7 +146,7 @@ extension CNLiveMineAuthFormViewController {
147 } 146 }
148 } 147 }
149 148
150 -typealias clickWithClickBlock = (_ indexPath: IndexPath,_ view: UIView) -> Void 149 +typealias clickWithClickBlock = (_ view: UIView) -> Void
151 class MineAuthFormTableViewCell: UITableViewCell { 150 class MineAuthFormTableViewCell: UITableViewCell {
152 151
153 lazy var mainView: UIImageView = { 152 lazy var mainView: UIImageView = {
@@ -226,7 +225,6 @@ class MineAuthFormTableViewCell: UITableViewCell { @@ -226,7 +225,6 @@ class MineAuthFormTableViewCell: UITableViewCell {
226 return descLabel 225 return descLabel
227 }() 226 }()
228 227
229 - var indexPath: IndexPath!  
230 var clickBlock: clickWithClickBlock! 228 var clickBlock: clickWithClickBlock!
231 229
232 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 230 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
@@ -298,11 +296,11 @@ class MineAuthFormTableViewCell: UITableViewCell { @@ -298,11 +296,11 @@ class MineAuthFormTableViewCell: UITableViewCell {
298 } 296 }
299 297
300 @objc func clickWithWhiteAction() { 298 @objc func clickWithWhiteAction() {
301 - self.clickBlock(indexPath,whiteView) 299 + self.clickBlock(whiteView)
302 } 300 }
303 301
304 @objc func clickWithWhite01Action() { 302 @objc func clickWithWhite01Action() {
305 - self.clickBlock(indexPath,whiteView01) 303 + self.clickBlock(whiteView01)
306 } 304 }
307 305
308 required init?(coder: NSCoder) { 306 required init?(coder: NSCoder) {