Commit 06af5808 authored by DavidHuang's avatar DavidHuang

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

parents 35738883 65527340
...@@ -8031,7 +8031,7 @@ ...@@ -8031,7 +8031,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -8180,7 +8180,7 @@ ...@@ -8180,7 +8180,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -8391,7 +8391,7 @@ ...@@ -8391,7 +8391,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -8442,7 +8442,7 @@ ...@@ -8442,7 +8442,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
......
...@@ -580,22 +580,20 @@ extension YHResignDocumentDetailViewController { ...@@ -580,22 +580,20 @@ extension YHResignDocumentDetailViewController {
self.emailInputView.textField.becomeFirstResponder() self.emailInputView.textField.becomeFirstResponder()
} else if editType == .sendToWechat { } else if editType == .sendToWechat {
YHHUD.show(.progress(message: "加载中...")) YHHUD.show(.progress(message: "加载中..."))
self.viewModel.previewResginDocument(docId: model.docId) { [weak self] model, error in self.viewModel.getOriginalDoc(docId: model.docId) { [weak self] model, error in
YHHUD.hide() YHHUD.hide()
guard let self = self else { guard let self = self else {
return return
} }
// 全部是私域链接,转公域处理 // 可能是私域链接也可能是公域,用统一方法处理
if let urlString = model?.url, urlString.count > 0 { if let urlString = model?.url, urlString.count > 0 {
YHHUD.show(.progress(message: "加载中...")) YHHUD.show(.progress(message: "加载中..."))
self.viewModel.getPublicImageUrl(urlString) { [weak self] success, error in self.viewModel.getRealUsefulUrl(urlString) { [weak self] success in
YHHUD.hide() YHHUD.hide()
guard let self = self else { guard let self = self else {
return return
} }
if let success = success, let url = URL(string: success) { if success.count > 0, let url = URL(string: success) {
//self.previewFile(url)
//YHShareManager.shared.sendLinkContent(self.name, "", UIImage(), link: success)
self.downloadRemoteFile(url: url) { [weak self] destination in self.downloadRemoteFile(url: url) { [weak self] destination in
guard let self = self else { guard let self = self else {
return return
......
...@@ -136,6 +136,30 @@ class YHResignDocumentViewModel: YHBaseViewModel { ...@@ -136,6 +136,30 @@ class YHResignDocumentViewModel: YHBaseViewModel {
} }
} }
func getOriginalDoc(docId: Int, callback: @escaping (_ documentModel: YHResignDocumentPreviewModel?, _ error: YHErrorModel?) -> ()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignDocument.getOriginalDoc
let _ = YHNetRequest.getRequest(url: strUrl, params: ["docId": docId]) { json, code in
//1. json字符串 转 对象
printLog("model 是 ==> \(json)")
if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let resultModel = YHResignDocumentPreviewModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callback(nil, err)
return
}
callback(resultModel, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callback(nil, err)
}
} failBlock: { err in
callback(nil, err)
}
}
func getResginDocumentUrl(docId: Int, isEditable: Bool, callback: @escaping (_ documentModel: YHResignDocumentPreviewModel?, _ error: YHErrorModel?) -> ()) { func getResginDocumentUrl(docId: Int, isEditable: Bool, callback: @escaping (_ documentModel: YHResignDocumentPreviewModel?, _ error: YHErrorModel?) -> ()) {
let params: [String : Any] = ["id": docId, "type": isEditable ? 1 : 0] let params: [String : Any] = ["id": docId, "type": isEditable ? 1 : 0]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignDocument.getResginDocumentUrl let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignDocument.getResginDocumentUrl
......
...@@ -613,6 +613,8 @@ class YHAllApiName { ...@@ -613,6 +613,8 @@ class YHAllApiName {
static let sendOriginalDoc = "super-app/renewal/send-original-doc" static let sendOriginalDoc = "super-app/renewal/send-original-doc"
// 上传签署文件 // 上传签署文件
static let uploadSignedDoc = "super-app/renewal/upload-signed-doc" static let uploadSignedDoc = "super-app/renewal/upload-signed-doc"
// 续期文书-获取原始文件
static let getOriginalDoc = "super-app/renewal/get-original-doc"
} }
// 续签预约 // 续签预约
......
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