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 {
let vc = YHHKEventCenterViewController()
self.parentViewController?.navigationController?.pushViewController(vc)
case 6:
if YHLoginManager.shared.isLogin() {
} else {
YHOneKeyLoginManager.shared.oneKeyLogin()
return
}
YHAnalytics.track("APP_Home_KingKong_6")
let vc = YHHomeWebViewController()
var url = ""
#if DEBUG
vc.url = "https://test-hklife-business-uni.galaxy-immi.com/"
url = "https://test-hklife-business-uni.galaxy-immi.com/"
#elseif TESTENV
vc.url = "https://test-hklife-business-uni.galaxy-immi.com/"
url = "https://test-hklife-business-uni.galaxy-immi.com/"
#elseif UATENV
vc.url = "https://hklife-business-uni.galaxy-immi.com/"
url = "https://hklife-business-uni.galaxy-immi.com/"
#else
vc.url = "https://hklife-business-uni.galaxy-immi.com/"
url = "https://hklife-business-uni.galaxy-immi.com/"
#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)
default:
break
......
......@@ -123,7 +123,7 @@ extension YHSelectViewController {
sectionView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 92)
headView = {
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
self.selectItem = index
self.buttonItem = 0
......@@ -186,12 +186,16 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHSelectLookTableViewCell.self)
cell.number = indexPath.row
cell.dataSource = self.viewModel.goodsArray[indexPath.row]
return cell
}
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 {
......@@ -265,9 +269,17 @@ class YHSelectLookTableViewCell: UITableViewCell {
var subTitleLabel: UILabel!
var flagLabel: UILabel!
var itemView: UIView!
var number: Int = 100
var dataSource: YHSelectGoodsModel? {
didSet {
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
flagLabel.isHidden = true
if dataSource.catAttr == 2 {
......@@ -275,7 +287,7 @@ class YHSelectLookTableViewCell: UITableViewCell {
}
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 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 {
self.subTitleLabel.attributed.text = a + b
} else {
......@@ -340,7 +352,7 @@ class YHSelectLookTableViewCell: UITableViewCell {
centerImageView.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(20)
make.height.width.equalTo(68)
make.height.width.equalTo(74)
}
titleLabel = {
......
......@@ -104,7 +104,7 @@ class YHSelectLookHeadView: UIView {
addSubview(normalButton)
normalButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.bottom.equalToSuperview()
make.bottom.equalTo(-7)
make.height.equalTo(16)
make.width.equalTo(24)
}
......@@ -123,7 +123,7 @@ class YHSelectLookHeadView: UIView {
addSubview(hotButton)
hotButton.snp.makeConstraints { make in
make.left.equalTo(normalButton.snp.right).offset(20)
make.bottom.equalToSuperview()
make.bottom.equalTo(-7)
make.height.equalTo(16)
make.width.equalTo(24)
}
......@@ -142,7 +142,7 @@ class YHSelectLookHeadView: UIView {
addSubview(priceButton)
priceButton.snp.makeConstraints { make in
make.left.equalTo(hotButton.snp.right).offset(20)
make.bottom.equalToSuperview()
make.bottom.equalTo(-7)
make.height.equalTo(16)
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