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

// 人脉

parent aaa0c110
...@@ -51,7 +51,7 @@ class YHMatchUserAddress: SmartCodable { ...@@ -51,7 +51,7 @@ class YHMatchUserAddress: SmartCodable {
class YHAuthorizationModel: SmartCodable { class YHAuthorizationModel: SmartCodable {
var educationExperience: Int = 0 var educationExperience: Int = 0
var workExperience = 0 var workExperience:Int = 0
required init() { required init() {
...@@ -95,17 +95,18 @@ class YHUserNameCardInfo: SmartCodable { ...@@ -95,17 +95,18 @@ class YHUserNameCardInfo: SmartCodable {
// 自定义属性 // 自定义属性
var type:YHNameCardInfoType = .unknown var type:YHNameCardInfoType = .unknown
var isCurrentUser = false
var isHiddenEducation : Bool { var isHiddenEducation : Bool {
get { get {
return self.authorization.educationExperience != 2 return self.authorization.educationExperience == 2
} }
} }
var isHiddenWorkExperience: Bool { var isHiddenWorkExperience: Bool {
get { get {
return self.authorization.workExperience != 2 return self.authorization.workExperience == 2
} }
} }
var isCurrentUser = false
required init() { required init() {
...@@ -130,6 +131,8 @@ class YHUserNameCardInfo: SmartCodable { ...@@ -130,6 +131,8 @@ class YHUserNameCardInfo: SmartCodable {
self.position = model.position self.position = model.position
self.industry = model.industry self.industry = model.industry
self.honor = model.honor self.honor = model.honor
self.authorization.educationExperience = model.authorization.educationExperience
self.authorization.workExperience = model.authorization.workExperience
self.topics.removeAll() self.topics.removeAll()
self.topics.append(contentsOf: model.topics) self.topics.append(contentsOf: model.topics)
} }
...@@ -137,7 +140,10 @@ class YHUserNameCardInfo: SmartCodable { ...@@ -137,7 +140,10 @@ class YHUserNameCardInfo: SmartCodable {
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case yhId = "yh_id" case yhId = "yh_id"
case isSigned = "is_signed" case isSigned = "is_signed"
case id, avatar, username, address, zodiac, signature, bio, college, major, background, authorization, position, industry, honor, topics
case companyName = "company_name" case companyName = "company_name"
case id, avatar, username, zodiac, signature, bio, college, major, background, position, industry, honor
case topics
case address
case authorization
} }
} }
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