Commit 20802338 authored by Steven杜宇's avatar Steven杜宇

// 人脉

parent f5861a94
...@@ -74,11 +74,6 @@ class YHPeopleViewController: YHBaseViewController { ...@@ -74,11 +74,6 @@ class YHPeopleViewController: YHBaseViewController {
createUI() createUI()
} }
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
resetAnimation()
}
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
informationAuthorizeViewModel.requestUserInfo {[weak self] success, error in informationAuthorizeViewModel.requestUserInfo {[weak self] success, error in
...@@ -232,8 +227,8 @@ extension YHPeopleViewController { ...@@ -232,8 +227,8 @@ extension YHPeopleViewController {
msg = errorMsg msg = errorMsg
} }
YHHUD.flash(message: msg) YHHUD.flash(message: msg)
self.resetAnimation()
} }
self.resetAnimation()
} }
} }
......
...@@ -120,6 +120,17 @@ class YHFriendRequestView: UIView { ...@@ -120,6 +120,17 @@ class YHFriendRequestView: UIView {
return btn return btn
}() }()
lazy var placeHolderLabel:UILabel = {
let label = UILabel()
label.textColor = UIColor.placeHolderColor
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "请输入发送申请信息"
label.numberOfLines = 0
label.isHidden = false
return label
}()
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
createUI() createUI()
...@@ -182,6 +193,7 @@ class YHFriendRequestView: UIView { ...@@ -182,6 +193,7 @@ class YHFriendRequestView: UIView {
cardView.addSubview(msgContentView) cardView.addSubview(msgContentView)
msgContentView.addSubview(textView) msgContentView.addSubview(textView)
msgContentView.addSubview(placeHolderLabel)
msgContentView.addSubview(textCountLabel) msgContentView.addSubview(textCountLabel)
cardView.addSubview(cancelBtn) cardView.addSubview(cancelBtn)
...@@ -233,14 +245,20 @@ class YHFriendRequestView: UIView { ...@@ -233,14 +245,20 @@ class YHFriendRequestView: UIView {
} }
self.textView.snp.makeConstraints { make in self.textView.snp.makeConstraints { make in
make.left.top.equalTo(16) make.left.top.equalTo(10)
make.right.equalTo(-16) make.right.equalTo(-10)
}
self.placeHolderLabel.snp.makeConstraints { make in
make.top.equalTo(self.textView.snp.top).offset(7)
make.left.equalTo(self.textView.snp.left).offset(4)
make.right.equalTo(self.textView)
} }
self.textCountLabel.snp.makeConstraints { make in self.textCountLabel.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
make.top.equalTo(self.textView.snp.bottom).offset(16) make.top.equalTo(self.textView.snp.bottom).offset(10)
make.height.equalTo(16) make.height.equalTo(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.equalToSuperview().offset(-16)
} }
...@@ -281,6 +299,7 @@ extension YHFriendRequestView: UITextViewDelegate { ...@@ -281,6 +299,7 @@ extension YHFriendRequestView: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) { func textViewDidChange(_ textView: UITextView) {
self.textCountLabel.text = "\(textView.text.count)/\(self.textMaxCount)" self.textCountLabel.text = "\(textView.text.count)/\(self.textMaxCount)"
self.placeHolderLabel.isHidden = !textView.text.isEmpty
} }
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
......
...@@ -26,7 +26,7 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell { ...@@ -26,7 +26,7 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
self.headImgV.kf.setImage(with: url, placeholder: UIImage(named: "people_head_default")) self.headImgV.kf.setImage(with: url, placeholder: UIImage(named: "people_head_default"))
} }
let city = self.userModel.address.city + "市" let city = self.userModel.address.city
self.cityLabel.text = city self.cityLabel.text = city
let cityWidth = self.getWith(font: self.cityLabel.font, height: 20, string: city) let cityWidth = self.getWith(font: self.cityLabel.font, height: 20, string: city)
self.cityLabel.frame = CGRectMake(0, 0, cityWidth+8, 20) self.cityLabel.frame = CGRectMake(0, 0, cityWidth+8, 20)
......
...@@ -15,7 +15,7 @@ class YHMatchUserViewModel: NSObject { ...@@ -15,7 +15,7 @@ class YHMatchUserViewModel: NSObject {
var friendListModel:YHFriendListModel = YHFriendListModel() var friendListModel:YHFriendListModel = YHFriendListModel()
func getMatchUserlist(_ callBack: @escaping (_ success: Bool,_ error: YHErrorModel?)->()) { func getMatchUserlist(_ callBack: @escaping (_ success: Bool,_ error: YHErrorModel?)->()) {
let params = ["page_size" : 5] let params = ["page_size" : 20]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.People.matchUserListApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.People.matchUserListApi
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { let _ = YHNetRequest.getRequest(url: strUrl, params: params) {
[weak self] json, code in [weak self] json, code in
......
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