瀏覽代碼

fix:下架模板的处理

zhongbaojian 5 年之前
父節點
當前提交
d32823ef3b
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      SuperShow/UI/Template/Views/WSSTemplateCollectionCell.swift

+ 6 - 1
SuperShow/UI/Template/Views/WSSTemplateCollectionCell.swift

@@ -16,7 +16,12 @@ class WSSTemplateCollectionCell: WSSBaseCollectionCell {
         didSet {
             if let m = model {
                 coverImageView.backgroundColor = OJSColor(hexRGBValue: 0x4B4B55)
-                coverImageView.ojs_setImage(withUrl: m.cover, placeholder: R.image.home_template_cover_placeholder())
+
+                if m.isPublish {
+                    coverImageView.ojs_setImage(withUrl: m.cover, placeholder: R.image.home_template_cover_placeholder())
+                } else {
+                    coverImageView.image = R.image.template_unavailable()
+                }
                 nameLabel.text = m.name
 
                 self.tagView.setupFeeType(m.feeType, price: m.price)