Commit 15b3d8c4 authored by Steven杜宇's avatar Steven杜宇

// 家庭成员

parent bf49c0a8
...@@ -124,6 +124,7 @@ class YHFamilyMemberInfoVC: YHBaseViewController { ...@@ -124,6 +124,7 @@ class YHFamilyMemberInfoVC: YHBaseViewController {
YHHUD.flash(message: "资料还未填完") YHHUD.flash(message: "资料还未填完")
return return
} }
submit()
} }
// 检查填写信息完整性 // 检查填写信息完整性
...@@ -166,28 +167,31 @@ class YHFamilyMemberInfoVC: YHBaseViewController { ...@@ -166,28 +167,31 @@ class YHFamilyMemberInfoVC: YHBaseViewController {
// 配偶section // 配偶section
if let sponse = familyMemberInfo?.spouse { if let sponse = familyMemberInfo?.spouse {
// 信息未填写时服务器返回的relation=0 // 信息未填写时服务器返回的relation=0
sponse.relation = String(format: "%d", YHFamilyMemberType.spouse.rawValue) sponse.relationType = .spouse
let sponseArray:[YHFormItemProtocol] = [YHFormTitleItem(type: .sponse), sponse] let sponseArray:[YHFormItemProtocol] = [YHFormTitleItem(type: .sponse), sponse]
items.append(sponseArray) items.append(sponseArray)
} }
// 父母section // 父母section
var parents = [YHFormItemProtocol]() var parents = [YHFormItemProtocol]()
let item0 = YHFormTitleItem(type: .parent)
parents.append(item0)
if let father = familyMemberInfo?.father { if let father = familyMemberInfo?.father {
// 信息未填写时服务器返回的relation=0 // 信息未填写时服务器返回的relation=0
father.relation = String(format: "%d", YHFamilyMemberType.father.rawValue) father.relationType = .father
parents.append(father) parents.append(father)
} }
if let mother = familyMemberInfo?.mother { if let mother = familyMemberInfo?.mother {
// 信息未填写时服务器返回的relation=0 // 信息未填写时服务器返回的relation=0
mother.relation = String(format: "%d", YHFamilyMemberType.mother.rawValue) mother.relationType = .mother
parents.append(mother) parents.append(mother)
} }
if !parents.isEmpty {
let item0 = YHFormTitleItem(type: .parent)
parents.insert(item0, at: 0) items.append(parents)
items.append(parents)
}
// 子女section // 子女section
var childArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .child), YHFormAddItem(type: .addChild)] var childArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .child), YHFormAddItem(type: .addChild)]
...@@ -264,14 +268,31 @@ extension YHFamilyMemberInfoVC { ...@@ -264,14 +268,31 @@ extension YHFamilyMemberInfoVC {
// 添加兄弟姐妹子女 // 添加兄弟姐妹子女
func deleteFamilyMember(orderId:Int, memberId:Int, callBack:((Bool)->Void)?) { func deleteFamilyMember(orderId:Int, memberId:Int, callBack:((Bool)->Void)?) {
if orderId > 0 && memberId > 0 { if orderId > 0 && memberId > 0 {
let dict = ["id":memberId, "orderId": orderId] let dict = ["id":memberId, "order_id": orderId]
self.familyRequest.deleteFamilyMember(params: dict) { success, error in self.familyRequest.deleteFamilyMember(params: dict) {
success, error in
if success {
YHHUD.flash(message: "删除成功".local)
} else {
YHHUD.flash(message: "删除失败".local)
}
if let callBack = callBack { if let callBack = callBack {
callBack(success) callBack(success)
} }
} }
} }
} }
func submit() {
self.familyRequest.submitAllFamilyInfo(orderId: self.orderId) {
success, error in
if success {
YHHUD.flash(message: "保存成功")
} else {
YHHUD.flash(message: "保存失败")
}
}
}
} }
extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource { extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
...@@ -297,7 +318,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -297,7 +318,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
// 配偶父母子女兄妹title // 配偶父母子女兄妹title
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
cell.setTitleAndSubTitle(title:formItem.getTitle()) cell.setTitleAndSubTitle(title:formItem.getTitle(), subTitle: formItem.getSubTitle())
// 决定右边按钮显示样式 // 决定右边按钮显示样式
cell.showEditType(type: .none) cell.showEditType(type: .none)
...@@ -341,9 +362,12 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -341,9 +362,12 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if detailItem.notFillNumber > 0 { if detailItem.notFillNumber > 0 {
cell.detailLabel.text = String(format: "有%d项未填写".local, detailItem.notFillNumber) cell.detailLabel.text = String(format: "有%d项未填写".local, detailItem.notFillNumber)
} else { } else if detailItem.notFillNumber == 0 {
cell.detailLabel.text = "已填完".local cell.detailLabel.text = "已填完".local
} else {
cell.detailLabel.text = "还未开始填写".local
} }
if detailItem.relationType == .child || detailItem.relationType == .brother { if detailItem.relationType == .child || detailItem.relationType == .brother {
if detailItem.subsetName == nil || detailItem.subsetName == "" { // 姓名为空 if detailItem.subsetName == nil || detailItem.subsetName == "" { // 姓名为空
if detailItem.relationType == .child { if detailItem.relationType == .child {
...@@ -389,10 +413,12 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -389,10 +413,12 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
self.deleteFamilyMember(orderId: self.orderId, memberId:child.id) { self.deleteFamilyMember(orderId: self.orderId, memberId:child.id) {
[weak self] success in [weak self] success in
guard let self = self else { return } guard let self = self else { return }
self.isChildsEditMode = .none if success {
self.isBrothersEditMode = .none self.isChildsEditMode = .none
self.requestFamilyInfo() self.isBrothersEditMode = .none
self.requestFamilyInfo()
}
} }
} }
...@@ -415,9 +441,12 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -415,9 +441,12 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
self.deleteFamilyMember(orderId: self.orderId, memberId:brother.id) { self.deleteFamilyMember(orderId: self.orderId, memberId:brother.id) {
[weak self] success in [weak self] success in
guard let self = self else { return } guard let self = self else { return }
self.isChildsEditMode = .none
self.isBrothersEditMode = .none if success {
self.requestFamilyInfo() self.isChildsEditMode = .none
self.isBrothersEditMode = .none
self.requestFamilyInfo()
}
} }
} }
} }
......
...@@ -13,7 +13,8 @@ class YHParentInfoVC: YHBaseViewController { ...@@ -13,7 +13,8 @@ class YHParentInfoVC: YHBaseViewController {
var parentInfo: YHFamilyMember? var parentInfo: YHFamilyMember?
var items:[[YHFormItemProtocol]] = [[YHFormItemProtocol]]() var items:[[YHFormItemProtocol]] = [[YHFormItemProtocol]]()
let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel() let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel()
// 是否显示未填写错误提示
var isNeedShowError = false
var bottomView: YHSaveAndSubmitView = { var bottomView: YHSaveAndSubmitView = {
let view = YHSaveAndSubmitView.createView() let view = YHSaveAndSubmitView.createView()
...@@ -100,18 +101,24 @@ class YHParentInfoVC: YHBaseViewController { ...@@ -100,18 +101,24 @@ class YHParentInfoVC: YHBaseViewController {
let title1 = YHFormTitleItem(type: .fatherInfo) let title1 = YHFormTitleItem(type: .fatherInfo)
let item10 = YHFormDetailItem(type: .fatherName) let item10 = YHFormDetailItem(type: .fatherName)
item10.value = parentInfo.subsetName item10.value = parentInfo.subsetName
item10.tips = "请输入姓名".local
item10.placeHolder = "请输入姓名".local
arr1.append(title1) arr1.append(title1)
arr1.append(item10) arr1.append(item10)
} else { // 母亲 } else { // 母亲
let title1 = YHFormTitleItem(type: .motherInfo) let title1 = YHFormTitleItem(type: .motherInfo)
let item10 = YHFormDetailItem(type: .motherName) let item10 = YHFormDetailItem(type: .motherName)
item10.value = parentInfo.subsetName item10.value = parentInfo.subsetName
item10.tips = "请输入姓名".local
item10.placeHolder = "请输入姓名".local
arr1.append(title1) arr1.append(title1)
arr1.append(item10) arr1.append(item10)
} }
let item11 = YHFormDetailItem(type: .birthday) let item11 = YHFormDetailItem(type: .birthday)
item11.value = parentInfo.birthday item11.value = parentInfo.birthday
item11.tips = "请选择生日日期".local
let item12 = YHFormDetailItem(type: .birthNation) let item12 = YHFormDetailItem(type: .birthNation)
item12.value = String(parentInfo.isBirthOverSeas()) item12.value = String(parentInfo.isBirthOverSeas())
...@@ -120,9 +127,12 @@ class YHParentInfoVC: YHBaseViewController { ...@@ -120,9 +127,12 @@ class YHParentInfoVC: YHBaseViewController {
if parentInfo.isBirthOverSeas() { if parentInfo.isBirthOverSeas() {
item13.value = parentInfo.birthPlace?.foreign item13.value = parentInfo.birthPlace?.foreign
item13.placeHolder = "请输入".local item13.placeHolder = "请输入".local
item13.tips = "请输入城市".local
} else { } else {
item13.value = parentInfo.birthPlace?.area?.joined(separator: ",") item13.value = parentInfo.birthPlace?.area?.joined(separator: ",")
item13.placeHolder = "请选择".local item13.placeHolder = "请选择".local
item13.tips = "请选择城市".local
} }
let arr:[YHFormItemProtocol] = [item11, item12, item13] let arr:[YHFormItemProtocol] = [item11, item12, item13]
arr1.append(contentsOf: arr) arr1.append(contentsOf: arr)
...@@ -134,19 +144,23 @@ class YHParentInfoVC: YHBaseViewController { ...@@ -134,19 +144,23 @@ class YHParentInfoVC: YHBaseViewController {
if !parentInfo.isDead() { // 健在 if !parentInfo.isDead() { // 健在
let item14 = YHFormDetailItem(type: .marriageState) let item14 = YHFormDetailItem(type: .marriageState)
item14.value = parentInfo.married item14.value = parentInfo.married
item14.placeHolder = "请选择".local
item14.tips = "请选择".local
arr1.append(item14) arr1.append(item14)
// 职业信息 // 职业信息
let title2 = YHFormTitleItem(type: .occupationInfo) let title2 = YHFormTitleItem(type: .occupationInfo)
let item20 = YHFormDetailItem(type: .occupation) let item20 = YHFormDetailItem(type: .occupation)
item20.value = parentInfo.occupation item20.value = parentInfo.occupation
item20.placeHolder = "请输入".local item20.placeHolder = "请选择".local
item20.tips = "请选择".local
var arr2:[YHFormItemProtocol] = [title2, item20] var arr2:[YHFormItemProtocol] = [title2, item20]
if parentInfo.isNowHaveJob() { if parentInfo.isNowHaveJob() {
let item21 = YHFormDetailItem(type: .occupationName) let item21 = YHFormDetailItem(type: .occupationName)
item21.value = parentInfo.occupationName item21.value = parentInfo.occupationName
item21.placeHolder = "请输入".local item21.placeHolder = "请输入".local
item21.tips = "请输入".local
arr2.append(item21) arr2.append(item21)
} }
...@@ -154,6 +168,7 @@ class YHParentInfoVC: YHBaseViewController { ...@@ -154,6 +168,7 @@ class YHParentInfoVC: YHBaseViewController {
let title3 = YHFormTitleItem(type: .liveInfo) let title3 = YHFormTitleItem(type: .liveInfo)
let item30 = YHFormDetailItem(type: .liveNationOrArea) let item30 = YHFormDetailItem(type: .liveNationOrArea)
item30.value = parentInfo.liveCountry item30.value = parentInfo.liveCountry
item30.tips = "请选择国家/地区".local
let arr3:[YHFormItemProtocol] = [title3, item30] let arr3:[YHFormItemProtocol] = [title3, item30]
// 香港身份证 // 香港身份证
...@@ -165,6 +180,7 @@ class YHParentInfoVC: YHBaseViewController { ...@@ -165,6 +180,7 @@ class YHParentInfoVC: YHBaseViewController {
if parentInfo.isHaveHKIdentityCard() { // 办理过香港身份证才显示证号 if parentInfo.isHaveHKIdentityCard() { // 办理过香港身份证才显示证号
let item41 = YHFormDetailItem(type: .hkIdentityCardNumber) let item41 = YHFormDetailItem(type: .hkIdentityCardNumber)
item41.value = parentInfo.hkIdentityCard item41.value = parentInfo.hkIdentityCard
item41.tips = "请输入正确的香港身份证号码".local
arr4.append(item41) arr4.append(item41)
} }
items.append(contentsOf: [arr0, arr1, arr2, arr3, arr4]) items.append(contentsOf: [arr0, arr1, arr2, arr3, arr4])
...@@ -264,7 +280,18 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -264,7 +280,18 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.text = detailItem.value cell.text = detailItem.value
cell.placeHolder = detailItem.placeHolder
if detailItem.type == .hkIdentityCardNumber { // 输入香港身份证号码
let isEmptyValue = isEmptyString(detailItem.value)
var isUnvalidFormat = true
if let value = detailItem.value, value.isHKIdentityCardNumber() {
isUnvalidFormat = false
}
let isNeedShowTips = isEmptyValue || isUnvalidFormat
cell.setTips(detailItem.tips, isShow: isNeedShowError && isNeedShowTips)
} else {
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
}
cell.textChange = { cell.textChange = {
[weak self] (text, isEditEnd) in [weak self] (text, isEditEnd) in
...@@ -295,6 +322,7 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -295,6 +322,7 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.detail = detailItem.value cell.detail = detailItem.value
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
return cell return cell
} }
...@@ -499,8 +527,70 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -499,8 +527,70 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
extension YHParentInfoVC { extension YHParentInfoVC {
// 检查填写信息完整性
func checkIntegrity() -> Bool {
guard let parentInfo = parentInfo else { return false }
if isEmptyString(parentInfo.subsetName) || isEmptyString(parentInfo.birthday) {
return false
}
if parentInfo.isBirthOverSeas() {
if isEmptyString(parentInfo.birthPlace?.foreign) {
return false
}
} else {
if isEmptyArray(parentInfo.birthPlace?.area) {
return false
}
}
if parentInfo.isDead() {
return true
}
// 以下是父母未死的情况
if isEmptyString(parentInfo.married) || isEmptyString(parentInfo.occupation) || isEmptyString(parentInfo.liveCountry) {
return false
}
if parentInfo.isNowHaveJob() {
if isEmptyString(parentInfo.occupationName) {
return false
}
}
if parentInfo.isHaveHKIdentityCard() { // 办理过香港身份证才显示证号
if isEmptyString(parentInfo.hkIdentityCard) {
return false
}
if let hkIdCard = parentInfo.hkIdentityCard, !hkIdCard.isHKIdentityCardNumber() {
return false
}
}
return true
}
func submitInfo() { func submitInfo() {
let isChecked = checkIntegrity()
isNeedShowError = !isChecked
self.tableView .reloadData()
if !isChecked {
YHHUD.flash(message: "资料还未填完")
return
}
guard let parentInfo = parentInfo else { return } guard let parentInfo = parentInfo else { return }
guard let info = parentInfo.toDictionary() else { return } guard let info = parentInfo.toDictionary() else { return }
...@@ -516,4 +606,6 @@ extension YHParentInfoVC { ...@@ -516,4 +606,6 @@ extension YHParentInfoVC {
} }
} }
} }
} }
...@@ -301,13 +301,13 @@ class YHFormTitleItem : YHFormItemProtocol { ...@@ -301,13 +301,13 @@ class YHFormTitleItem : YHFormItemProtocol {
func getSubTitle() -> String { func getSubTitle() -> String {
switch self.type { switch self.type {
case .sponse: case .sponse:
return String(format: "(%@)", "如未婚、离婚、丧偶可不填".local) return String(format: " (%@)", "如未婚、离婚、丧偶可不填".local)
case .parent: case .parent:
return String(format: "(%@)", "包含已故".local) return String(format: " (%@)", "包含已故".local)
case .brother: case .brother:
return String(format: "(%@)", "如无可不填".local) return String(format: " (%@)", "如无可不填".local)
case .child: case .child:
return String(format: "(%@)", "如无可不填".local) return String(format: " (%@)", "如无可不填".local)
case .mainApplicantEducation: case .mainApplicantEducation:
return "(请从大专开始写起)".local return "(请从大专开始写起)".local
case .mainApplicantProfessionalQualification: case .mainApplicantProfessionalQualification:
...@@ -893,7 +893,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol { ...@@ -893,7 +893,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
var subsetNamePinyin: YHSubsetNamePinyin? var subsetNamePinyin: YHSubsetNamePinyin?
var birthday: String? var birthday: String?
var birthPlaceAboard: Int = 0 var birthPlaceAboard: Int = 0
var birthPlace: YHAddress? var birthPlace: YHAddress? = YHAddress()
var occupation: String? var occupation: String?
var occupationName: String? var occupationName: String?
var operatorName: String? var operatorName: String?
...@@ -1109,19 +1109,37 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol { ...@@ -1109,19 +1109,37 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
var relationType:YHFamilyMemberType { var relationType:YHFamilyMemberType {
if relation == "1" { get {
return .father if relation == "1" {
} else if relation == "2" { return .father
return .mother } else if relation == "2" {
} else if relation == "3" { return .mother
return .spouse } else if relation == "3" {
} else if relation == "4" { return .spouse
return .child } else if relation == "4" {
} else if relation == "5" { return .child
return .brother } else if relation == "5" {
return .brother
}
return .none
} }
return .none set {
if newValue == .father {
relation = "1"
} else if newValue == .mother {
relation = "2"
} else if newValue == .spouse {
relation = "3"
} else if newValue == .child {
relation = "4"
} else if newValue == .brother {
relation = "5"
} else {
relation = ""
}
}
} }
// YHFamilyMemberProtocol // YHFamilyMemberProtocol
......
...@@ -14,8 +14,9 @@ class YHFamilyRequestViewModel { ...@@ -14,8 +14,9 @@ class YHFamilyRequestViewModel {
//请求所有家庭成员信息 //请求所有家庭成员信息
func getFamilyInfo(params:[String:Any], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) { func getFamilyInfo(params:[String:Any], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyInfoApi // let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyInfoApi
let strUrl = "http://192.168.34.187:8808/" + YHAllApiName.Family.familyInfoApi
YHHUD.show(.progress(message: "数据加载中...")) YHHUD.show(.progress(message: "数据加载中..."))
let _ = YHNetRequest.getRequest(url: strUrl, params:params) {[weak self] json, code in let _ = YHNetRequest.getRequest(url: strUrl, params:params) {[weak self] json, code in
...@@ -66,7 +67,7 @@ class YHFamilyRequestViewModel { ...@@ -66,7 +67,7 @@ class YHFamilyRequestViewModel {
YHHUD.show(.progress(message: "数据加载中...")) YHHUD.show(.progress(message: "数据加载中..."))
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.familyMemberDeleteApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.deleteFamilyMemberApi
let _ = YHNetRequest.postRequest(url: strUrl, params:params) { json, code in let _ = YHNetRequest.postRequest(url: strUrl, params:params) { json, code in
YHHUD.hide() YHHUD.hide()
...@@ -81,4 +82,24 @@ class YHFamilyRequestViewModel { ...@@ -81,4 +82,24 @@ class YHFamilyRequestViewModel {
callBackBlock(false,err) callBackBlock(false,err)
} }
} }
// 提交所有家庭成员信息
func submitAllFamilyInfo(orderId:Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
YHHUD.show(.progress(message: "数据加载中..."))
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Family.submitAllFamilyInfoApi
let _ = YHNetRequest.postRequest(url: strUrl, params:["order_id":orderId]) { json, code in
YHHUD.hide()
printLog("model 是 ==> \(json)")
if json.code == NetWorkCode.success.rawValue {
callBackBlock(true,nil)
} else {
callBackBlock(false, nil)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
} }
...@@ -217,7 +217,6 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -217,7 +217,6 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let dic = json.data let dic = json.data
guard let result = YHMainInformationModel.deserialize(from: dic as? Dictionary) else { guard let result = YHMainInformationModel.deserialize(from: dic as? Dictionary) else {
printLog("解析data失败:\(dic!)")
callBackBlock(nil,nil) callBackBlock(nil,nil)
return return
} }
......
...@@ -52,9 +52,10 @@ class YHAllApiName { ...@@ -52,9 +52,10 @@ class YHAllApiName {
// static let familyInfoApi = "frontend/order/information/family" // static let familyInfoApi = "frontend/order/information/family"
static let familyInfoApi = "infoflow/information/family" static let familyInfoApi = "infoflow/information/family"
// 删除家庭成员信息 // 删除家庭成员信息
static let familyMemberDeleteApi = "frontend/order/information/family/delete" static let deleteFamilyMemberApi = "infoflow/family/delete"
// 提交家庭成员信息
static let submitAllFamilyInfoApi = "family/submit"
} }
struct Education { struct Education {
......
...@@ -95,7 +95,7 @@ class YHNetRequest: NSObject { ...@@ -95,7 +95,7 @@ class YHNetRequest: NSObject {
requestHeader.add(name:"sign",value:sign) requestHeader.add(name:"sign",value:sign)
requestHeader.add(name: "token", value: YHLoginManager.shared.userModel?.token ?? "-") requestHeader.add(name: "token", value: YHLoginManager.shared.userModel?.token ?? "-")
testToken(&requestHeader) //for test hjl 使用固定token // testToken(&requestHeader) //for test hjl 使用固定token
headers = requestHeader headers = requestHeader
} }
......
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