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

修改可能造成崩溃的代码

parent e21a4ac3
......@@ -341,6 +341,7 @@ extension AppDelegate {
#else
options.debug = false // Enabled debug when first installing is always helpful
options.environment = "production"
options.attachViewHierarchy = true
#endif
}
// Remove the next line after confirming that your Sentry integration is working.
......
......@@ -200,12 +200,12 @@ extension YHUploadCertificateVC: UITableViewDelegate, UITableViewDataSource {
if let model = viewModel.uploadCertificateDataListModel {
var tmp: YHUploadCertificateModel?
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]
vc.detailType = .SmallWhiteNote
}
} 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]
vc.detailType = .HongKongCard
}
......
......@@ -19,8 +19,16 @@ class YHLookResignResultViewController: YHBaseViewController {
return vm
}()
var headView: YHLookResignResultHeadView!
var privacyView: YHLookResignResultPrivateView!
lazy var headView: YHLookResignResultHeadView = {
let view = YHLookResignResultHeadView()
view.state = state
return view
}()
lazy var privacyView: YHLookResignResultPrivateView = {
let view = YHLookResignResultPrivateView()
return view
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
......@@ -117,12 +125,6 @@ private extension YHLookResignResultViewController {
func setupUI() {
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)
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
......@@ -164,10 +166,6 @@ private extension YHLookResignResultViewController {
make.top.equalToSuperview()
make.bottom.equalTo(-138)
}
privacyView = {
let view = YHLookResignResultPrivateView()
return view
}()
view.addSubview(privacyView)
privacyView.snp.makeConstraints { make in
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