Commit eb76ff60 authored by lujunye's avatar lujunye

6

parent 33a7f1b7
......@@ -625,8 +625,8 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
// return
// case 134: //分销商管理
//// HUD.flash(.label("敬请期待"),delay: 1.2)
//// let vc = GYS_HZ_Vc()
//// vc.title_str = "分销商管理"
// let vc = GYS_HZ_Vc()
// vc.title_str = "分销商管理"
// let vc = DZGL_VC()
// self.navigationController?.pushViewController(vc, animated: true)
// return
......@@ -662,7 +662,7 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
// self.navigationController?.pushViewController(vc, animated: true)
// return
// case 137: //分销分账设置
//只有当其为供应商才可以进入
//// 只有当其为供应商才可以进入
// HUD.flash(.label("敬请期待"),delay: 1.2)
// HUD.flash(.progress)
// let UserToken = UserDefaults.standard.value(forKey: "user_token")
......
......@@ -11,7 +11,7 @@ import UIKit
@objc optional func WorkItemTableViewCellBtnClick(sender:WorkItemTableViewCell,idx:IndexPath)
@objc optional func WorkItemTableViewCellAuthId(sender:WorkItemTableViewCell,auth_id:Int)
@objc optional func WorkItemNoDataTableViewCell()
}
class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UICollectionViewDataSource {
var delegate:WorkItemTableViewCellDelegate?
......@@ -20,7 +20,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
@IBOutlet weak var titleLbl: UILabel!
@IBOutlet weak var gotoImgV: UIImageView!
var dataModel:WorkcenterIndexDataModel? = nil
@IBOutlet weak var headerLeftLineV: UIView!
@IBOutlet weak var cellHeaderHeight: NSLayoutConstraint!
var dataIndexSection = 0
......@@ -28,7 +28,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
var itemArrs:[String] = []
var itemDataArrs:[WorkcenterIndexAuthResModel] = []
var isOften = false
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
......@@ -63,7 +63,7 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
//返回collectionView的单元格数量
func collectionView(_ collectionView: UICollectionView,
numberOfItemsInSection section: Int) -> Int {
if dataIndexSection == 2 && itemArrs.count == 0{
return 1
}
......@@ -75,9 +75,9 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "WorkItemCollectionViewCell",
for: indexPath) as! WorkItemCollectionViewCell
cell.bgImV.isHidden = true
//常用功能无数据处理
if dataIndexSection == 2 && itemArrs.count == 0{
cell.itemImgV.image = UIImage.init(named: "workshangchuan")
......@@ -114,27 +114,30 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
}else{
cell.countLbl.isHidden = false
}
}else{
cell.countLbl.isHidden = true
let rowModel = self.itemDataArrs[indexPath.row]
if rowModel.app_icon == nil {
cell.itemImgV.image = UIImage.init(named: "worktest1")
}else{
if isOften {
// cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon_bg!), placeholderImage: UIImage.init(named: "worktest1"),options:.allowInvalidSSLCertificates)
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1"),options:.allowInvalidSSLCertificates)
if rowModel.app_icon_bg != nil {
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon_bg!), placeholderImage: UIImage.init(named: "worktest1"),options:.allowInvalidSSLCertificates)
}else{
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1"),options:.allowInvalidSSLCertificates)
}
}else{
cell.itemImgV.sd_setImage(with: URL(string:SERVERCE_ImageHost + rowModel.app_icon!), placeholderImage: UIImage.init(named: "worktest1"),options:.allowInvalidSSLCertificates)
}
}
}
cell.itemNameLbl.text = itemArrs[indexPath.row]
return cell
}
......@@ -151,12 +154,12 @@ class WorkItemTableViewCell: UITableViewCell , UICollectionViewDelegate, UIColle
//真实数据要穿 auth_id
delegate?.WorkItemTableViewCellAuthId?(sender: self, auth_id: rowModel.auth_id!)
}
}
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
......
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