Commit 7398d64c authored by Steven杜宇's avatar Steven杜宇

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

parents 7cc1fbbe 48e5143f
...@@ -123,7 +123,6 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -123,7 +123,6 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
make.bottom.left.right.equalToSuperview() make.bottom.left.right.equalToSuperview()
make.height.equalTo(59 + k_Height_safeAreaInsetsBottom()) make.height.equalTo(59 + k_Height_safeAreaInsetsBottom())
} }
getData()
if id == 0 { if id == 0 {
if self.url.contains("?id=") { if self.url.contains("?id=") {
...@@ -131,6 +130,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -131,6 +130,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
if list.count == 2 { if list.count == 2 {
if let iddd = list[1].int { if let iddd = list[1].int {
id = iddd id = iddd
getData()
return return
} }
} }
...@@ -138,6 +138,10 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -138,6 +138,10 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
bottomView.isHidden = true bottomView.isHidden = true
webview.frame = CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight!) webview.frame = CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight!)
} }
getData()
} }
deinit { deinit {
......
...@@ -50,7 +50,7 @@ class YHHomeWebBottomView: UIView { ...@@ -50,7 +50,7 @@ class YHHomeWebBottomView: UIView {
likeButton = { likeButton = {
let button = YHHomeWebBottomButton() let button = YHHomeWebBottomButton()
button.setContent("home_web_like", "652") button.setContent("home_web_like", "0")
button.addTarget(self, action: #selector(likeBtnClick), for: .touchUpInside) button.addTarget(self, action: #selector(likeBtnClick), for: .touchUpInside)
return button return button
}() }()
...@@ -64,7 +64,7 @@ class YHHomeWebBottomView: UIView { ...@@ -64,7 +64,7 @@ class YHHomeWebBottomView: UIView {
starButton = { starButton = {
let button = YHHomeWebBottomButton() let button = YHHomeWebBottomButton()
button.setContent("home_web_star", "34") button.setContent("home_web_star", "0")
button.addTarget(self, action: #selector(starBtnClick), for: .touchUpInside) button.addTarget(self, action: #selector(starBtnClick), for: .touchUpInside)
return button return button
}() }()
...@@ -78,6 +78,12 @@ class YHHomeWebBottomView: UIView { ...@@ -78,6 +78,12 @@ class YHHomeWebBottomView: UIView {
} }
@objc private func likeBtnClick() { @objc private func likeBtnClick() {
if YHLoginManager.shared.isLogin() == false {
if let block = likeBlock {
block(isLike)
}
return
}
isLike = !isLike isLike = !isLike
if let block = likeBlock { if let block = likeBlock {
block(isLike) block(isLike)
...@@ -85,6 +91,13 @@ class YHHomeWebBottomView: UIView { ...@@ -85,6 +91,13 @@ class YHHomeWebBottomView: UIView {
} }
@objc private func starBtnClick() { @objc private func starBtnClick() {
if YHLoginManager.shared.isLogin() == false {
if let block = starBlock {
block(isStar)
}
return
}
isStar = !isStar isStar = !isStar
if let block = starBlock { if let block = starBlock {
block(isStar) block(isStar)
......
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