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

1、 处理一处可能的crash

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