Commit 3ef508f1 authored by pete谢兆麟's avatar pete谢兆麟

Merge commit '00f869e7' into xiezhaolin

# Conflicts:
#	galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/VM/YHServiceCenterMainViewModel.swift
#	galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
parents 6f6dfd52 00f869e7
......@@ -80,6 +80,12 @@ class YHInformationPerfectListVC: YHBaseViewController {
setupUI()
loadData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHInformationPerfectListVC {
......
......@@ -17,23 +17,23 @@ class YHInformationPerfectModel {
isFirstCell = false
isLastestCell = false
if type == 1 {
if type == 0 {
isFirstCell = true
name = "主申请人信息"
icon = "zsqrxx_icon"
} else if type == 2 {
} else if type == 1 {
name = "家庭成员信息"
icon = "jtcyxx_icon"
} else if type == 3 {
} else if type == 2 {
name = "基本资料"
icon = "jbzl_icon"
} else if type == 4 {
} else if type == 3 {
name = "学历/专业资格"
icon = "xlzyzg_icon"
} else if type == 5 {
} else if type == 4 {
name = "工作经验"
icon = "gzjy_icon"
} else if type == 6 {
} else if type == 5 {
name = "其他信息"
icon = "qtxx_icon"
isLastestCell = true
......@@ -49,9 +49,9 @@ class YHInformationPerfectModel {
status = isFinished ? "已完成" : "待完善"
color = isFinished ? UIColor.mainTextColor : UIColor.labelTextColor2
statusColor = isFinished ? UIColor.successColor : UIColor.labelTextColor2
if type != 1 {
icon = isFinished ? icon : (icon + "_grey")
}
// if type != 1 {
// icon = isFinished ? icon : icon
// }
}
}
......
......@@ -13,5 +13,4 @@ struct YHPersonInfoFillStepModel: SmartCodable {
var step : Int = 0
var applicantName : String = ""
var sweet_notify_status : Int = 0
}
......@@ -300,6 +300,26 @@ private extension YHBasicInfoFillView {
additionHoldView.isHidden = true
mutilChoiceHoldView.isHidden = false
// title = model.question
// if model.answer == "Y" {
// didClickResponseBtn(btn: answer2Btn)
// myTextView.text = model.info.count > 0 ? model.info : kTipsString
// } else {
// if model.answer == "N" {
// didClickResponseBtn(btn: answer1Btn)
// }
// }
//
// mutilChoiceHoldView.snp.removeConstraints()
// mutilChoiceHoldView.snp.remakeConstraints { make in
// make.top.equalTo(answer1Btn.snp.bottom).offset(12)
// make.left.right.equalToSuperview()
//// make.height.equalTo(78)
// make.bottom.equalToSuperview().offset(-18)
// }
let lable = UILabel()
let str = "* 选择成员:"
let attributes: [NSAttributedString.Key: Any] = [
......
......@@ -176,9 +176,9 @@ extension YHBasicInfoFillViewModel {
//保存基本资料信息
func saveBasicInfo( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Basics.updateBasicInfoApi
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Basics.updateBasicInfoApi
let strUrl = "http://192.168.25.21:10087/" + "infoflow/basics/update_basics"
// let strUrl = "http://192.168.25.21:10087/" + "infoflow/basics/update_basics"
let _ = YHNetRequest.postRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard self != nil else { return }
......
......@@ -97,10 +97,13 @@ extension YHOtherInfoFillViewController {
let model = otherInfoVM.otherInfoFillData
model?.is_update = false
let str = model?.toJSONString()
printLog(str)
//保存
if let param = model?.toDictionary() {
printLog("param ==>")
printLog(param)
otherInfoVM.saveOtherInfo(params: param) { success, error in
......@@ -111,12 +114,32 @@ extension YHOtherInfoFillViewController {
YHHUD.flash(message: msg)
}
}
} else {
printLog("error: 参数 转换 出错")
}
}
private func submitData() {
//提交
let model = otherInfoVM.otherInfoFillData
model?.is_update = true
//保存
if let param = model?.toDictionary() {
printLog("param ==>")
printLog(param)
otherInfoVM.saveOtherInfo(params: param) { success, error in
if success == true {
YHHUD.flash(message: "保存成功")
} else {
let msg = error?.errorMsg ?? "保存失败"
YHHUD.flash(message: msg)
}
}
} else {
printLog("error: 参数 转换 出错")
}
}
}
......
......@@ -24,7 +24,7 @@ class YHOtherInfoFillModel: SmartCodable {
// MARK: - Residence
class Residence : SmartCodable {
var id: Int = -1
var id: String = ""
var country: String = ""
var start_time: String = ""
var end_time: String = ""
......
......@@ -165,11 +165,11 @@ extension YHServiceCenterMainViewModel {
}
if json.code == 200 {
arrInfoFillStep.removeAll()
informationFillStepModel = resultModel
myInfoFillStep = resultModel.step
let arr = [1,2,3,4,5,6]
let arr = [0,1,2,3,4,5]
let target = myInfoFillStep
for item in arr {
let model = YHInformationPerfectModel()
......
......@@ -95,7 +95,7 @@ class YHNetRequest: NSObject {
requestHeader.add(name:"sign",value:sign)
requestHeader.add(name: "token", value: YHLoginManager.shared.userModel?.token ?? "-")
// testToken(&requestHeader) //for test hjl 使用固定token
testToken(&requestHeader) //for test hjl 使用固定token
headers = requestHeader
}
......@@ -230,10 +230,14 @@ class YHNetRequest: NSObject {
if statusCode == 200 {
guard let obj = NetWorkBaseModel.deserialize(from: serverDict) else {
printLog("服务器返回数据可能有问题 数据是:\(serverDict)")
guard let errorBlock = self.failure else { return }
let errorModel = YHErrorModel(errorCode: Int32(statusCode), errorMsg: errorResponseMsg)
errorBlock(errorModel)
return
}
#if DEBUG
printLog("服务器返回数据是:\(obj)")
#endif
guard let suclock = self.success else { return }
suclock(obj, statusCode)
} else {
......
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