Commit 857d8b35 authored by Steven杜宇's avatar Steven杜宇

// 人脉

parent ff1a74cb
...@@ -166,7 +166,7 @@ GEM ...@@ -166,7 +166,7 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0) xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0) xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-pgyer (0.2.8) fastlane-plugin-pgyer (0.2.9)
ffi (1.16.3) ffi (1.16.3)
fourflusher (2.3.1) fourflusher (2.3.1)
fuzzy_match (2.0.4) fuzzy_match (2.0.4)
......
...@@ -302,6 +302,7 @@ ...@@ -302,6 +302,7 @@
04AF514E2BEB585C00009E3A /* YHVideoPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF514D2BEB585C00009E3A /* YHVideoPlayerVC.swift */; }; 04AF514E2BEB585C00009E3A /* YHVideoPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF514D2BEB585C00009E3A /* YHVideoPlayerVC.swift */; };
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; }; 04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; };
04AF82D62C25542D0028CE2A /* YHInterestTopicLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF82D52C25542D0028CE2A /* YHInterestTopicLayout.swift */; }; 04AF82D62C25542D0028CE2A /* YHInterestTopicLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF82D52C25542D0028CE2A /* YHInterestTopicLayout.swift */; };
04AF82D82C291E960028CE2A /* YHMatchUserViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF82D72C291E960028CE2A /* YHMatchUserViewModel.swift */; };
04B9EE5A2C06CC3100A4018D /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */; }; 04B9EE5A2C06CC3100A4018D /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */; };
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */; }; 04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; }; 04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
...@@ -345,7 +346,7 @@ ...@@ -345,7 +346,7 @@
04FA8B302C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FA8B2F2C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift */; }; 04FA8B302C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FA8B2F2C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift */; };
04FA8B332C0880A100ABE43F /* YHAppleLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FA8B322C0880A100ABE43F /* YHAppleLoginViewModel.swift */; }; 04FA8B332C0880A100ABE43F /* YHAppleLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FA8B322C0880A100ABE43F /* YHAppleLoginViewModel.swift */; };
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 /* YHMatchUserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04FB01CF2C23FA420040115D /* YHMatchUserInfo.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 */; }; 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 */; };
...@@ -859,6 +860,7 @@ ...@@ -859,6 +860,7 @@
04AF514D2BEB585C00009E3A /* YHVideoPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVideoPlayerVC.swift; sourceTree = "<group>"; }; 04AF514D2BEB585C00009E3A /* YHVideoPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVideoPlayerVC.swift; sourceTree = "<group>"; };
04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; }; 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; };
04AF82D52C25542D0028CE2A /* YHInterestTopicLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInterestTopicLayout.swift; sourceTree = "<group>"; }; 04AF82D52C25542D0028CE2A /* YHInterestTopicLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInterestTopicLayout.swift; sourceTree = "<group>"; };
04AF82D72C291E960028CE2A /* YHMatchUserViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMatchUserViewModel.swift; sourceTree = "<group>"; };
04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; }; 04B9EE582C06CC3100A4018D /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOtherLoginViewController.swift; sourceTree = "<group>"; }; 04B9EE592C06CC3100A4018D /* YHOtherLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHOtherLoginViewController.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; }; 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
...@@ -901,7 +903,7 @@ ...@@ -901,7 +903,7 @@
04FA8B2F2C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOneKeyLoginViewModel.swift; sourceTree = "<group>"; }; 04FA8B2F2C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOneKeyLoginViewModel.swift; sourceTree = "<group>"; };
04FA8B322C0880A100ABE43F /* YHAppleLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppleLoginViewModel.swift; sourceTree = "<group>"; }; 04FA8B322C0880A100ABE43F /* YHAppleLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppleLoginViewModel.swift; sourceTree = "<group>"; };
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 /* YHMatchUserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMatchUserInfo.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>"; }; 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>"; };
...@@ -1275,6 +1277,7 @@ ...@@ -1275,6 +1277,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
044D0C012C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift */, 044D0C012C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift */,
04AF82D72C291E960028CE2A /* YHMatchUserViewModel.swift */,
); );
path = VM; path = VM;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1283,7 +1286,7 @@ ...@@ -1283,7 +1286,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
044D0BFD2C21649A00C5CF5E /* YHUserInformationModel.swift */, 044D0BFD2C21649A00C5CF5E /* YHUserInformationModel.swift */,
04FB01CF2C23FA420040115D /* YHPeopleCardModel.swift */, 04FB01CF2C23FA420040115D /* YHMatchUserInfo.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3196,6 +3199,7 @@ ...@@ -3196,6 +3199,7 @@
A567E5AC2BD7643D00D5D5A0 /* YHAgreementAlertView.swift in Sources */, A567E5AC2BD7643D00D5D5A0 /* YHAgreementAlertView.swift in Sources */,
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */, 04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */,
A567E5972BD7643D00D5D5A0 /* YHHomeModel.swift in Sources */, A567E5972BD7643D00D5D5A0 /* YHHomeModel.swift in Sources */,
04AF82D82C291E960028CE2A /* YHMatchUserViewModel.swift in Sources */,
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */, 0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */,
A567E5982BD7643D00D5D5A0 /* YHHKEventModel.swift in Sources */, A567E5982BD7643D00D5D5A0 /* YHHKEventModel.swift in Sources */,
A5787E3A2C23DA8A00B021D7 /* YHActivityDetailBottomView.swift in Sources */, A5787E3A2C23DA8A00B021D7 /* YHActivityDetailBottomView.swift in Sources */,
...@@ -3242,7 +3246,7 @@ ...@@ -3242,7 +3246,7 @@
045EEED92B9F171A0022A143 /* YHEducationDetailVC.swift in Sources */, 045EEED92B9F171A0022A143 /* YHEducationDetailVC.swift in Sources */,
045EEF1A2B9F171A0022A143 /* YHAddressViewController.swift in Sources */, 045EEF1A2B9F171A0022A143 /* YHAddressViewController.swift in Sources */,
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */, A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */,
04FB01D02C23FA420040115D /* YHPeopleCardModel.swift in Sources */, 04FB01D02C23FA420040115D /* YHMatchUserInfo.swift in Sources */,
045EEEE92B9F171A0022A143 /* YHFamilyRequestViewModel.swift in Sources */, 045EEEE92B9F171A0022A143 /* YHFamilyRequestViewModel.swift in Sources */,
04F957472C203033003C631C /* YHMyGoodFriendsVC.swift in Sources */, 04F957472C203033003C631C /* YHMyGoodFriendsVC.swift in Sources */,
044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */, 044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */,
......
...@@ -12,7 +12,7 @@ import DragCardContainer ...@@ -12,7 +12,7 @@ import DragCardContainer
class YHMatchPeopleViewController: YHBaseViewController { class YHMatchPeopleViewController: YHBaseViewController {
var matchCardsArr:[YHPeopleCardModel] = [YHPeopleCardModel(), YHPeopleCardModel(), YHPeopleCardModel(), YHPeopleCardModel(), YHPeopleCardModel()] var matchUsersArr:[YHMatchUserInfo?] = []
lazy var bgImgV:UIImageView = { lazy var bgImgV:UIImageView = {
let bg = UIImageView(image: UIImage(named: "people_match_result_bg")) let bg = UIImageView(image: UIImage(named: "people_match_result_bg"))
...@@ -298,7 +298,7 @@ class YHMatchPeopleViewController: YHBaseViewController { ...@@ -298,7 +298,7 @@ class YHMatchPeopleViewController: YHBaseViewController {
extension YHMatchPeopleViewController: DragCardDataSource { extension YHMatchPeopleViewController: DragCardDataSource {
public func numberOfCards(_ dragCard: DragCardContainer) -> Int { public func numberOfCards(_ dragCard: DragCardContainer) -> Int {
return matchCardsArr.count return matchUsersArr.count
} }
public func dragCard(_ dragCard: DragCardContainer, viewForCard index: Int) -> DragCardView { public func dragCard(_ dragCard: DragCardContainer, viewForCard index: Int) -> DragCardView {
...@@ -306,11 +306,12 @@ extension YHMatchPeopleViewController: DragCardDataSource { ...@@ -306,11 +306,12 @@ extension YHMatchPeopleViewController: DragCardDataSource {
let cardView:YHNameCardInfoView = YHNameCardInfoView.createCardView() let cardView:YHNameCardInfoView = YHNameCardInfoView.createCardView()
cardView.allowedDirection = self.allowedDirection cardView.allowedDirection = self.allowedDirection
cardView.tag = 1000+index cardView.tag = 1000+index
if 0 <= index && index < self.matchCardsArr.count { if 0 <= index && index < self.matchUsersArr.count {
let cardModel = self.matchCardsArr[index] if let userModel = self.matchUsersArr[index] {
cardView.cardModel = cardModel cardView.userModel = userModel
cardView.sendBlock = { cardView.sendBlock = {
cardModel.isSend = true userModel.isSendRequest = true
}
} }
} }
return cardView return cardView
......
...@@ -11,7 +11,7 @@ import JXSegmentedView ...@@ -11,7 +11,7 @@ import JXSegmentedView
import Lottie import Lottie
class YHPeopleViewController: YHBaseViewController { class YHPeopleViewController: YHBaseViewController {
let viewModel = YHMatchUserViewModel()
lazy var topLabel:UILabel = { lazy var topLabel:UILabel = {
let label = UILabel() let label = UILabel()
label.textAlignment = .center label.textAlignment = .center
...@@ -156,11 +156,9 @@ class YHPeopleViewController: YHBaseViewController { ...@@ -156,11 +156,9 @@ class YHPeopleViewController: YHBaseViewController {
guard let self = self else { return } guard let self = self else { return }
self.launchLottieView.isHidden = true self.launchLottieView.isHidden = true
self.rotateLottieView.isHidden = false self.rotateLottieView.isHidden = false
self.rotateLottieView.loopMode = .playOnce self.rotateLottieView.loopMode = .loop
self.rotateLottieView.play { completed in self.rotateLottieView.play()
let vc = YHMatchPeopleViewController() self.requestMatchUserList()
self.navigationController?.pushViewController(vc)
}
} }
return return
} }
...@@ -185,3 +183,17 @@ extension YHPeopleViewController: JXSegmentedListContainerViewListDelegate { ...@@ -185,3 +183,17 @@ extension YHPeopleViewController: JXSegmentedListContainerViewListDelegate {
} }
} }
extension YHPeopleViewController {
func requestMatchUserList() {
self.viewModel.getMatchUserlist {
success, error in
self.rotateLottieView.stop()
let vc = YHMatchPeopleViewController()
vc.matchUsersArr = self.viewModel.matchUserArr
self.navigationController?.pushViewController(vc)
}
}
}
//
// YHPeopleCardModel.swift
// galaxy
//
// Created by edy on 2024/6/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHPeopleCardModel: NSObject {
var isSend:Bool = false
}
class YHMatchUserInfo: SmartCodable {
var id: String = ""
var yhId: String = ""
var position: String = ""
var industry: String = ""
var address: YHMatchUserAddress = YHMatchUserAddress()
var signature: String = ""
// 自定义属性
// 是否发送了好友申请
var isSendRequest = false
required init() {
}
enum CodingKeys: String, CodingKey {
case id
case yhId = "yh_id"
case position, industry, address, signature
}
}
// MARK: - Address
class YHMatchUserAddress: SmartCodable {
var country: String = ""
var province: String = ""
var city: String = ""
required init() {
}
}
//
// YHPeopleCardModel.swift
// galaxy
//
// Created by edy on 2024/6/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHPeopleCardModel: NSObject {
var isSend:Bool = false
}
...@@ -15,9 +15,14 @@ class YHNameCardInfoView: DragCardView { ...@@ -15,9 +15,14 @@ class YHNameCardInfoView: DragCardView {
static let width = KScreenWidth-36.0*2 static let width = KScreenWidth-36.0*2
var sendBlock:(()->())? var sendBlock:(()->())?
var cardModel:YHPeopleCardModel = YHPeopleCardModel() { var userModel:YHMatchUserInfo = YHMatchUserInfo() {
didSet { didSet {
if self.cardModel.isSend {
self.nameLabel.text = self.userModel.id
self.professionalLabel.text = self.userModel.position
self.detailLabel.text = self.userModel.signature
if self.userModel.isSendRequest {
self.bottomBtn.setTitle("已发送好友申请", for: .normal) self.bottomBtn.setTitle("已发送好友申请", for: .normal)
self.bottomBtn.backgroundColor = .brandMainColor30 self.bottomBtn.backgroundColor = .brandMainColor30
self.bottomBtn.isUserInteractionEnabled = false self.bottomBtn.isUserInteractionEnabled = false
...@@ -145,10 +150,6 @@ class YHNameCardInfoView: DragCardView { ...@@ -145,10 +150,6 @@ class YHNameCardInfoView: DragCardView {
grayContentView.addSubview(self.detailLabel) grayContentView.addSubview(self.detailLabel)
self.contentView.addSubview(self.bottomBtn) self.contentView.addSubview(self.bottomBtn)
nameLabel.text = "阿斯顿法师"
professionalLabel.text = "啊发沙发沙发沙发沙发沙发三大发沙发的算法的算法的沙发沙发萨达1"
detailLabel.text = "阿萨法法师懂法守法萨芬沙发沙发发说法发生发顺丰"
self.bgImgV.snp.makeConstraints { make in self.bgImgV.snp.makeConstraints { make in
make.left.top.right.equalToSuperview() make.left.top.right.equalToSuperview()
make.height.equalTo(180) make.height.equalTo(180)
......
//
// YHMatchUserViewModel.swift
// galaxy
//
// Created by edy on 2024/6/24.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMatchUserViewModel: NSObject {
var matchUserArr:[YHMatchUserInfo?] = []
func getMatchUserlist(_ callBack: @escaping (_ success: Bool,_ error: YHErrorModel?)->()) {
let params = ["page_size" : 5]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.People.matchUserList
let _ = YHNetRequest.getRequest(url: strUrl, params: params) {
[weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog(json)
if json.code == 200 {
let dic = json.data
guard let resultModel = [YHMatchUserInfo].deserialize(array: dic as? [Any]) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
self.matchUserArr = []
callBack(false, err)
return
}
self.matchUserArr = resultModel
callBack(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
self.matchUserArr = []
callBack(false, error)
}
} failBlock: { err in
self.matchUserArr = []
callBack(false, err)
}
}
}
...@@ -304,4 +304,11 @@ class YHAllApiName { ...@@ -304,4 +304,11 @@ class YHAllApiName {
// 报备设备信息 // 报备设备信息
static let reportDeviceInfoApi = "infoflow/report-device-info" static let reportDeviceInfoApi = "infoflow/report-device-info"
} }
// 人脉
struct People {
// 匹配用户
static let matchUserList = "super-app/radar/list"
}
} }
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