Commit 4363f766 authored by Alex朱枝文's avatar Alex朱枝文

修改可能造成崩溃的代码

parent e21a4ac3
...@@ -341,6 +341,7 @@ extension AppDelegate { ...@@ -341,6 +341,7 @@ extension AppDelegate {
#else #else
options.debug = false // Enabled debug when first installing is always helpful options.debug = false // Enabled debug when first installing is always helpful
options.environment = "production" options.environment = "production"
options.attachViewHierarchy = true
#endif #endif
} }
// Remove the next line after confirming that your Sentry integration is working. // Remove the next line after confirming that your Sentry integration is working.
......
...@@ -200,12 +200,12 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource { ...@@ -200,12 +200,12 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource {
if let model = viewModel.uploadCertificateDataListModel { if let model = viewModel.uploadCertificateDataListModel {
var tmp: YHUploadCertificateModel? var tmp: YHUploadCertificateModel?
if indexPath.section == 0 { if indexPath.section == 0 {
if model.small_whites.count > 0, indexPath.row - 1 < model.small_whites.count { if model.small_whites.count > 0, indexPath.row - 1 >= 0, indexPath.row - 1 < model.small_whites.count {
tmp = model.small_whites[indexPath.row - 1] tmp = model.small_whites[indexPath.row - 1]
vc.detailType = .SmallWhiteNote vc.detailType = .SmallWhiteNote
} }
} else if indexPath.section == 1 { } else if indexPath.section == 1 {
if model.id_cards.count > 0, indexPath.row - 1 < model.id_cards.count { if model.id_cards.count > 0, indexPath.row - 1 >= 0, indexPath.row - 1 < model.id_cards.count {
tmp = model.id_cards[indexPath.row - 1] tmp = model.id_cards[indexPath.row - 1]
vc.detailType = .HongKongCard vc.detailType = .HongKongCard
} }
......
...@@ -19,8 +19,16 @@ class YHLookResignResultViewController: YHBaseViewController { ...@@ -19,8 +19,16 @@ class YHLookResignResultViewController: YHBaseViewController {
return vm return vm
}() }()
var headView: YHLookResignResultHeadView! lazy var headView: YHLookResignResultHeadView = {
var privacyView: YHLookResignResultPrivateView! let view = YHLookResignResultHeadView()
view.state = state
return view
}()
lazy var privacyView: YHLookResignResultPrivateView = {
let view = YHLookResignResultPrivateView()
return view
}()
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped) let tableView = UITableView(frame: .zero, style: .grouped)
...@@ -117,12 +125,6 @@ private extension YHLookResignResultViewController { ...@@ -117,12 +125,6 @@ private extension YHLookResignResultViewController {
func setupUI() { func setupUI() {
view.backgroundColor = UIColor.contentBkgColor view.backgroundColor = UIColor.contentBkgColor
headView = {
let view = YHLookResignResultHeadView()
view.state = state
return view
}()
headView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 239.fix) headView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 239.fix)
view.addSubview(bottomView) view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in bottomView.snp.makeConstraints { make in
...@@ -164,10 +166,6 @@ private extension YHLookResignResultViewController { ...@@ -164,10 +166,6 @@ private extension YHLookResignResultViewController {
make.top.equalToSuperview() make.top.equalToSuperview()
make.bottom.equalTo(-138) make.bottom.equalTo(-138)
} }
privacyView = {
let view = YHLookResignResultPrivateView()
return view
}()
view.addSubview(privacyView) view.addSubview(privacyView)
privacyView.snp.makeConstraints { make in privacyView.snp.makeConstraints { make in
make.bottom.equalTo(-98) make.bottom.equalTo(-98)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment