Commit 144f86d9 authored by Steven杜宇's avatar Steven杜宇

// 续期资料微信上传

parent 56c781f9
......@@ -230,7 +230,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
if let extMsg = res?.extMsg {
if extMsg == "my_certificate" { // 我的证件 微信文件上传
NotificationCenter.default.post(name: YhConstant.YhNotification.didMyCertificateWeChatFileUploadCallBackNotification, object: nil)
} else if extMsg == "wx_upload_renewal_data" {
NotificationCenter.default.post(name: YhConstant.YhNotification.didMyResignMaterialWeChatFileUploadCallBackNotification, object: nil)
}
}
}
}
......
......@@ -236,6 +236,11 @@ extension YHResignMaterialListVC {
let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectImageCount = 9
sheetView.tips = "支持的文件格式为jpg/jpeg、png、bmp、doc/docx、xls/xlsx、pdf,最多可上传99张图片或文件"
sheetView.uploadTypeArr = [ YHCertificateUploadItem(type:.camera, title:"拍照上传"),
YHCertificateUploadItem(type:.photo, title:"相册上传"),
YHCertificateUploadItem(type:.phoneFile, title:"手机文件上传", subtitle:"从手机文件管理中上传"),
YHCertificateUploadItem(type:.wechatUpload, title:"微信上传"),
YHCertificateUploadItem(type:.cancel, title:"取消")]
sheetView.fileTypes = [ "public.image",
"com.adobe.pdf",
"com.microsoft.word.doc",
......@@ -262,6 +267,13 @@ extension YHResignMaterialListVC {
success?()
}
}
sheetView.wechatUploadBlock = {
[weak self] in
guard let self = self else { return }
let token = YHLoginManager.shared.h5Token
let path = "/superApp/pages/wxUpload/wxUpload?param=\(token)&material_id=\(material.id)&template_id=\(material.template_id)&type=wx_upload_renewal_data"
YHShareManager.shared.openMiniProgram(path:path, title: "微信上传")
}
sheetView.show()
}
}
......@@ -135,6 +135,11 @@ class YHResignMaterialUploadVC: YHBaseViewController {
let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView.maxSelectImageCount = 99-items.count
sheetView.tips = "支持的文件格式为jpg/jpeg、png、bmp、doc/docx、xls/xlsx、pdf,最多可上传99张图片或文件"
sheetView.uploadTypeArr = [ YHCertificateUploadItem(type:.camera, title:"拍照上传"),
YHCertificateUploadItem(type:.photo, title:"相册上传"),
YHCertificateUploadItem(type:.phoneFile, title:"手机文件上传", subtitle:"从手机文件管理中上传"),
YHCertificateUploadItem(type:.wechatUpload, title:"微信上传"),
YHCertificateUploadItem(type:.cancel, title:"取消")]
sheetView.fileTypes = [ "public.image",
"com.adobe.pdf",
"com.microsoft.word.doc",
......@@ -161,6 +166,14 @@ class YHResignMaterialUploadVC: YHBaseViewController {
self.requestMaterialDetail()
}
}
sheetView.wechatUploadBlock = {
[weak self] in
guard let self = self else { return }
let token = YHLoginManager.shared.h5Token
let path = "/superApp/pages/wxUpload/wxUpload?param=\(token)&material_id=\(self.materialModel.id)&template_id=\(self.materialModel.template_id)&type=wx_upload_renewal_data"
YHShareManager.shared.openMiniProgram(path:path, title: "微信上传")
}
sheetView.show()
}
......@@ -559,6 +572,7 @@ extension YHResignMaterialUploadVC {
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotification(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotification(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(requestMaterialDetail), name: YhConstant.YhNotification.didMyResignMaterialWeChatFileUploadCallBackNotification, object: nil)
}
func removeNotify() {
......@@ -590,7 +604,7 @@ extension YHResignMaterialUploadVC {
extension YHResignMaterialUploadVC {
func requestMaterialDetail() {
@objc func requestMaterialDetail() {
YHHUD.show(.progress(message: "加载中..."))
viewModel.getMaterialDeal(orderId: orderId, id: batchId, materialId: materialId) {
......
......@@ -23,10 +23,8 @@ enum YHFormTitleItemType:Int, CaseIterable {
case C
case D
case E
// 国籍
case nationality
// 居住信息
case liveInfo
case F
case G
case hkAndMacaoPassport
// 中国身份证
......@@ -257,9 +255,9 @@ class YHFormTitleItem : YHFormItemProtocol {
return "子女".local
case .E:
return "随行".local
case .nationality:
case .F:
return "国籍".local
case .liveInfo:
case .G:
return "居住信息".local
case .hkAndMacaoPassport:
return "港澳通行证".local
......@@ -319,9 +317,9 @@ class YHFormTitleItem : YHFormItemProtocol {
return "".local
case .E:
return "".local
case .nationality:
case .F:
return "".local
case .liveInfo:
case .G:
return "".local
case .hkAndMacaoPassport:
return "".local
......
......@@ -68,12 +68,12 @@ class YHGCChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
if child.isFollow() { // 随行才加后面的信息
// 国籍
let title1 = YHFormTitleItem(type: .nationality)
let title1 = YHFormTitleItem(type: .F)
let item10 = YHFormDetailItem(type: .nationOrArea, value:child.nationality, tips: "请选择国籍".local)
let arr1:[YHFormItemProtocol] = [title1, item10]
// 居住信息
let title2 = YHFormTitleItem(type: .liveInfo)
let title2 = YHFormTitleItem(type: .G)
let item20 = YHFormDetailItem(type: .isLiveTother, value:String(child.isLiveTother()))
var arr2: [YHFormItemProtocol] = [title2, item20]
......@@ -446,10 +446,10 @@ extension YHGCChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
[weak self] country in
guard let self = self else { return }
let title = arr[0] as! YHFormTitleItem
if title.type == .nationality { // 选国籍
if title.type == .F { // 选国籍
self.child?.nationality = country
} else if title.type == .liveInfo { // // 居住信息选国家地区
} else if title.type == .G { // // 居住信息选国家地区
self.child?.address.country = country
// 选择国家地区后需清空城市
self.child?.address.area = []
......
......@@ -398,6 +398,8 @@ extension YhConstant {
// 我的证件 微信文件上传回调
public static let didMyCertificateWeChatFileUploadCallBackNotification = Notification.Name(rawValue: "com.yinhe.myCertificate.wechat.fileUpload")
public static let didMyResignMaterialWeChatFileUploadCallBackNotification = Notification.Name(rawValue: "com.yinhe.resignMaterial.wechat.fileUpload")
// 已经展示银河管家
public static let didLoadYhManagerNotification = Notification.Name(rawValue: "com.yinhe.didLoadYhManager")
public static let backToHomeNotification = Notification.Name(rawValue: "com.yinhe.backToHomeNotification")
......
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