Explorar el Código

fix:下架模板的处理

zhongbaojian hace 5 años
padre
commit
d32823ef3b
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  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)