Commit 1340b4b0 authored by Steven杜宇's avatar Steven杜宇

// 我的好友空视图

parent 45eb488c
...@@ -340,6 +340,7 @@ ...@@ -340,6 +340,7 @@
04FB01CE2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01CD2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift */; }; 04FB01CE2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01CD2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift */; };
04FB01D02C23FA420040115D /* YHPeopleCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01CF2C23FA420040115D /* YHPeopleCardModel.swift */; }; 04FB01D02C23FA420040115D /* YHPeopleCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01CF2C23FA420040115D /* YHPeopleCardModel.swift */; };
04FB01D22C23FCDD0040115D /* YHMatchCardUsageGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01D12C23FCDD0040115D /* YHMatchCardUsageGuideView.swift */; }; 04FB01D22C23FCDD0040115D /* YHMatchCardUsageGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01D12C23FCDD0040115D /* YHMatchCardUsageGuideView.swift */; };
04FB01D42C2404F50040115D /* YHMyFriendsNoDataView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01D32C2404F50040115D /* YHMyFriendsNoDataView.swift */; };
04FD85662C2124AF00BEF9C5 /* YHMyNameCardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FD85652C2124AF00BEF9C5 /* YHMyNameCardViewController.swift */; }; 04FD85662C2124AF00BEF9C5 /* YHMyNameCardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FD85652C2124AF00BEF9C5 /* YHMyNameCardViewController.swift */; };
04FD85682C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FD85672C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift */; }; 04FD85682C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FD85672C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift */; };
04FD856A2C21362300BEF9C5 /* YHMyIntroductionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FD85692C21362300BEF9C5 /* YHMyIntroductionCell.swift */; }; 04FD856A2C21362300BEF9C5 /* YHMyIntroductionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FD85692C21362300BEF9C5 /* YHMyIntroductionCell.swift */; };
...@@ -874,6 +875,7 @@ ...@@ -874,6 +875,7 @@
04FB01CD2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPeopleMatchNoDataView.swift; sourceTree = "<group>"; }; 04FB01CD2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPeopleMatchNoDataView.swift; sourceTree = "<group>"; };
04FB01CF2C23FA420040115D /* YHPeopleCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPeopleCardModel.swift; sourceTree = "<group>"; }; 04FB01CF2C23FA420040115D /* YHPeopleCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPeopleCardModel.swift; sourceTree = "<group>"; };
04FB01D12C23FCDD0040115D /* YHMatchCardUsageGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMatchCardUsageGuideView.swift; sourceTree = "<group>"; }; 04FB01D12C23FCDD0040115D /* YHMatchCardUsageGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMatchCardUsageGuideView.swift; sourceTree = "<group>"; };
04FB01D32C2404F50040115D /* YHMyFriendsNoDataView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFriendsNoDataView.swift; sourceTree = "<group>"; };
04FD85652C2124AF00BEF9C5 /* YHMyNameCardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNameCardViewController.swift; sourceTree = "<group>"; }; 04FD85652C2124AF00BEF9C5 /* YHMyNameCardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNameCardViewController.swift; sourceTree = "<group>"; };
04FD85672C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNameCardAvatarInfoCell.swift; sourceTree = "<group>"; }; 04FD85672C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNameCardAvatarInfoCell.swift; sourceTree = "<group>"; };
04FD85692C21362300BEF9C5 /* YHMyIntroductionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyIntroductionCell.swift; sourceTree = "<group>"; }; 04FD85692C21362300BEF9C5 /* YHMyIntroductionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyIntroductionCell.swift; sourceTree = "<group>"; };
...@@ -2122,6 +2124,7 @@ ...@@ -2122,6 +2124,7 @@
044D0C052C22736F00C5CF5E /* YHSetExplainView.swift */, 044D0C052C22736F00C5CF5E /* YHSetExplainView.swift */,
04FB01CD2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift */, 04FB01CD2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift */,
04FB01D12C23FCDD0040115D /* YHMatchCardUsageGuideView.swift */, 04FB01D12C23FCDD0040115D /* YHMatchCardUsageGuideView.swift */,
04FB01D32C2404F50040115D /* YHMyFriendsNoDataView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3133,6 +3136,7 @@ ...@@ -3133,6 +3136,7 @@
045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */, 045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */,
045EEF212B9F171A0022A143 /* YHMainInformationTableViewCell.swift in Sources */, 045EEF212B9F171A0022A143 /* YHMainInformationTableViewCell.swift in Sources */,
A5ACE9462B4564F7002C94D2 /* YHHUDSquareBaseView.swift in Sources */, A5ACE9462B4564F7002C94D2 /* YHHUDSquareBaseView.swift in Sources */,
04FB01D42C2404F50040115D /* YHMyFriendsNoDataView.swift in Sources */,
04D144762C0452E200EE3758 /* YHOneKeyLoginManager.swift in Sources */, 04D144762C0452E200EE3758 /* YHOneKeyLoginManager.swift in Sources */,
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */, A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */,
048B2A4A2BC7D9DC00A93BF0 /* YHMyLikeViewController.swift in Sources */, 048B2A4A2BC7D9DC00A93BF0 /* YHMyLikeViewController.swift in Sources */,
......
...@@ -22,7 +22,6 @@ class YHMyGoodFriendsVC: YHBaseViewController { ...@@ -22,7 +22,6 @@ class YHMyGoodFriendsVC: YHBaseViewController {
tableView.register(YHMyFriendsCell.self, forCellReuseIdentifier: YHMyFriendsCell.cellReuseIdentifier) tableView.register(YHMyFriendsCell.self, forCellReuseIdentifier: YHMyFriendsCell.cellReuseIdentifier)
tableView.contentInset = UIEdgeInsets(top: YHFriendsResponseView.height+16, left: 0, bottom: 0, right: 0) tableView.contentInset = UIEdgeInsets(top: YHFriendsResponseView.height+16, left: 0, bottom: 0, right: 0)
tableView.addSubview(self.friendRequestView) tableView.addSubview(self.friendRequestView)
tableView.backgroundView = self.emptyDataTipsView
return tableView return tableView
}() }()
...@@ -37,9 +36,13 @@ class YHMyGoodFriendsVC: YHBaseViewController { ...@@ -37,9 +36,13 @@ class YHMyGoodFriendsVC: YHBaseViewController {
return view return view
}() }()
lazy var emptyDataTipsView: YHEmptyDataView = { lazy var emptyDataTipsView: YHMyFriendsNoDataView = {
let view = YHEmptyDataView.createView("暂无好友", kNoFriendsBgName) let view = YHMyFriendsNoDataView(frame: CGRect(x: 0, y: k_Height_NavigationtBarAndStatuBar, width: KScreenWidth, height: KScreenHeight-k_Height_NavigationtBarAndStatuBar))
view.topMargin = 222 view.bottomBtnClick = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popViewController(animated: true)
}
view.isHidden = true view.isHidden = true
return view return view
}() }()
...@@ -52,6 +55,7 @@ class YHMyGoodFriendsVC: YHBaseViewController { ...@@ -52,6 +55,7 @@ class YHMyGoodFriendsVC: YHBaseViewController {
gk_navigationBar.backgroundColor = .white gk_navigationBar.backgroundColor = .white
self.view.backgroundColor = UIColor(hex: 0xF8FAFB) self.view.backgroundColor = UIColor(hex: 0xF8FAFB)
self.view.addSubview(self.tableView) self.view.addSubview(self.tableView)
self.view.addSubview(self.emptyDataTipsView)
self.tableView.snp.makeConstraints { make in self.tableView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
......
//
// YHMyFriendsNoDataView.swift
// galaxy
//
// Created by edy on 2024/6/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyFriendsNoDataView: UIView {
var bottomBtnClick:(()->())?
lazy var bgImgView:UIImageView = {
let view = UIImageView(image: UIImage(named: "people_no_friend_bg"))
return view
}()
lazy var titleLabel:UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize:14)
label.text = "暂无好友"
return label
}()
lazy var bottomBtn:UIButton = {
let btn = UIButton()
btn.setTitle("返回人脉主页", for: .normal)
btn.backgroundColor = .brandMainColor
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 13)
btn.layer.cornerRadius = 3
btn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
return btn
}()
@objc func didBottomBtnClicked() {
self.bottomBtnClick?()
}
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.backgroundColor = .white
self.addSubview(self.bgImgView)
self.addSubview(self.titleLabel)
self.addSubview(self.bottomBtn)
self.bgImgView.snp.makeConstraints { make in
make.width.equalTo(128)
make.height.equalTo(128)
make.centerX.equalToSuperview()
make.top.equalToSuperview().offset(148)
}
self.titleLabel.snp.makeConstraints { make in
make.top.equalTo(self.bgImgView.snp.bottom).offset(12)
make.height.equalTo(20)
make.centerX.equalToSuperview()
}
self.bottomBtn.snp.makeConstraints { make in
make.width.equalTo(110)
make.height.equalTo(38)
make.centerX.equalToSuperview()
make.top.equalTo(self.titleLabel.snp.bottom).offset(22)
}
}
}
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