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

// 人脉

parent f5861a94
......@@ -74,11 +74,6 @@ class YHPeopleViewController: YHBaseViewController {
createUI()
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
resetAnimation()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
informationAuthorizeViewModel.requestUserInfo {[weak self] success, error in
......@@ -232,8 +227,8 @@ extension YHPeopleViewController {
msg = errorMsg
}
YHHUD.flash(message: msg)
self.resetAnimation()
}
self.resetAnimation()
}
}
......
......@@ -120,6 +120,17 @@ class YHFriendRequestView: UIView {
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) {
super.init(frame: frame)
createUI()
......@@ -182,6 +193,7 @@ class YHFriendRequestView: UIView {
cardView.addSubview(msgContentView)
msgContentView.addSubview(textView)
msgContentView.addSubview(placeHolderLabel)
msgContentView.addSubview(textCountLabel)
cardView.addSubview(cancelBtn)
......@@ -233,14 +245,20 @@ class YHFriendRequestView: UIView {
}
self.textView.snp.makeConstraints { make in
make.left.top.equalTo(16)
make.right.equalTo(-16)
make.left.top.equalTo(10)
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
make.left.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.bottom.equalToSuperview().offset(-16)
}
......@@ -281,6 +299,7 @@ extension YHFriendRequestView: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
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 {
......
......@@ -26,7 +26,7 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
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
let cityWidth = self.getWith(font: self.cityLabel.font, height: 20, string: city)
self.cityLabel.frame = CGRectMake(0, 0, cityWidth+8, 20)
......
......@@ -15,7 +15,7 @@ class YHMatchUserViewModel: NSObject {
var friendListModel:YHFriendListModel = YHFriendListModel()
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 _ = YHNetRequest.getRequest(url: strUrl, params: params) {
[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