Commit 8f5c0ba0 authored by Steven杜宇's avatar Steven杜宇

// 人脉匹配黑名单

parent 54875a1f
......@@ -208,6 +208,31 @@ class YHMatchResultListViewController: YHBaseViewController {
self.view.addSubview(bgImgV)
self.view.addSubview(navBar)
self.view.addSubview(self.noDataView)
self.bgImgV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
self.navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
self.noDataView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(self.navBar.snp.bottom).offset(192)
make.height.equalTo(YHPeopleMatchNoDataView.height)
}
if self.matchUsersArr.count <= 0 {
self.noDataView.isHidden = false
self.noDataView.titleLabel.text = "目前尚未找到与您匹配的人脉资源"
self.noDataView.relookBtn.isHidden = true
return
}
self.view.addSubview(topLabel)
self.view.addSubview(changeBtn)
self.view.addSubview(myCardBtn)
......@@ -218,19 +243,9 @@ class YHMatchResultListViewController: YHBaseViewController {
self.view.addSubview(self.cardActionView)
self.cardActionView.addSubview(cardContainer)
self.view.addSubview(self.noDataView)
self.view.addSubview(self.rematchBtn)
self.view.addSubview(self.guideView)
self.bgImgV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
self.navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
self.topLabel.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(50+k_Height_NavigationtBarAndStatuBar)
......@@ -280,12 +295,6 @@ class YHMatchResultListViewController: YHBaseViewController {
make.height.equalTo(466.0)
}
self.noDataView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(self.topLabel.snp.bottom).offset(120)
make.height.equalTo(YHPeopleMatchNoDataView.height)
}
self.rematchBtn.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
......@@ -449,6 +458,7 @@ extension YHMatchResultListViewController: DragCardDelegate {
print("didRemovedLast")
DispatchQueue.main.asyncAfter(deadline: .now()+0.5, execute: {
self.noDataView.isHidden = false
self.noDataView.titleLabel.text = "本轮智能匹配人脉已到底~"
self.rematchBtn.isHidden = false
self.changeBtn.isHidden = true
self.myCardBtn.isHidden = true
......
......@@ -319,7 +319,7 @@ extension YHMatchUserViewController {
func requestMatchUserList() {
self.viewModel.getMatchUserlist {
success, error in
if success, self.viewModel.matchUserArr.count > 0 {
if success {
let vc = YHMatchResultListViewController()
vc.delegate = self
vc.matchUsersArr = self.viewModel.matchUserArr
......@@ -332,6 +332,21 @@ extension YHMatchUserViewController {
}
} else {
if let err = error, err.errorCode == YHErrorCode.peopleMatchBlackList.rawValue {
// 人脉匹配黑名单
let vc = YHMatchResultListViewController()
vc.delegate = self
vc.matchUsersArr = self.viewModel.matchUserArr
self.resetAnimation()
if let curVc = UIViewController.current as? YHCommunityViewController,curVc.segmentedView.selectedIndex == 0 {
curVc.navigationController?.pushViewController(vc, completion: {
})
} else {
printLog("hhhhhhhhhhhhhhhhhhhhhhhh")
}
return
}
var msg = "匹配失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
......
......@@ -27,6 +27,7 @@ public enum YHErrorCode : Int32 {
case dictParseError = -10001
case tokenInvalidError = 20001 // 登录token失效
case forceUpdate = 10025 // 强制更新版本
case peopleMatchBlackList = 20005 // 人脉匹配黑名单
case unregisterError = 20007 //手机号已注销
public func description() -> String {
......
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