Commit 39fa65c2 authored by David黄金龙's avatar David黄金龙

1、 处理一处可能的crash

2、处理 几处bug
parent ba6ffde7
......@@ -3744,7 +3744,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -3948,7 +3948,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -3994,7 +3994,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......
......@@ -241,7 +241,9 @@ extension YHApplyActivityAlert {
setNeedsLayout()
layoutIfNeeded()
handleSubAndAddButtonUI()
updateButtonUI()
}
......@@ -562,7 +564,6 @@ extension YHApplyActivityAlert {
func updateButtonUI() {
guard let name = nameTextField.text,name.isEmpty == false,let number = applyNumberTextField.text,number.isEmpty == false,let phone = phoneTextField.text,phone.isEmpty == false else {
self.submitButton.isEnabled = false
......@@ -575,6 +576,8 @@ extension YHApplyActivityAlert {
self.submitButton.backgroundColor = UIColor.brandMainColor
handleSubAndAddButtonUI()
}
}
......@@ -604,12 +607,14 @@ extension YHApplyActivityAlert: UITextFieldDelegate {
textField.text = "10"
YHHUD.flash(message: "最多添加10人")
applyNumber = 10
handleSubAndAddButtonUI()
updateButtonUI()
return false
} else if let item = Int(newText),item < 1 {
textField.text = "1"
applyNumber = 1
YHHUD.flash(message: "最少添加1人")
handleSubAndAddButtonUI()
updateButtonUI()
return false
}
......
......@@ -57,7 +57,7 @@ class YHHomePageViewController: YHBaseViewController {
getData()
//3、
requestOrder()
// requestOrder()
}
......@@ -112,7 +112,7 @@ class YHHomePageViewController: YHBaseViewController {
return
}
DispatchQueue.global().async {
// DispatchQueue.global().async {
self.serviceCenterMainReqVM.getContactList {
[weak self] success, error in
guard let self = self else { return }
......@@ -134,27 +134,23 @@ class YHHomePageViewController: YHBaseViewController {
}
DispatchQueue.main.async {
// DispatchQueue.main.async {
self.showOrderTipsView(isShow)
}
// }
}
}
} else {
DispatchQueue.main.async {
// DispatchQueue.main.async {
self.showOrderTipsView(isShow)
}
// }
}
}
}
// }
}
// 是否展示订单提示视图
func showOrderTipsView(_ show:Bool) {
homeHeaderViewHeight = show ? homeHeaderView.homeHeadViewH : YHHomeHeadView.fixViewH
homeHeaderView.frame = CGRect(x: 20, y: -homeHeaderViewHeight, width: KScreenWidth - 40, height: homeHeaderViewHeight)
......@@ -167,7 +163,7 @@ class YHHomePageViewController: YHBaseViewController {
self.getData()
}
var r = homeCollectView.frame //for test hjl
var r = CGRectZero //for test hjl
r.origin.y = -homeHeaderViewHeight - 81
r.origin.x = 0
r.size.width = KScreenWidth
......@@ -178,9 +174,6 @@ class YHHomePageViewController: YHBaseViewController {
homeCollectView.es.addInfiniteScrolling {
self.loadMoreData()
}
}
}
......@@ -309,9 +302,9 @@ private extension YHHomePageViewController {
self.homeCollectView.footer?.alpha = 1
}
CATransaction.setDisableActions(true)
// CATransaction.setDisableActions(true)
self.homeCollectView.reloadData()
CATransaction.commit()
// CATransaction.commit()
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.25, execute: {
......@@ -382,7 +375,7 @@ private extension YHHomePageViewController {
}
@objc func logoutSuccess() {
showOrderTipsView(false)
// showOrderTipsView(false)
self.msgUnreadView.unreadCount = 0
getData()
}
......
......@@ -88,19 +88,20 @@ class YHHomeHeadView: UIView {
var isNeedHideOrderTipsView:Bool = true {
didSet {
self.orderTipsView.isHidden = isNeedHideOrderTipsView
self.aiRadarArea.snp.updateConstraints { make in
let topMargin = isNeedHideOrderTipsView ? 20.0 : 20.0 + orderTipsView.tipViewH + 20.0
make.top.equalTo(bannerLineTop.snp.bottom).offset(topMargin)
}
self.setNeedsLayout()
self.layoutIfNeeded()
// self.aiRadarArea.snp.updateConstraints { make in
// let topMargin = isNeedHideOrderTipsView ? 20.0 : 20.0 + orderTipsView.tipViewH + 20.0
// make.top.equalTo(bannerLineTop.snp.bottom).offset(topMargin)
// }
// self.setNeedsLayout()
// self.layoutIfNeeded()
updateSubViewsConstraints()
}
}
override func layoutSubviews() {
super.layoutSubviews()
}
// override func layoutSubviews() {
// super.layoutSubviews()
// }
func updateSubViewsConstraints() {
homeBannerView.snp.remakeConstraints { make in
......@@ -123,16 +124,34 @@ class YHHomeHeadView: UIView {
make.left.right.equalToSuperview()
make.height.equalTo(1)
}
orderTipsView.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(orderTipsView.tipViewH)
}
aiRadarArea.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHAiRadarAreaView.viewH)
orderTipsView.snp.removeConstraints()
if self.orderTipsView.isHidden {
aiRadarArea.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHAiRadarAreaView.viewH)
}
} else {
orderTipsView.isHidden = false
orderTipsView.snp.remakeConstraints { make in
make.top.equalTo(bannerLineTop.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(orderTipsView.tipViewH)
}
aiRadarArea.snp.remakeConstraints { make in
make.top.equalTo(orderTipsView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHAiRadarAreaView.viewH)
}
}
salonArea.snp.remakeConstraints { make in
make.top.equalTo(aiRadarArea.snp.bottom).offset(20)
make.left.right.equalToSuperview()
......
......@@ -28,6 +28,7 @@ class YHHomeSalonAreaView: UIView {
let imgV : UIImageView = UIImageView()
imgV.contentMode = .scaleAspectFill
imgV.image = UIImage(named: "home_salon_bkg")
imgV.clipsToBounds = true
return imgV
}()
......
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