|
@@ -24,6 +24,12 @@ class ProductDetailView: BaseView {
|
|
|
typealias CartButtonClosure = () -> Void
|
|
|
var cartButtonClosure : CartButtonClosure?
|
|
|
|
|
|
+ typealias JumpToShopTransClosure = (_ shopName: String,_ shopId : Int) -> Void
|
|
|
+ var jumpToShopTransClosure : JumpToShopTransClosure?
|
|
|
+
|
|
|
+ typealias JumpToDetailTransClosure = (_ proId: Int,_ shopId : Int) -> Void
|
|
|
+ var jumpToDetailTransClosure : JumpToDetailTransClosure?
|
|
|
+
|
|
|
var productDetailSkuModel : ProductDetailSkuModel?
|
|
|
|
|
|
var titles = ["","","商品评价","","热销排行","商品参数","商品详情"]
|
|
@@ -386,10 +392,22 @@ extension ProductDetailView : UITableViewDelegate, UITableViewDataSource {
|
|
|
case 3:
|
|
|
let cell = ProductDetailShopTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
|
|
|
cell.productDetailModel = productDetailModel
|
|
|
+ cell.jumpToShopBlock = {
|
|
|
+ [weak self] (shopName, shopId) in
|
|
|
+ if let jumpToShopTransClosure = self?.jumpToShopTransClosure {
|
|
|
+ jumpToShopTransClosure(shopName, shopId)
|
|
|
+ }
|
|
|
+ }
|
|
|
return cell
|
|
|
case 4:
|
|
|
let cell = ProductDetailHotSellTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
|
|
|
cell.productSearchListModel = productSearchListModel
|
|
|
+ cell.jumpToDetailClosure = {
|
|
|
+ [weak self] (proId, shopId) in
|
|
|
+ if let jumpToDetailTransClosure = self?.jumpToDetailTransClosure {
|
|
|
+ jumpToDetailTransClosure(proId, shopId)
|
|
|
+ }
|
|
|
+ }
|
|
|
return cell
|
|
|
case 5:
|
|
|
let cell = ProductDetailParameterTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
|