Commit c15cb082 authored by David黄金龙's avatar David黄金龙

处理 首页 可能崩溃的问题

parent ff1a74cb
......@@ -113,9 +113,9 @@ class YHHomePageViewController: YHBaseViewController {
}
DispatchQueue.main.async {
self.showOrderTipsView(isShow)
}
// DispatchQueue.main.async {
// self.showOrderTipsView(isShow)
// }
}
self.viewModel.getLastTwoMessagesForSigner { success, error in
if success {
......@@ -126,9 +126,9 @@ class YHHomePageViewController: YHBaseViewController {
}
DispatchQueue.main.async {
self.showOrderTipsView(isShow)
}
// DispatchQueue.main.async {
// self.showOrderTipsView(isShow)
// }
}
} else {
DispatchQueue.main.async {
......@@ -153,9 +153,9 @@ class YHHomePageViewController: YHBaseViewController {
var r = homeCollectView.frame
r.origin.y = r.origin.y - homeHeaderViewHeight
tmpHeadView.frame = r
// homeCollectView.es.addInfiniteScrolling {
// self.loadMoreData()
// }
homeCollectView.es.addInfiniteScrolling {
self.loadMoreData()
}
self.homeCollectView.setContentOffset(CGPoint(x: 0, y: -homeHeaderViewHeight), animated: false)
}
}
......
......@@ -203,10 +203,10 @@ private extension YHOrderTipsView {
let timestamp = now.timeIntervalSince1970
print("当前时间戳:\(timestamp)")
let offsetSecond = CGFloat(model.registration_timestamp - Int64(timestamp))
let offsetSecond = CGFloat(Int64(timestamp) - model.registration_timestamp)
if offsetSecond > 0 {
let roundedUp = Int(ceil(offsetSecond / 24 * 60 * 60))
let roundedUp = Int(ceil(offsetSecond / (24 * 60 * 60)))
lableDays.text = "银河港生活陪伴您的第" + String(roundedUp) + "天"
} else {
lableDays.text = "银河港生活陪伴在您的身边"
......
......@@ -51,6 +51,16 @@ class YHScoreOptionsView: UIView {
}()
// lazy var testImagV : UIImageView = {
// let view = UIImageView(frame: CGRect(x: 0, y: 0, width: 40, height: 20))
// view.backgroundColor = UIColor.red
// return view
// }()
var dataModel : YHScoreOptiosModel? {
didSet {
updateUI()
......@@ -74,6 +84,16 @@ private extension YHScoreOptionsView {
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomLine.snp.top).offset(-kMargin)
}
// addSubview(testImagV)
// testImagV.snp.makeConstraints { make in
// make.top.equalTo(kMargin)
// make.left.right.equalToSuperview()
// make.bottom.equalTo(bottomLine.snp.top).offset(-kMargin)
// }
}
......
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