|
@@ -181,7 +181,7 @@ class HomeSecondViewController: ADHBaseVC {
|
|
|
self.searchView!.mas_remakeConstraints { make in
|
|
|
make?.left.mas_equalTo()(self.backImageView)?.offset()(24)
|
|
|
make?.right.mas_equalTo()(self.backImageView)?.offset()(-24)
|
|
|
- make?.top.mas_equalTo()(self.backImageView)?.offset()(self.backImageView.frame.size.height - 100)
|
|
|
+ make?.top.mas_equalTo()(self.backImageView)?.offset()(self.backImageView.frame.size.height - 130)
|
|
|
make?.height.offset()(48)
|
|
|
}
|
|
|
//
|
|
@@ -370,6 +370,18 @@ class HomeSecondViewController: ADHBaseVC {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ func getEveryBodyLoveTitle(){
|
|
|
+ self.hud.showLoading()
|
|
|
+
|
|
|
+ self.viewModel.signalHomeGetFoodTitleRequsetl()?.on(success: { dd in
|
|
|
+ self.hud.hidden()
|
|
|
+ self.everyBodyLove?.configTitleStr(title: self.viewModel.homeFoodTitle?.name ?? "")
|
|
|
+
|
|
|
+ }, error: { error in
|
|
|
+ self.hud.showFailure(error.msg ?? LanguagesUtil.createTextBy(Ctext: "网络错误", Etext: "network error"))
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
//MARK: 获取时间范围
|
|
|
func getTimeRangDetail(){
|
|
|
self.viewModel.HomeTimeGetModel.shopType = self.shopType
|
|
@@ -392,6 +404,7 @@ class HomeSecondViewController: ADHBaseVC {
|
|
|
self.createUI()
|
|
|
}
|
|
|
|
|
|
+ self.getEveryBodyLoveTitle()
|
|
|
self.getShopCarPrice()
|
|
|
self.reloadDateView()
|
|
|
self.resetConstraint()
|
|
@@ -543,13 +556,18 @@ class HomeSecondViewController: ADHBaseVC {
|
|
|
lazy var collectionView : UICollectionView = {
|
|
|
//设置布局
|
|
|
let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout.init()
|
|
|
- let itemSpac = (kSCREEN_WIDTH - 323) / 3
|
|
|
+ let itemSpac = (kSCREEN_WIDTH - 320) / 3
|
|
|
layout.scrollDirection = .vertical //竖直
|
|
|
- layout.itemSize = CGSize.init(width: 161.5, height: 206.5)
|
|
|
+ layout.itemSize = CGSize.init(width: 160, height: 206.5)
|
|
|
//行距
|
|
|
layout.minimumInteritemSpacing = 20
|
|
|
layout.minimumLineSpacing = itemSpac
|
|
|
- layout.sectionInset = .init(top: 0, left: itemSpac, bottom: 0, right: itemSpac)
|
|
|
+// layout.sectionInset = .init(top: 0, left: itemSpac, bottom: 0, right: itemSpac)
|
|
|
+ if kIsIphoneX {
|
|
|
+ layout.sectionInset = .init(top: 0, left: itemSpac, bottom: 0, right: itemSpac)
|
|
|
+ }else{
|
|
|
+ layout.sectionInset = .init(top: 0, left: 10, bottom: 0, right: 10)
|
|
|
+ }
|
|
|
|
|
|
let collectView = UICollectionView.init(frame: .zero, collectionViewLayout: layout)
|
|
|
collectView.delegate = self
|