Commit 2088b8eb authored by pete谢兆麟's avatar pete谢兆麟

直播刷新

parent 613ab8a6
......@@ -18,7 +18,6 @@ class YHLifeViewController: YHBaseViewController {
var viewModel: YHHomePageViewModel = YHHomePageViewModel()
var selectSubTab: YHHomeLifeCategoryModel? = nil
var selectSubIndex : Int = -1
var items: [String] = ["12", "22", "33", "44", "55", "66"]
var hideFlag: Bool = true
lazy var myCollectView = {
......@@ -37,7 +36,6 @@ class YHLifeViewController: YHBaseViewController {
collectinoView.dataSource = self
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
collectinoView.bounces = false
collectinoView.showsHorizontalScrollIndicator = false
collectinoView.showsVerticalScrollIndicator = false
return collectinoView
......@@ -178,8 +176,10 @@ extension YHLifeViewController {
make.top.equalTo(44)
}
tableView.es.addYHPullToRefresh {
self.loadData()
if !hideFlag {
tableView.es.addYHPullToRefresh {
self.loadData()
}
}
sectionView.isHidden = hideFlag
......@@ -199,9 +199,10 @@ extension YHLifeViewController {
}
myCollectView.es.addYHPullToRefresh {
// 刷新look数据
// self.loadData()
self.loadData()
self.myCollectView.es.stopPullToRefresh()
}
myCollectView.isHidden = !hideFlag
noDataView.isHidden = !hideFlag
}
......
......@@ -202,7 +202,30 @@ extension YHSelectViewController: UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.viewModel.goodsArray[indexPath.row]
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/goods/sales-detail" + "?id=\(model.id)"
if YHLoginManager.shared.isLogin() {
let token = YHLoginManager.shared.h5Token
let urlHasParam = String.hasQueryParameters(urlString: url)
if urlHasParam {
url = url + "&param=" + token
} else {
url = url + "?param=" + token
}
}
//2.增加导航栏高度 https://test-hklife.galaxy-immi.com/superAppBridge.html#/goods/sales-detail?id=
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
vc.isHideNavigationBar = false
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
......
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