Browse Source

fix:下架模板的处理

zhongbaojian 5 năm trước cách đây
mục cha
commit
d32823ef3b

+ 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)