Commit 5a86d5ef authored by pete谢兆麟's avatar pete谢兆麟

接口添加

parent a22fdb76
...@@ -207,8 +207,9 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -207,8 +207,9 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
func requestMainInformation(_ orderID: String, callBackBlock:@escaping (_ success: YHMainInformationModel?, _ error:YHErrorModel?)->()) { func requestMainInformation(_ orderID: String, callBackBlock:@escaping (_ success: YHMainInformationModel?, _ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + "frontend/order-information/get_information?order_id=\(orderID)" let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.getInformation
let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in let params: [String : Any] = ["order_id": orderID]
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { return } guard let self = self else { return }
guard let model = NetBaseModel.deserialize(dict: json) else { guard let model = NetBaseModel.deserialize(dict: json) else {
...@@ -293,7 +294,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -293,7 +294,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
"hk_macao_pass": hkID, "hk_macao_pass": hkID,
"passport": passport] "passport": passport]
] ]
let strUrl = YHBaseUrlManager.shared.curURL() + "frontend/order-information/update_information" let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.OrderInformation.updateInformation
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return } guard let self = self else { return }
callBackBlock(true) callBackBlock(true)
......
...@@ -91,4 +91,11 @@ class YHAllApiName { ...@@ -91,4 +91,11 @@ class YHAllApiName {
//保存基本资料信息 //保存基本资料信息
static let updateBasicInfoApi = "frontend/basics/update_basics" static let updateBasicInfoApi = "frontend/basics/update_basics"
} }
struct OrderInformation {
//主申请人获取信息
static let getInformation = "infoflow/order-information/get_information"
// 主申请人信息更新
static let updateInformation = "infoflow/order-information/update_information"
}
} }
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