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 { ...@@ -80,6 +80,12 @@ class YHInformationPerfectListVC: YHBaseViewController {
setupUI() setupUI()
loadData() loadData()
} }
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
} }
extension YHInformationPerfectListVC { extension YHInformationPerfectListVC {
......
...@@ -17,23 +17,23 @@ class YHInformationPerfectModel { ...@@ -17,23 +17,23 @@ class YHInformationPerfectModel {
isFirstCell = false isFirstCell = false
isLastestCell = false isLastestCell = false
if type == 1 { if type == 0 {
isFirstCell = true isFirstCell = true
name = "主申请人信息" name = "主申请人信息"
icon = "zsqrxx_icon" icon = "zsqrxx_icon"
} else if type == 2 { } else if type == 1 {
name = "家庭成员信息" name = "家庭成员信息"
icon = "jtcyxx_icon" icon = "jtcyxx_icon"
} else if type == 3 { } else if type == 2 {
name = "基本资料" name = "基本资料"
icon = "jbzl_icon" icon = "jbzl_icon"
} else if type == 4 { } else if type == 3 {
name = "学历/专业资格" name = "学历/专业资格"
icon = "xlzyzg_icon" icon = "xlzyzg_icon"
} else if type == 5 { } else if type == 4 {
name = "工作经验" name = "工作经验"
icon = "gzjy_icon" icon = "gzjy_icon"
} else if type == 6 { } else if type == 5 {
name = "其他信息" name = "其他信息"
icon = "qtxx_icon" icon = "qtxx_icon"
isLastestCell = true isLastestCell = true
...@@ -49,9 +49,9 @@ class YHInformationPerfectModel { ...@@ -49,9 +49,9 @@ class YHInformationPerfectModel {
status = isFinished ? "已完成" : "待完善" status = isFinished ? "已完成" : "待完善"
color = isFinished ? UIColor.mainTextColor : UIColor.labelTextColor2 color = isFinished ? UIColor.mainTextColor : UIColor.labelTextColor2
statusColor = isFinished ? UIColor.successColor : UIColor.labelTextColor2 statusColor = isFinished ? UIColor.successColor : UIColor.labelTextColor2
if type != 1 { // if type != 1 {
icon = isFinished ? icon : (icon + "_grey") // icon = isFinished ? icon : icon
} // }
} }
} }
......
...@@ -13,5 +13,4 @@ struct YHPersonInfoFillStepModel: SmartCodable { ...@@ -13,5 +13,4 @@ struct YHPersonInfoFillStepModel: SmartCodable {
var step : Int = 0 var step : Int = 0
var applicantName : String = "" var applicantName : String = ""
var sweet_notify_status : Int = 0 var sweet_notify_status : Int = 0
} }
...@@ -300,6 +300,26 @@ private extension YHBasicInfoFillView { ...@@ -300,6 +300,26 @@ private extension YHBasicInfoFillView {
additionHoldView.isHidden = true additionHoldView.isHidden = true
mutilChoiceHoldView.isHidden = false 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 lable = UILabel()
let str = "* 选择成员:" let str = "* 选择成员:"
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
......
...@@ -176,9 +176,9 @@ extension YHBasicInfoFillViewModel { ...@@ -176,9 +176,9 @@ extension YHBasicInfoFillViewModel {
//保存基本资料信息 //保存基本资料信息
func saveBasicInfo( params:[String : Any],callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) { 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 let _ = YHNetRequest.postRequest(url: strUrl,params: params) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard self != nil else { return } guard self != nil else { return }
......
...@@ -97,10 +97,13 @@ extension YHOtherInfoFillViewController { ...@@ -97,10 +97,13 @@ extension YHOtherInfoFillViewController {
let model = otherInfoVM.otherInfoFillData let model = otherInfoVM.otherInfoFillData
model?.is_update = false
let str = model?.toJSONString()
printLog(str)
//保存 //保存
if let param = model?.toDictionary() { if let param = model?.toDictionary() {
printLog("param ==>")
printLog(param) printLog(param)
otherInfoVM.saveOtherInfo(params: param) { success, error in otherInfoVM.saveOtherInfo(params: param) { success, error in
...@@ -111,12 +114,32 @@ extension YHOtherInfoFillViewController { ...@@ -111,12 +114,32 @@ extension YHOtherInfoFillViewController {
YHHUD.flash(message: msg) YHHUD.flash(message: msg)
} }
} }
} else {
printLog("error: 参数 转换 出错")
} }
} }
private func submitData() { 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 { ...@@ -24,7 +24,7 @@ class YHOtherInfoFillModel: SmartCodable {
// MARK: - Residence // MARK: - Residence
class Residence : SmartCodable { class Residence : SmartCodable {
var id: Int = -1 var id: String = ""
var country: String = "" var country: String = ""
var start_time: String = "" var start_time: String = ""
var end_time: String = "" var end_time: String = ""
......
...@@ -165,11 +165,11 @@ extension YHServiceCenterMainViewModel { ...@@ -165,11 +165,11 @@ extension YHServiceCenterMainViewModel {
} }
if json.code == 200 { if json.code == 200 {
arrInfoFillStep.removeAll()
informationFillStepModel = resultModel informationFillStepModel = resultModel
myInfoFillStep = resultModel.step myInfoFillStep = resultModel.step
let arr = [1,2,3,4,5,6] let arr = [0,1,2,3,4,5]
let target = myInfoFillStep let target = myInfoFillStep
for item in arr { for item in arr {
let model = YHInformationPerfectModel() let model = YHInformationPerfectModel()
......
...@@ -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
} }
...@@ -230,10 +230,14 @@ class YHNetRequest: NSObject { ...@@ -230,10 +230,14 @@ class YHNetRequest: NSObject {
if statusCode == 200 { if statusCode == 200 {
guard let obj = NetWorkBaseModel.deserialize(from: serverDict) else { 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 return
} }
#if DEBUG
printLog("服务器返回数据是:\(obj)") printLog("服务器返回数据是:\(obj)")
#endif
guard let suclock = self.success else { return } guard let suclock = self.success else { return }
suclock(obj, statusCode) suclock(obj, statusCode)
} else { } 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