Commit e1fe938d authored by DavidHuang's avatar DavidHuang

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

parents 1976501a 0e9b10f3
...@@ -94,17 +94,43 @@ private extension YHHomeKingKongBlockView { ...@@ -94,17 +94,43 @@ private extension YHHomeKingKongBlockView {
let vc = YHHKEventCenterViewController() let vc = YHHKEventCenterViewController()
self.parentViewController?.navigationController?.pushViewController(vc) self.parentViewController?.navigationController?.pushViewController(vc)
case 6: case 6:
if YHLoginManager.shared.isLogin() {
} else {
YHOneKeyLoginManager.shared.oneKeyLogin()
return
}
YHAnalytics.track("APP_Home_KingKong_6") YHAnalytics.track("APP_Home_KingKong_6")
let vc = YHHomeWebViewController() var url = ""
#if DEBUG #if DEBUG
vc.url = "https://test-hklife-business-uni.galaxy-immi.com/" url = "https://test-hklife-business-uni.galaxy-immi.com/"
#elseif TESTENV #elseif TESTENV
vc.url = "https://test-hklife-business-uni.galaxy-immi.com/" url = "https://test-hklife-business-uni.galaxy-immi.com/"
#elseif UATENV #elseif UATENV
vc.url = "https://hklife-business-uni.galaxy-immi.com/" url = "https://hklife-business-uni.galaxy-immi.com/"
#else #else
vc.url = "https://hklife-business-uni.galaxy-immi.com/" url = "https://hklife-business-uni.galaxy-immi.com/"
#endif #endif
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
url = url + "?param=" + token
let urlHasParam = String.hasQueryParameters(urlString: url)
if urlHasParam {
url = url + "&param=" + token
}
}
//2.增加导航栏高度
var tUrl = url
if !url.contains("navigationH=") {
tUrl = url + "?navigationH=\(k_Height_NavigationtBarAndStatuBar)"
if url.contains("?") {
tUrl = url + "&navigationH=\(k_Height_NavigationtBarAndStatuBar)"
}
}
let vc = YHH5WebViewVC()
vc.url = tUrl
self.parentViewController?.navigationController?.pushViewController(vc) self.parentViewController?.navigationController?.pushViewController(vc)
default: default:
break break
......
...@@ -123,7 +123,7 @@ extension YHSelectViewController { ...@@ -123,7 +123,7 @@ extension YHSelectViewController {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92) sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
headView = { headView = {
let head = YHSelectLookHeadView() let head = YHSelectLookHeadView()
head.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 66) head.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 78)
head.block = { index in head.block = { index in
self.selectItem = index self.selectItem = index
self.buttonItem = 0 self.buttonItem = 0
...@@ -186,12 +186,16 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -186,12 +186,16 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHSelectLookTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHSelectLookTableViewCell.self)
cell.number = indexPath.row
cell.dataSource = self.viewModel.goodsArray[indexPath.row] cell.dataSource = self.viewModel.goodsArray[indexPath.row]
return cell return cell
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 108 if indexPath.row == 0 {
return 102
}
return 114
} }
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
...@@ -265,9 +269,17 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -265,9 +269,17 @@ class YHSelectLookTableViewCell: UITableViewCell {
var subTitleLabel: UILabel! var subTitleLabel: UILabel!
var flagLabel: UILabel! var flagLabel: UILabel!
var itemView: UIView! var itemView: UIView!
var number: Int = 100
var dataSource: YHSelectGoodsModel? { var dataSource: YHSelectGoodsModel? {
didSet { didSet {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
if number == 0 {
centerImageView.snp.remakeConstraints { make in
make.bottom.equalTo(-20)
make.left.equalTo(20)
make.height.width.equalTo(74)
}
}
self.titleLabel.text = dataSource.name self.titleLabel.text = dataSource.name
flagLabel.isHidden = true flagLabel.isHidden = true
if dataSource.catAttr == 2 { if dataSource.catAttr == 2 {
...@@ -275,7 +287,7 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -275,7 +287,7 @@ class YHSelectLookTableViewCell: UITableViewCell {
} }
let a: ASAttributedString = .init("¥", .font(UIFont(name: "DINAlternate-Bold", size: 14) ?? UIFont()),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("¥", .font(UIFont(name: "DINAlternate-Bold", size: 14) ?? UIFont()),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont()),.foreground(UIColor.mainTextColor)) let b: ASAttributedString = .init("\(dataSource.linePrice) ", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont()),.foreground(UIColor.mainTextColor))
let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont()),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single)) let c: ASAttributedString = .init(\(dataSource.price)", .font(UIFont(name: "DINAlternate-Bold", size: 14) ?? UIFont()),.foreground(UIColor(hex:0x8993a2)), .strikethrough(.single))
if dataSource.linePrice == dataSource.price { if dataSource.linePrice == dataSource.price {
self.subTitleLabel.attributed.text = a + b self.subTitleLabel.attributed.text = a + b
} else { } else {
...@@ -340,7 +352,7 @@ class YHSelectLookTableViewCell: UITableViewCell { ...@@ -340,7 +352,7 @@ class YHSelectLookTableViewCell: UITableViewCell {
centerImageView.snp.makeConstraints { make in centerImageView.snp.makeConstraints { make in
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.left.equalTo(20) make.left.equalTo(20)
make.height.width.equalTo(68) make.height.width.equalTo(74)
} }
titleLabel = { titleLabel = {
......
...@@ -104,7 +104,7 @@ class YHSelectLookHeadView: UIView { ...@@ -104,7 +104,7 @@ class YHSelectLookHeadView: UIView {
addSubview(normalButton) addSubview(normalButton)
normalButton.snp.makeConstraints { make in normalButton.snp.makeConstraints { make in
make.left.equalTo(20) make.left.equalTo(20)
make.bottom.equalToSuperview() make.bottom.equalTo(-7)
make.height.equalTo(16) make.height.equalTo(16)
make.width.equalTo(24) make.width.equalTo(24)
} }
...@@ -123,7 +123,7 @@ class YHSelectLookHeadView: UIView { ...@@ -123,7 +123,7 @@ class YHSelectLookHeadView: UIView {
addSubview(hotButton) addSubview(hotButton)
hotButton.snp.makeConstraints { make in hotButton.snp.makeConstraints { make in
make.left.equalTo(normalButton.snp.right).offset(20) make.left.equalTo(normalButton.snp.right).offset(20)
make.bottom.equalToSuperview() make.bottom.equalTo(-7)
make.height.equalTo(16) make.height.equalTo(16)
make.width.equalTo(24) make.width.equalTo(24)
} }
...@@ -142,7 +142,7 @@ class YHSelectLookHeadView: UIView { ...@@ -142,7 +142,7 @@ class YHSelectLookHeadView: UIView {
addSubview(priceButton) addSubview(priceButton)
priceButton.snp.makeConstraints { make in priceButton.snp.makeConstraints { make in
make.left.equalTo(hotButton.snp.right).offset(20) make.left.equalTo(hotButton.snp.right).offset(20)
make.bottom.equalToSuperview() make.bottom.equalTo(-7)
make.height.equalTo(16) make.height.equalTo(16)
make.width.equalTo(40) make.width.equalTo(40)
} }
......
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