Commit 9bec033d authored by David黄金龙's avatar David黄金龙

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

* 'youhua-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 文件清单返回我的服务tab
  // CRM后台配置
parents 1c80ae81 c19c2cd2
......@@ -208,6 +208,8 @@ extension YHServiceCenterMainViewController {
} else {
navBar.isHidden = true
}
NotificationCenter.default.addObserver(self, selector: #selector(goToServiceTabFromFileListPage), name: YhConstant.YhNotification.didClickFileListBackToServiceTabNotifiction, object: nil)
}
override func viewDidLayoutSubviews() {
......@@ -457,3 +459,26 @@ extension YHServiceCenterMainViewController {
}
}
extension YHServiceCenterMainViewController {
@objc func goToServiceTabFromFileListPage() {
// 进行中有数据则切换到进行中,进行中无数据则切换到全部
YHHUD.show(.progress(message: "加载中..."))
self.serviceCenterMainReqVM.getServiceCenterProgressList(self.orderId, 2) {
[weak self] success, error in
YHHUD.hide()
guard let self = self else { return }
var targetTabIndex = 0 // 全部
if self.serviceCenterMainReqVM.arrDataForSeviceCenterProgress.count > 0 {
// 进行中
targetTabIndex = 1
}
self.segmentedView.selectItemAt(index: targetTabIndex)
self.segmentedView.listContainer?.didClickSelectedItem(at: targetTabIndex)
UIViewController.current?.navigationController?.popToRootViewController(animated: true)
goTabBarBy(tabType: .service)
}
}
}
......@@ -31,8 +31,7 @@ class YHFileListViewController: YHBaseViewController {
view.bottomBtnClick = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popToRootViewController(animated: true)
self.goToTabService()
NotificationCenter.default.post(name: YhConstant.YhNotification.didClickFileListBackToServiceTabNotifiction, object: nil)
}
return view
}()
......@@ -74,10 +73,6 @@ class YHFileListViewController: YHBaseViewController {
}
func goToTabService() {
goTabBarBy(tabType: .service)
}
deinit {
NotificationCenter.default.removeObserver(self)
}
......
......@@ -256,6 +256,13 @@ extension YHChildInfoContainerVC {
func saveInfo(isSubmit:Bool, isShowSubmitMsg:Bool, isShowLoading:Bool, callBack:((Bool)->Void)?) {
guard let child = child else { return }
//【WARNING】此处空数组是为了适配CRM后台 当area为[]且address其他属性为空,adress在CRM存储值为{}
if child.address.area.count <= 0 {
child.address.area = [""]
}
if child.birthPlace.area.count <= 0 {
child.birthPlace.area = [""]
}
guard let info = child.toDictionary() else { return }
let dict:[String: Any] = ["order_id":child.orderId,
......
......@@ -209,6 +209,13 @@ extension YHSpouseInfoContainerVC {
func saveInfo(isSubmit:Bool, isShowSubmitMsg:Bool, isLoading:Bool, callBack:((Bool)->Void)?) {
guard let spouse = spouse else { return }
//【WARNING】此处空数组是为了适配CRM后台 当area为[]且address其他属性为空,adress在CRM存储值为{}
if spouse.address.area.count <= 0 {
spouse.address.area = [""]
}
if spouse.birthPlace.area.count <= 0 {
spouse.birthPlace.area = [""]
}
guard let info = spouse.toDictionary() else { return }
let dict:[String: Any] = ["order_id":orderId,
......
......@@ -220,6 +220,9 @@ extension YhConstant {
// 点击文件清单条目通知
public static let clickCertificateFileListItemNotifiction = Notification.Name(rawValue: "com.yinhe.certificate.clickFileListItem")
// 点击文件清单空视图返回服务tab页
public static let didClickFileListBackToServiceTabNotifiction = Notification.Name(rawValue: "com.yinhe.certificate.backToService")
}
}
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