Commit 45c8e370 authored by lujunye's avatar lujunye

修复显示规格bug

parent d0231557
......@@ -13,6 +13,7 @@ class MsgCenterCell: UITableViewCell {
@IBOutlet weak var dateLbl: UILabel!
@IBOutlet weak var contentLbl: UILabel!
@IBOutlet weak var titleLbl: UILabel!
var isShow:Bool = false
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
......
......@@ -391,7 +391,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
}
cell.tempLbl.text = "冷藏:\(dict.wenDu)℃"
cell.weightLbl.text = "重量(kg):\(dict.weight)kg"
cell.guiGeLbl.text = "规格:\(dict.guiGe)kg/件"
cell.guiGeLbl.text = "规格:\(dict.guiGe)"
cell.danWeiLbl.text = "单位:\(dict.danWei)"
cell.sellPriceLbl.text = "售价:¥\(dict.price)"
......
......@@ -49,14 +49,17 @@ class MsgCenterViewController: BaseViewController,UITableViewDelegate,UITableVie
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "MsgCenterCell") as! MsgCenterCell
if cell.isShow == false {//未显示
cell.titleLbl.showSkeleton(transition: .crossDissolve(0.25))
cell.dateLbl.showSkeleton(transition: .crossDissolve(0.25))
cell.contentLbl.showSkeleton(transition: .crossDissolve(0.25))
DispatchQueue.main.asyncAfter(deadline: .now() + 0.33) {
cell.isShow = true//已显示
cell.titleLbl.hideSkeleton(reloadDataAfter: true, transition: .crossDissolve(0.25))
cell.dateLbl.hideSkeleton(reloadDataAfter: true, transition: .crossDissolve(0.25))
cell.contentLbl.hideSkeleton(reloadDataAfter: true, transition: .crossDissolve(0.25))
}
}
return cell
}
......
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