Commit 5a4ffdcc authored by David黄金龙's avatar David黄金龙

1、配置

2、首页跳转资讯详情
parent 57c77d97
...@@ -20,13 +20,11 @@ class YHConfigManager: NSObject { ...@@ -20,13 +20,11 @@ class YHConfigManager: NSObject {
private override init() { private override init() {
super.init() super.init()
// loadConfigData()
} }
var h5Url : String { var h5Url : String {
return reqVM.configModel?.h5_url ?? "" return reqVM.configModel?.article_h5_url ?? ""
} }
} }
extension YHConfigManager { extension YHConfigManager {
......
...@@ -119,10 +119,11 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa ...@@ -119,10 +119,11 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let model = self.viewModel.arrHomeNewsData[indexPath.row] guard let model = self.viewModel.arrHomeNewsData[indexPath.row] else { return }
let vc = YHHomeWebViewController() let vc = YHHomeWebViewController()
vc.url = "https://test-hkdiy-h5.galaxy-immi.com/articleDetail.html?id=\(model?.id ?? 0)" vc.url = YHConfigManager.shared.h5Url + "?id=\(model.id)"
vc.id = model?.id ?? 0 vc.id = model.id
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
} }
......
...@@ -10,10 +10,11 @@ import UIKit ...@@ -10,10 +10,11 @@ import UIKit
import SmartCodable import SmartCodable
class YHConfigModel : SmartCodable { class YHConfigModel : SmartCodable {
var oss_server : String = ""
var start_up_url : String = ""
var article_h5_url : String = ""
var min_version_num : Int = 0 var min_version_num : Int = 0
var oss_server : Int = 0
var countdown : Int = 0 var countdown : Int = 0
var h5_url : String = ""
required init() { required init() {
} }
......
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