Commit e5d40866 authored by David黄金龙's avatar David黄金龙

处理 活动列表页

parent 4fca4d46
......@@ -399,6 +399,7 @@
A567E5B72BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5902BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift */; };
A567E5B82BD7643D00D5D5A0 /* YHSearchItemLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */; };
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */; };
A5787E342C22B45700B021D7 /* YHActivityListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5787E332C22B45700B021D7 /* YHActivityListCell.swift */; };
A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A580371D2BAD784B0031C312 /* YHMySchemeViewModel.swift */; };
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58037202BAD7B2A0031C312 /* YHMySchemeModel.swift */; };
A582B23D2BB944ED009D098C /* YHHKPlanDoctumentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A582B23C2BB944ED009D098C /* YHHKPlanDoctumentVC.swift */; };
......@@ -927,6 +928,7 @@
A567E5902BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHkLifeAndIdItemView.swift; sourceTree = "<group>"; };
A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchItemLayout.swift; sourceTree = "<group>"; };
A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractMainItemStatusCell.swift; sourceTree = "<group>"; };
A5787E332C22B45700B021D7 /* YHActivityListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHActivityListCell.swift; sourceTree = "<group>"; };
A580371D2BAD784B0031C312 /* YHMySchemeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySchemeViewModel.swift; sourceTree = "<group>"; };
A58037202BAD7B2A0031C312 /* YHMySchemeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySchemeModel.swift; sourceTree = "<group>"; };
A582B23C2BB944ED009D098C /* YHHKPlanDoctumentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKPlanDoctumentVC.swift; sourceTree = "<group>"; };
......@@ -2266,6 +2268,7 @@
A566A7A02C228DDE00980D06 /* V */ = {
isa = PBXGroup;
children = (
A5787E332C22B45700B021D7 /* YHActivityListCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -3144,6 +3147,7 @@
045EEECD2B9F171A0022A143 /* YHScoreDataModel.swift in Sources */,
A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */,
045EEE902B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemsView.swift in Sources */,
A5787E342C22B45700B021D7 /* YHActivityListCell.swift in Sources */,
A567E5B72BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift in Sources */,
A5ACE9502B4564F7002C94D2 /* YhCacheTool.swift in Sources */,
04F957452C1FEC4A003C631C /* YHMessageBellView.swift in Sources */,
......
......@@ -20,12 +20,112 @@ class YHActivityListViewController: YHBaseViewController {
self.view.backgroundColor = .clear
gk_navigationBar.isHidden = true
gk_navigationBar.backgroundColor = .white
self.view.backgroundColor = UIColor(hex: 0xF8FAFB)
self.view.addSubview(self.tableView)
self.tableView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalToSuperview()
make.top.equalToSuperview()
}
}
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 185
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor(hex: 0xF8FAFB)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHActivityListCell.self, forCellReuseIdentifier: YHActivityListCell.cellReuseIdentifier)
// tableView.contentInset = UIEdgeInsets(top: YHFriendsResponseView.height+16, left: 0, bottom: 0, right: 0)
// tableView.addSubview(self.friendRequestView)
tableView.backgroundView = self.emptyDataTipsView
return tableView
}()
lazy var emptyDataTipsView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无活动", kNoFriendsBgName)
view.topMargin = 222
view.isHidden = true
return view
}()
var friendsArr:[String] = ["","",""]
}
extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
if self.friendsArr.count > 0 {
return 1
}
return 0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return friendsArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHActivityListCell.cellReuseIdentifier, for: indexPath) as! YHActivityListCell
// if 0 <= indexPath.row && indexPath.row < friendsArr.count {
// }
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 185.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// if 0 <= indexPath.row && indexPath.row < friendsArr.count {
// let vc = YHMyNameCardViewController()
// self.navigationController?.pushViewController(vc)
// }
}
// func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
// return 52.0
// }
//
// func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
// let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth-16.0*2, height: 52))
// view.backgroundColor = .white
//
// let titleLabel = UILabel()
// titleLabel.text = "好友列表"
// titleLabel.textColor = UIColor.mainTextColor
// titleLabel.textAlignment = .left
// titleLabel.font = UIFont.PFSC_M(ofSize:16)
// view.addSubview(titleLabel)
//
// let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
// let path = UIBezierPath(roundedRect:view.bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(6.0, 6.0))
// let layer = CAShapeLayer()
// layer.frame = view.bounds
// layer.path = path.cgPath
// view.layer.mask = layer
//
// titleLabel.snp.makeConstraints { make in
// make.left.equalTo(16)
// make.top.equalTo(16)
// make.height.equalTo(22)
// }
// return view
// }
}
extension YHActivityListViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
//
// YHActivityListCell.swift
// galaxy
//
// Created by davidhuangA on 2024/6/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHActivityListCell: UITableViewCell {
static let cellReuseIdentifier = "YHActivityListCell"
lazy var vipImgV:UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "activity_cell_bkg_0")
view.contentMode = .scaleAspectFill
return view
}()
lazy var nameLabel:UILabel = {
let nameLabel = UILabel()
nameLabel.textColor = UIColor.mainTextColor
nameLabel.textAlignment = .left
nameLabel.font = UIFont.PFSC_B(ofSize:16)
return nameLabel
}()
lazy var signImgV:UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "people_sign")
return view
}()
lazy var lineView:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var professionalLabel:UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor70
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:13)
return label
}()
lazy var detailLabel:UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor50
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:12)
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.backgroundColor = .white
self.selectionStyle = .none
self.contentView.addSubview(self.vipImgV)
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 346240924@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 346240924@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 346240924@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 346240924@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 346240924@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 346240924@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194831@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194831@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