Commit 6d832289 authored by Steven杜宇's avatar Steven杜宇

// vip

parent 77ccb901
......@@ -14,6 +14,22 @@ class YHMyUserInfoView: UIView {
static let collectTag = 9528
static let scanTag = 9529
var vipLevel: YHUserVipLevel = .none {
didSet {
var vipImg = ""
if vipLevel == .gold {
vipImg = "mine_vip_1"
} else if vipLevel == .platinum {
vipImg = "mine_vip_2"
} else if vipLevel == .diamond {
vipImg = "mine_vip_3"
}
vipImgView.image = UIImage(named: vipImg)
}
}
var avatarClickBlock:(()->Void)?
var nickNameClickBlock:(()->Void)?
var likeClick:(()->Void)?
......@@ -102,7 +118,6 @@ class YHMyUserInfoView: UIView {
lazy var vipImgView: UIImageView = {
let imgV = UIImageView()
imgV.image = UIImage(named: "mine_vip_1")
return imgV
}()
......@@ -223,6 +238,7 @@ class YHMyUserInfoView: UIView {
make.width.equalTo(enterBtn.snp.height)
}
vipLevel = .none
update(count: 0, label: likeLabel)
update(count: 0, label: collectLabel)
update(count: 0, label: scanLabel)
......@@ -248,7 +264,7 @@ class YHMyUserInfoView: UIView {
func update(count: Int, label: UILabel) {
var text = ""
var countStr = count < 10000 ? String(count) : String(format: "%.1fw", Double(count/1000)/10.0)
let countStr = count < 10000 ? String(count) : String(format: "%.1fw", Double(count/1000)/10.0)
if label.tag == Self.likeTag {
text = "点赞"
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "默认头像图@2x.png",
"filename" : "Group 2033194042@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "默认头像图@3x.png",
"filename" : "Group 2033194042@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
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