Commit 18f3e4c2 authored by David黄金龙's avatar David黄金龙

处理图片展示的问题

parent 86bd1034
......@@ -21,7 +21,7 @@ class YHActivityModel: YHBaseModel {
private var beginTimeForUI : String = ""
func getDateString() -> String {
func getDateString(format : String = "MM-dd") -> String {
if beginTimeForUI.isEmpty {
if let tttt = beginTime.double() {
......@@ -33,7 +33,7 @@ class YHActivityModel: YHBaseModel {
let dateFormatter = DateFormatter()
// 设置日期格式,这里设置为"年-月-日 时:分:秒"
dateFormatter.dateFormat = "MM-dd" // HH:mm:ss
dateFormatter.dateFormat = format // HH:mm:ss
// 使用DateFormatter将Date对象转换为字符串
let dateString = dateFormatter.string(from: date)
......
......@@ -122,7 +122,7 @@ extension YHActivityDetailItemView {
imageV.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(lastView.snp.bottom).offset(24)
// make.height.equalTo(376)
make.height.equalTo(376)
make.bottom.equalToSuperview()
}
......@@ -131,7 +131,7 @@ extension YHActivityDetailItemView {
imageV.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(lastView.snp.bottom).offset(20)
// make.height.equalTo(376)
make.height.equalTo(376)
make.bottom.equalToSuperview()
}
......@@ -141,7 +141,7 @@ extension YHActivityDetailItemView {
imageV.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(lastView.snp.bottom).offset(20)
// make.height.equalTo(376)
make.height.equalTo(376)
}
}
lastView = imageV
......
......@@ -53,7 +53,7 @@ class YHActivityTitleItemView: UIView {
nameLabel.textColor = UIColor.mainTextColor
nameLabel.textAlignment = .left
nameLabel.font = UIFont.PFSC_R(ofSize:14)
nameLabel.text = "2024-08-06 周五 09:30"
nameLabel.text = "08-06 周五 09:30"
return nameLabel
}()
......@@ -107,7 +107,7 @@ extension YHActivityTitleItemView {
"""
}
timeLable.text = model.getDateString()//String(model.beginTime)
timeLable.text = model.getDateString()
addressLable.text = model.place
navAddressLable.text = model.guidance
}
......
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