|
@@ -15,7 +15,13 @@ class WSSTemplateCollectionCell: WSSBaseCollectionCell {
|
|
var model: WSSCommonTemplateModel? {
|
|
var model: WSSCommonTemplateModel? {
|
|
didSet {
|
|
didSet {
|
|
if let m = model {
|
|
if let m = model {
|
|
- coverImageView.ojs_setImage(withUrl: m.cover)
|
|
|
|
|
|
+ coverImageView.backgroundColor = OJSColor(hexRGBValue: 0x4B4B55)
|
|
|
|
+ if m.cover == nil {
|
|
|
|
+ coverImageView.contentMode = .scaleAspectFit
|
|
|
|
+ } else {
|
|
|
|
+ coverImageView.contentMode = .scaleAspectFill
|
|
|
|
+ }
|
|
|
|
+ coverImageView.ojs_setImage(withUrl: m.cover, placeholder: R.image.home_template_cover_placeholder())
|
|
nameLabel.text = m.name
|
|
nameLabel.text = m.name
|
|
|
|
|
|
priceTagLabel.backgroundColor = OJSColor(hexRGBValue: 0x501EFF)
|
|
priceTagLabel.backgroundColor = OJSColor(hexRGBValue: 0x501EFF)
|
|
@@ -49,7 +55,7 @@ class WSSTemplateCollectionCell: WSSBaseCollectionCell {
|
|
priceTagLabel.isHidden = false
|
|
priceTagLabel.isHidden = false
|
|
let priceStr = "限免"
|
|
let priceStr = "限免"
|
|
priceTagLabel.text = priceStr
|
|
priceTagLabel.text = priceStr
|
|
- priceTagLabel.backgroundColor = OJSColor(hexRGBValue: 0x3388ff)
|
|
|
|
|
|
+ priceTagLabel.backgroundColor = OJSColor(hexRGBValue: 0x3388FF)
|
|
}
|
|
}
|
|
|
|
|
|
var stackWidth: CGFloat = 0.0
|
|
var stackWidth: CGFloat = 0.0
|