Commit 10ac4cad authored by David黄金龙's avatar David黄金龙

首页细节调试

parent 15fb8b14
...@@ -62,17 +62,15 @@ class YHHomePageViewController: YHBaseViewController { ...@@ -62,17 +62,15 @@ class YHHomePageViewController: YHBaseViewController {
func getData() { func getData() {
viewModel.getHomeNewsList {[weak self] success, error in viewModel.getHomeNewsList {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.homeCollectView.reloadData() // DispatchQueue.main.async {
self.homeCollectView.reloadData()
// }
} }
viewModel.getHomeBanner(0) {[weak self] success, error in viewModel.getHomeBanner(0) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.homeHeaderView.homeBannerView.dataArr = self.viewModel.banners ?? [] self.homeHeaderView.homeBannerView.dataArr = self.viewModel.banners ?? []
} }
// viewModel.getHomeClassify {[weak self] success, error in
// guard let self = self else { return }
//
// }
} }
} }
...@@ -100,40 +98,15 @@ private extension YHHomePageViewController { ...@@ -100,40 +98,15 @@ private extension YHHomePageViewController {
homeCollectView.contentInset = UIEdgeInsets(top: YHHomeHeadView.viewH, left: 0, bottom: 20, right: 0) homeCollectView.contentInset = UIEdgeInsets(top: YHHomeHeadView.viewH, left: 0, bottom: 20, right: 0)
homeCollectView.es.addInfiniteScrolling { homeCollectView.es.addInfiniteScrolling {
// self.loadFakeData() // self.loadFakeData()
} }
loadFirstItem() loadFirstItem()
homeCollectView.reloadData() homeCollectView.reloadData()
} }
func loadFirstItem() { func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
self.homeCollectView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.homeCollectView.reloadData()
}
} }
// func getImageSize(_ url: String?) -> CGSize {
// guard let urlStr = url, urlStr.count != 0 else {
// return CGSize.zero
// }
// let tempUrl = URL(string: urlStr)
// let imageSourceRef = CGImageSourceCreateWithURL(tempUrl! as CFURL, nil)
// var width: CGFloat = 0
// var height: CGFloat = 0
// if let imageSRef = imageSourceRef {
// let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSRef, 0, nil)
// if let imageP = imageProperties {
// let imageDict = imageP as Dictionary
// width = imageDict[kCGImagePropertyPixelWidth] as! CGFloat
// height = imageDict[kCGImagePropertyPixelHeight] as! CGFloat
// }
// }
// return CGSize(width: width, height: height)
// }
} }
extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource { extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource {
...@@ -150,38 +123,9 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa ...@@ -150,38 +123,9 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa
} }
} }
extension YHHomePageViewController : CollectionViewWaterfallLayoutDelegate { extension YHHomePageViewController : CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
// let model = self.viewModel.arrHomeNewsData[indexPath.row]
// let text = model.title
// let width = (KScreenWidth - 47) / 2
// let font = UIFont.PFSC_R(ofSize: 14) // 字体大小
// let maxWidth = width - 16 // 最大宽度限制
// // 创建NSAttributedString对象并设置属性
// let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
// _ = NSMutableAttributedString(string: text, attributes: attributes)
// // 根据指定的最大宽度和字体大小计算文本的高度
// let size = (text as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
// var textHeight = size.height
// if textHeight > 40 {
// textHeight = 40
// } else if textHeight < 20 {
// textHeight = 20
// }
//
// let imageSize = CGSizeMake(CGFloat(model.img_width), CGFloat(model.img_height))
// var imageHeight = 0.0
// if imageSize.width == 0 {
// imageHeight = width
// } else {
// imageHeight = width * imageSize.height/imageSize.width
// if imageHeight > 280 {
// imageHeight = 280
// }
// }
// let totalHeight = imageHeight + textHeight + 30
guard let model = self.viewModel.arrHomeNewsData[indexPath.row] else { return CGSize.zero } guard let model = self.viewModel.arrHomeNewsData[indexPath.row] else { return CGSize.zero }
return CGSize(width: model.img_width_use, height: model.img_height_use) return CGSize(width: model.img_width_cell, height: model.img_height_cell)
} }
} }
...@@ -29,6 +29,9 @@ class YHHomeListModel: YHBaseModel { ...@@ -29,6 +29,9 @@ class YHHomeListModel: YHBaseModel {
var img_width_cell : CGFloat = 0 var img_width_cell : CGFloat = 0
var img_height_cell : CGFloat = 0 var img_height_cell : CGFloat = 0
//描述的高度
var textH : CGFloat = 20.0
...@@ -42,12 +45,13 @@ class YHHomeListModel: YHBaseModel { ...@@ -42,12 +45,13 @@ class YHHomeListModel: YHBaseModel {
_ = NSMutableAttributedString(string: text, attributes: attributes) _ = NSMutableAttributedString(string: text, attributes: attributes)
// 根据指定的最大宽度和字体大小计算文本的高度 // 根据指定的最大宽度和字体大小计算文本的高度
let size = (text as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size let size = (text as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
var textHeight = size.height var textHeight : CGFloat = size.height
if textHeight > 40 { if textHeight > 40.0 {
textHeight = 40 textHeight = 40.0
} else if textHeight < 20 { } else if textHeight < 20.0 {
textHeight = 20 textHeight = 20.0
} }
self.textH = textHeight
let imageSize = CGSizeMake(CGFloat(self.img_width), CGFloat(self.img_height)) let imageSize = CGSizeMake(CGFloat(self.img_width), CGFloat(self.img_height))
var imageHeight = 0.0 var imageHeight = 0.0
...@@ -60,7 +64,7 @@ class YHHomeListModel: YHBaseModel { ...@@ -60,7 +64,7 @@ class YHHomeListModel: YHBaseModel {
} }
} }
let totalHeight = imageHeight + textHeight + 30 let totalHeight = imageHeight + textHeight + 30 + 18
self.img_width_use = width self.img_width_use = width
self.img_height_use = imageHeight self.img_height_use = imageHeight
......
...@@ -48,12 +48,18 @@ extension YHHomePageViewModel { ...@@ -48,12 +48,18 @@ extension YHHomePageViewModel {
if json.code == 200 { if json.code == 200 {
let dic = json.data let dic = json.data
guard let result = [YHHomeListModel].deserialize(from: dic as? [Any]) else { guard let result = [YHHomeListModel].deserialize(from: dic as? [Any]) else {
self.arrHomeNewsData = []
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
for item in result {
item?.calHeightParam()
}
self.arrHomeNewsData = result self.arrHomeNewsData = result
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
self.arrHomeNewsData = []
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error) callBackBlock(false, error)
} }
...@@ -123,7 +129,7 @@ extension YHHomePageViewModel { ...@@ -123,7 +129,7 @@ extension YHHomePageViewModel {
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
self.lists = result as? [YHHomeListModel] self.arrHomeNewsData = result
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
......
...@@ -15,7 +15,7 @@ class YHServerHKLifeViewController: YHBaseViewController { ...@@ -15,7 +15,7 @@ class YHServerHKLifeViewController: YHBaseViewController {
var tableFootView: YHServiceTableFootView! var tableFootView: YHServiceTableFootView!
var sectionView: YHServiceSectionView! var sectionView: YHServiceSectionView!
var dataSouce: [YHHomeListModel] = [] { var dataSouce: [YHHomeListModel?] = [] {
didSet { didSet {
self.homeTableView.reloadData() self.homeTableView.reloadData()
} }
...@@ -63,7 +63,7 @@ extension YHServerHKLifeViewController { ...@@ -63,7 +63,7 @@ extension YHServerHKLifeViewController {
let classifyID = model.children.first?.id ?? 0 let classifyID = model.children.first?.id ?? 0
self.homeViewModel.getList(classifyID) {[weak self] success, error in self.homeViewModel.getList(classifyID) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.dataSouce = self.homeViewModel.lists ?? [] self.dataSouce = self.homeViewModel.arrHomeNewsData
} }
} }
} }
...@@ -80,7 +80,7 @@ extension YHServerHKLifeViewController { ...@@ -80,7 +80,7 @@ extension YHServerHKLifeViewController {
guard let self = self else { return } guard let self = self else { return }
self.homeViewModel.getList(model.id) {[weak self] success, error in self.homeViewModel.getList(model.id) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.dataSouce = self.homeViewModel.lists ?? [] self.dataSouce = self.homeViewModel.arrHomeNewsData
} }
} }
return view return view
......
...@@ -47,7 +47,7 @@ extension YHServiceListViewController { ...@@ -47,7 +47,7 @@ extension YHServiceListViewController {
let classifyID = model.children.first?.id ?? 0 let classifyID = model.children.first?.id ?? 0
self.homeViewModel.getList(classifyID) {[weak self] success, error in self.homeViewModel.getList(classifyID) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.normalView.dataSouce = self.homeViewModel.lists ?? [] self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData
} }
} }
} }
...@@ -89,7 +89,7 @@ extension YHServiceListViewController { ...@@ -89,7 +89,7 @@ extension YHServiceListViewController {
guard let self = self else { return } guard let self = self else { return }
self.homeViewModel.getList(model.id) {[weak self] success, error in self.homeViewModel.getList(model.id) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.normalView.dataSouce = self.homeViewModel.lists ?? [] self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData
} }
} }
return view return view
......
...@@ -12,12 +12,6 @@ import Kingfisher ...@@ -12,12 +12,6 @@ import Kingfisher
class YHHomeCollectionViewCell: UICollectionViewCell { class YHHomeCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHHomeCollectionViewCell" static let cellReuseIdentifier = "YHHomeCollectionViewCell"
// var dataSource: AboutAdvantageItem? {
// didSet {
// updataAllSubViews()
// }
// }
var listModel: YHHomeListModel? { var listModel: YHHomeListModel? {
didSet { didSet {
updataSubViews() updataSubViews()
...@@ -27,8 +21,6 @@ class YHHomeCollectionViewCell: UICollectionViewCell { ...@@ -27,8 +21,6 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
lazy var titleImageView:UIImageView = { lazy var titleImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_title_image")) let imageV = UIImageView(image: UIImage(named: "home_title_image"))
imageV.contentMode = .scaleAspectFill imageV.contentMode = .scaleAspectFill
imageV.roundCorners(UIRectCorner.topLeft, radius: 8)
imageV.roundCorners(UIRectCorner.topRight, radius: 8)
return imageV return imageV
}() }()
...@@ -37,49 +29,30 @@ class YHHomeCollectionViewCell: UICollectionViewCell { ...@@ -37,49 +29,30 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
let label = UILabel() let label = UILabel()
label.text = "赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景" label.text = "赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景"
label.textColor = UIColor(hexString:"#333333") label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10) label.font = UIFont.PFSC_R(ofSize: 14)
label.numberOfLines = 2 label.numberOfLines = 2
label.lineBreakMode = .byTruncatingTail label.lineBreakMode = .byWordWrapping
return label return label
}() }()
lazy var headImageView:UIImageView = { lazy var headImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_person_icon")) let imageV = UIImageView(image: UIImage(named: ""))
imageV.contentMode = .scaleAspectFill imageV.contentMode = .scaleAspectFill
return imageV return imageV
}() }()
lazy var nameLable:UILabel = {
let label = UILabel()
label.text = "Fiona"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var dateLable:UILabel = {
let label = UILabel()
label.text = "12-12"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var heartImageView:UIImageView = { lazy var heartImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_red_heart")) let imageV = UIImageView(image: UIImage(named: "home_grey_heart"))
imageV.contentMode = .scaleAspectFill imageV.contentMode = .scaleAspectFill
return imageV return imageV
}() }()
lazy var numLable:UILabel = { lazy var numLable:UILabel = {
let label = UILabel() let label = UILabel()
label.text = "2000" label.text = ""
label.textColor = UIColor(hexString:"#333333") label.textColor = UIColor(hex: 0x121A264D, alpha: 0.3)
label.font = UIFont.systemFont(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 12)
return label return label
}() }()
...@@ -93,21 +66,18 @@ class YHHomeCollectionViewCell: UICollectionViewCell { ...@@ -93,21 +66,18 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
} }
private func setupUI() { private func setupUI() {
contentView.backgroundColor = UIColor(hexString: "#F8F9FB")
contentView.roundCorners([.topLeft,.topRight], radius: 4)
contentView.clipsToBounds = true contentView.clipsToBounds = true
contentView.addSubview(titleImageView) contentView.addSubview(titleImageView)
titleImageView.snp.makeConstraints { make in titleImageView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview() make.left.right.top.equalToSuperview()
make.height.equalTo(210) make.height.equalTo(210)
} }
let subHoldView = UIView() let subHoldView = UIView()
subHoldView.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor subHoldView.layer.backgroundColor = UIColor.white.cgColor
subHoldView.layer.borderWidth = 0.5 subHoldView.layer.borderWidth = 0.6
subHoldView.layer.borderColor = UIColor(red: 0.798, green: 0.798, blue: 0.798, alpha: 1).cgColor subHoldView.layer.borderColor = UIColor(red: 0.943, green: 0.952, blue: 0.969, alpha: 1).cgColor
contentView.addSubview(subHoldView) contentView.addSubview(subHoldView)
subHoldView.snp.makeConstraints { make in subHoldView.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom) make.top.equalTo(titleImageView.snp.bottom)
...@@ -119,47 +89,23 @@ class YHHomeCollectionViewCell: UICollectionViewCell { ...@@ -119,47 +89,23 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
make.top.equalToSuperview().offset(10) make.top.equalToSuperview().offset(10)
make.left.equalToSuperview().offset(8) make.left.equalToSuperview().offset(8)
make.right.equalToSuperview().offset(-8) make.right.equalToSuperview().offset(-8)
make.bottom.equalTo(-36)
} }
subHoldView.addSubview(numLable) subHoldView.addSubview(numLable)
numLable.snp.makeConstraints { make in numLable.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-8) make.right.equalToSuperview().offset(-8)
make.height.equalTo(12) make.top.equalTo(descripeLable.snp.bottom).offset(10)
make.bottom.equalTo(-10) make.height.equalTo(18)
} }
subHoldView.addSubview(heartImageView) subHoldView.addSubview(heartImageView)
heartImageView.snp.makeConstraints { make in heartImageView.snp.makeConstraints { make in
make.right.equalTo(numLable.snp.left).offset(-6) make.right.equalTo(numLable.snp.left).offset(-2)
make.height.width.equalTo(12) make.height.width.equalTo(16)
make.bottom.equalTo(-10) make.centerY.equalTo(numLable)
} }
} }
// func updataAllSubViews() {
// guard let dataSource = listModel else { return }
// let imageSize = getImageSize(dataSource.url)
// var imageHeight = 0.0
// if imageSize.width == 0 {
// imageHeight = width
// } else {
// imageHeight = width * imageSize.height/imageSize.width
// if imageHeight > 280 {
// imageHeight = 280
// }
// }
// titleImageView.snp.remakeConstraints { make in
// make.left.right.top.equalToSuperview()
// make.height.equalTo(imageHeight)
// }
// if let url = URL(string: dataSource.url) {
// titleImageView.kf.setImage(with: url)
// }
// descripeLable.text = dataSource.title
// }
func updataSubViews() { func updataSubViews() {
guard let listModel = listModel else { return } guard let listModel = listModel else { return }
titleImageView.snp.remakeConstraints { make in titleImageView.snp.remakeConstraints { make in
...@@ -169,27 +115,15 @@ class YHHomeCollectionViewCell: UICollectionViewCell { ...@@ -169,27 +115,15 @@ class YHHomeCollectionViewCell: UICollectionViewCell {
if let url = URL(string: listModel.img_url) { if let url = URL(string: listModel.img_url) {
titleImageView.kf.setImage(with: url) titleImageView.kf.setImage(with: url)
} }
descripeLable.text = listModel.title.defaultStringIfEmpty(detaultValue: "***")//for test hjl descripeLable.text = listModel.title.defaultStringIfEmpty(detaultValue: "***")
} descripeLable.snp.removeConstraints()
descripeLable.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(10)
func getImageSize(_ url: String?) -> CGSize { make.left.equalToSuperview().offset(8)
// guard let urlStr = url, urlStr.count != 0 else { make.right.equalToSuperview().offset(-8)
// return CGSize.zero make.height.equalTo(listModel.textH)
// } make.bottom.equalTo(-36)
// let tempUrl = URL(string: urlStr) }
// let imageSourceRef = CGImageSourceCreateWithURL(tempUrl! as CFURL, nil) numLable.text = listModel.collect_count.string
// var width: CGFloat = 0
// var height: CGFloat = 0
// if let imageSRef = imageSourceRef {
// let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSRef, 0, nil)
// if let imageP = imageProperties {
// let imageDict = imageP as Dictionary
// width = imageDict[kCGImagePropertyPixelWidth] as! CGFloat
// height = imageDict[kCGImagePropertyPixelHeight] as! CGFloat
// }
// }
return CGSize(width: 200, height: 250)
} }
} }
...@@ -14,7 +14,7 @@ class YHServerNoOrderView: UIView { ...@@ -14,7 +14,7 @@ class YHServerNoOrderView: UIView {
var tableHeadView: YHServerTableHeadView! var tableHeadView: YHServerTableHeadView!
var sectionView: YHServiceSectionView! var sectionView: YHServiceSectionView!
var dataSouce: [YHHomeListModel] = [] { var dataSouce: [YHHomeListModel?] = [] {
didSet { didSet {
self.homeTableView.reloadData() self.homeTableView.reloadData()
} }
......
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
class YHServiceTableFootView: UIView { class YHServiceTableFootView: UIView {
var items:[YHHomeListModel] = [] { var items:[YHHomeListModel?] = [] {
didSet { didSet {
self.myCollectView.reloadData() self.myCollectView.reloadData()
} }
...@@ -98,7 +98,7 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData ...@@ -98,7 +98,7 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
extension YHServiceTableFootView: CollectionViewWaterfallLayoutDelegate { extension YHServiceTableFootView: CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
let model = items[indexPath.row] guard let model = items[indexPath.row] else { return CGSize.zero }
let text = model.title let text = model.title
let width = (KScreenWidth - 47) / 2 let width = (KScreenWidth - 47) / 2
let font = UIFont.PFSC_R(ofSize: 14) // 字体大小 let font = UIFont.PFSC_R(ofSize: 14) // 字体大小
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Vector@2x.png", "filename" : "编组-8@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Vector@3x.png", "filename" : "编组-8@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "编组-8@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "编组-8@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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