Commit 1290e8a9 authored by pete谢兆麟's avatar pete谢兆麟

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

parents db561ca2 23cfdf03
This diff is collapsed.
...@@ -84,14 +84,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -84,14 +84,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
if let type = arrItems["type"] as? String,let iType = Int(type) { if let type = arrItems["type"] as? String,let iType = Int(type) {
if iType == 1 { if iType == 1 {
//跳转 //跳转
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
if !YHLoginManager.shared.isLogin() { if !YHLoginManager.shared.isLogin() {
printLog("需要登录") printLog("需要登录")
return return
} }
//直播 - 获取它对应的参数 //直播 - 获取它对应的参数
if let liveId = arrItems["LiveID"] as? String { if let liveId = arrItems["LiveID"] as? String {
let playbackInfo = YHPlayerManager.PlaybackInfo(id: liveId.intValue(), isLive: true, isFromSaleDetail: true) let playbackInfo = YHPlayerManager.PlaybackInfo(id: liveId.intValue(), isLive: true, isFromSaleDetail: false)
YHPlayerManager.shared.enterLive(from: nil, playbackInfo: playbackInfo) YHPlayerManager.shared.enterLive(from: nil, playbackInfo: playbackInfo)
} }
} }
......
...@@ -131,12 +131,18 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV ...@@ -131,12 +131,18 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.redirectPath == YHAIJumpPageType.galaxySelect.rawValue { } else if model.redirectPath == YHAIJumpPageType.galaxySelect.rawValue {
YHAnalytics.track("APP_ChanPinZhenXuan")
// 银河甄选 // 银河甄选
let vc = YHSelectViewController() let vc = YHSelectViewController()
vc.hideFlag = false vc.hideFlag = false
UIViewController.current?.navigationController?.pushViewController(vc, animated: true) UIViewController.current?.navigationController?.pushViewController(vc, animated: true)
} else if model.redirectPath == YHAIJumpPageType.appServiceTab.rawValue { } else if model.redirectPath == YHAIJumpPageType.appServiceTab.rawValue {
YHAnalytics.track("APP_FuWuJinDu")
// 服务页 // 服务页
UIViewController.current?.navigationController?.popToRootViewController(animated: false) UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service) goTabBarBy(tabType: .service)
...@@ -152,6 +158,13 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV ...@@ -152,6 +158,13 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
} else { } else {
if model.businessType == YHAIRobotType.education.rawValue {
YHAnalytics.track("APP_JiaoYuBao")
} else if model.businessType == YHAIRobotType.sale.rawValue {
YHAnalytics.track("APP_GuiHuaShi")
}
self.manager.getSubRobotChatConversationId(listItemId: "\(model.id)") { self.manager.getSubRobotChatConversationId(listItemId: "\(model.id)") {
sesseionId in sesseionId in
let vc = YHAIRobotChatViewController() let vc = YHAIRobotChatViewController()
......
...@@ -576,6 +576,9 @@ extension YHHomeHoldViewPageViewController : UITabBarControllerDelegate { ...@@ -576,6 +576,9 @@ extension YHHomeHoldViewPageViewController : UITabBarControllerDelegate {
} }
if index == 2 { // AI港小宝 if index == 2 { // AI港小宝
YHAnalytics.track("APP_HomeTab_GangXiaoBao")
if !YHLoginManager.shared.isLogin() { if !YHLoginManager.shared.isLogin() {
YHOneKeyLoginManager.shared.oneKeyLogin() YHOneKeyLoginManager.shared.oneKeyLogin()
return false return false
......
...@@ -18,7 +18,31 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -18,7 +18,31 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
var block: Block? var block: Block?
var viewModel: YHHomeWebViewModel! var viewModel: YHHomeWebViewModel!
var webview = DWKWebView() // var webview = DWKWebView()
lazy var webview : DWKWebView = {
let config = WKWebViewConfiguration()
config.applicationNameForUserAgent = "YinHeApp"
#if DEBUG
if #available(iOS 14.5, *) {
config.upgradeKnownHostsToHTTPS = false
} else {
// Fallback on earlier versions
}
#endif
config.allowsInlineMediaPlayback = true
/// 开启让自动播放
config.mediaTypesRequiringUserActionForPlayback = []
let webview = DWKWebView(frame: .zero, configuration: config)
webview.scrollView.contentInsetAdjustmentBehavior = .never
webview.navigationDelegate = self
// webview.scrollView.delegate = self
webview.setDebugMode(false)
// webview.uiDelegate = self
return webview
}()
var progBar = UIProgressView() var progBar = UIProgressView()
var bottomView: YHHomeWebBottomView! var bottomView: YHHomeWebBottomView!
var url = "" var url = ""
...@@ -31,6 +55,12 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -31,6 +55,12 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
return view return view
}() }()
lazy var vm: YHHomePageViewModel = {
let vm = YHHomePageViewModel()
return vm
}()
lazy var noNetWorkTipsView: YHEmptyDataView = { lazy var noNetWorkTipsView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("无网络", kNotNetWorkBgName) let view = YHEmptyDataView.createView("无网络", kNotNetWorkBgName)
view.topMargin = 222 view.topMargin = 222
...@@ -104,7 +134,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -104,7 +134,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
// 创建wkwebview // 创建wkwebview
webview = DWKWebView(frame: CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight! - 59 - k_Height_safeAreaInsetsBottom())) // webview = DWKWebView(frame: CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight! - 59 - k_Height_safeAreaInsetsBottom()))
webview.navigationDelegate = self webview.navigationDelegate = self
webview.setDebugMode(false) webview.setDebugMode(false)
...@@ -125,6 +155,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -125,6 +155,7 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
printLog("url: 有问题") printLog("url: 有问题")
} }
} }
webview.frame = CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight! - 59 - k_Height_safeAreaInsetsBottom())
// 添加wkwebview // 添加wkwebview
self.view.addSubview(webview) self.view.addSubview(webview)
...@@ -321,12 +352,23 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -321,12 +352,23 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
guard let url = URL(string: self.model.img_url) else { guard let url = URL(string: self.model.img_url) else {
return return
} }
let param = ["share_channel":1,"article_id":id]
vm.postShareInfo(params: param) { success, error in
if success {
} else {
}
}
let task = URLSession.shared.dataTask(with: url) { data, response, error in let task = URLSession.shared.dataTask(with: url) { data, response, error in
DispatchQueue.main.async { DispatchQueue.main.async {
guard let data = data, error == nil else { return } guard let data = data, error == nil else { return }
let image = UIImage(data: data) let image = UIImage(data: data)
if let image = image { if let image = image {
let url = self.url + "&isShare=1" let url = self.url + "&appShare=1" + "&isShare=1" + "&fromPlatform=iOS" + "&uid=\(YHLoginManager.shared.userModel?.id ?? "0")" + "&article_id=\(self.id)"
YHShareManager.shared.sendLinkContent(self.model.title, "", image, link: url) YHShareManager.shared.sendLinkContent(self.model.title, "", image, link: url)
} }
} }
......
...@@ -23,6 +23,8 @@ class YHConfigModel : SmartCodable { ...@@ -23,6 +23,8 @@ class YHConfigModel : SmartCodable {
var is_integral_open : Bool = false //条件控制哈 PingGuoShenHe true - 展示 false - hidden var is_integral_open : Bool = false //条件控制哈 PingGuoShenHe true - 展示 false - hidden
// var is_recharge_order_open : Bool = false //双十一banner开关 //`is_recharge_order_open` int NOT NULL DEFAULT '0' COMMENT '1 开启 0关闭', // var is_recharge_order_open : Bool = false //双十一banner开关 //`is_recharge_order_open` int NOT NULL DEFAULT '0' COMMENT '1 开启 0关闭',
// 人民币-港币的汇率
var rate: String = ""
required init() { required init() {
} }
......
...@@ -595,4 +595,20 @@ extension YHHomePageViewModel { ...@@ -595,4 +595,20 @@ extension YHHomePageViewModel {
callBackBlock(false,err) callBackBlock(false,err)
} }
} }
//点击分享 进行数据统计
func postShareInfo(params :[String:Any] = [:], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.DataCollection.shareApi
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
callBackBlock(true, nil)
} else {
callBackBlock(false, nil)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
} }
...@@ -264,7 +264,13 @@ extension YHInformationPerfectListVC { ...@@ -264,7 +264,13 @@ extension YHInformationPerfectListVC {
//我的方案 //我的方案
@objc func goMySchemeVC() { @objc func goMySchemeVC() {
YHMyNewSchemeViewController.shared.goToSchemePage() if productType == 0 { // 优才
YHMyNewSchemeViewController.shared.goToSchemePage()
} else if productType == 1 || productType == 2 || productType == 3 { // 高才ABC
let vc = YHGCMineSchemeViewController()
navigationController?.pushViewController(vc)
}
} }
@objc func goInfoListVC( ) { @objc func goInfoListVC( ) {
...@@ -274,10 +280,21 @@ extension YHInformationPerfectListVC { ...@@ -274,10 +280,21 @@ extension YHInformationPerfectListVC {
private func goInfoListVCOp(index : Int = 0) { private func goInfoListVCOp(index : Int = 0) {
let vc = YHPreviewMainViewController()
vc.orderId = orderId if productType == 0 { // 优才
vc.myDefaultIndex = index let vc = YHPreviewMainViewController()
navigationController?.pushViewController(vc) vc.orderId = orderId
vc.myDefaultIndex = index
navigationController?.pushViewController(vc)
} else if productType == 1 || productType == 2 || productType == 3 { // 高才ABC
let vc = YHGCPreviewMainViewController()
vc.productType = productType
vc.orderId = orderId
vc.myDefaultIndex = index
navigationController?.pushViewController(vc)
}
} }
...@@ -636,12 +653,13 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource ...@@ -636,12 +653,13 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
} else if tapIndex == 3 { } else if tapIndex == 3 {
//高A- 收入记录/工作经验 //高A- 收入记录/工作经验
YHHUD.flash(message: "高A- 收入记录/工作经验") let ctl = YHGCIncomeRecordViewController(orderId: orderId ?? 0)
navigationController?.pushViewController(ctl)
} else if tapIndex == 4 { } else if tapIndex == 4 {
//高A- 基本资料 //高A- 基本资料
YHHUD.flash(message: "高A- 基本资料") let ctl = YHGCBasicInfoFillViewController()
ctl.orderId = orderId ?? 0
navigationController?.pushViewController(ctl)
} }
else { else {
YHHUD.flash(message: "高A- 未知") YHHUD.flash(message: "高A- 未知")
...@@ -687,7 +705,9 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource ...@@ -687,7 +705,9 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
navigationController?.pushViewController(vc) navigationController?.pushViewController(vc)
} else if tapIndex == 5 { } else if tapIndex == 5 {
//高才BC- 基本资料 //高才BC- 基本资料
YHHUD.flash(message: "高才BC- 基本资料") let ctl = YHGCBasicInfoFillViewController()
ctl.orderId = orderId ?? 0
navigationController?.pushViewController(ctl)
} }
else { else {
YHHUD.flash(message: "高才BC- 未知") YHHUD.flash(message: "高才BC- 未知")
......
...@@ -283,6 +283,8 @@ class YHServiceOrderListViewController: YHBaseViewController { ...@@ -283,6 +283,8 @@ class YHServiceOrderListViewController: YHBaseViewController {
} else if type == 202 { } else if type == 202 {
//高才我的方案 //高才我的方案
let vc = YHGCMineSchemeViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 203 { } else if type == 203 {
//高才我的证件 //高才我的证件
......
...@@ -63,7 +63,7 @@ extension YHCertificateEntryCell { ...@@ -63,7 +63,7 @@ extension YHCertificateEntryCell {
color = UIColor.warnColor color = UIColor.warnColor
} else if dataModel.checkStatus == 1 { } else if dataModel.checkStatus == 1 {
title = "已完成" title = "已完成"
color = UIColor.labelTextColor2 color = UIColor(hex: 0x3CC694)
} else if dataModel.checkStatus == 2 { } else if dataModel.checkStatus == 2 {
title = "已驳回" title = "已驳回"
......
...@@ -36,6 +36,8 @@ class YHCertificateEntryHeadView: UIView { ...@@ -36,6 +36,8 @@ class YHCertificateEntryHeadView: UIView {
return titleLable return titleLable
}() }()
let numFont = UIFont(name: "DINAlternate-Bold", size: 14)!
private lazy var statiticLable : UILabel = { private lazy var statiticLable : UILabel = {
let titleLable = UILabel(text: "待上传0件,已驳回0件,审核中0件,已完成0件") let titleLable = UILabel(text: "待上传0件,已驳回0件,审核中0件,已完成0件")
...@@ -65,19 +67,19 @@ private extension YHCertificateEntryHeadView { ...@@ -65,19 +67,19 @@ private extension YHCertificateEntryHeadView {
} }
let a: ASAttributedString = .init("待上传", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("待上传", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let aa: ASAttributedString = .init("0", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let aa: ASAttributedString = .init("0", .font(numFont),.foreground(UIColor.warnColor))
let b: ASAttributedString = .init("件,已驳回", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let b: ASAttributedString = .init("件,已驳回", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("0", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let bb: ASAttributedString = .init("0", .font(numFont),.foreground(UIColor.warnColor))
let c: ASAttributedString = .init("件,审核中", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let c: ASAttributedString = .init("件,审核中", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let cc: ASAttributedString = .init("0", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let cc: ASAttributedString = .init("0", .font(numFont),.foreground(UIColor.warnColor))
let d: ASAttributedString = .init("件,已完成", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let d: ASAttributedString = .init("件,已完成", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let dd: ASAttributedString = .init("0", .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let dd: ASAttributedString = .init("0", .font(numFont),.foreground(UIColor.warnColor))
let e: ASAttributedString = .init("件", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let e: ASAttributedString = .init("件", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
...@@ -103,19 +105,19 @@ private extension YHCertificateEntryHeadView { ...@@ -103,19 +105,19 @@ private extension YHCertificateEntryHeadView {
nameLable.text = "您好," + tmp nameLable.text = "您好," + tmp
let a: ASAttributedString = .init("待上传", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("待上传", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let aa: ASAttributedString = .init(NSAttributedString(string: String(dataModel.to_be_submit_num)), .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let aa: ASAttributedString = .init(NSAttributedString(string: String(dataModel.to_be_submit_num)), .font(numFont),.foreground(UIColor.warnColor))
let b: ASAttributedString = .init("件,已驳回", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let b: ASAttributedString = .init("件,已驳回", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init(NSAttributedString(string: String(dataModel.reject_num)), .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let bb: ASAttributedString = .init(NSAttributedString(string: String(dataModel.reject_num)), .font(numFont),.foreground(UIColor.warnColor))
let c: ASAttributedString = .init("件,审核中", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let c: ASAttributedString = .init("件,审核中", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let cc: ASAttributedString = .init(NSAttributedString(string: String(dataModel.to_be_audit_num)), .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let cc: ASAttributedString = .init(NSAttributedString(string: String(dataModel.to_be_audit_num)), .font(numFont),.foreground(UIColor.warnColor))
let d: ASAttributedString = .init("件,已完成", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let d: ASAttributedString = .init("件,已完成", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
let dd: ASAttributedString = .init(NSAttributedString(string: String(dataModel.pass_num)), .font(UIFont.PFSC_B(ofSize: 17)),.foreground(UIColor.warnColor)) let dd: ASAttributedString = .init(NSAttributedString(string: String(dataModel.pass_num)), .font(numFont),.foreground(UIColor.warnColor))
let e: ASAttributedString = .init("件", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor)) let e: ASAttributedString = .init("件", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor))
......
...@@ -62,7 +62,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -62,7 +62,7 @@ class YHCertificateInfoCell: UITableViewCell {
titleColor = .warnColor titleColor = .warnColor
title = "审核中".local title = "审核中".local
case .finish: case .finish:
titleColor = .labelTextColor2 titleColor = UIColor(hex: 0x3CC694)
title = "已完成".local title = "已完成".local
case .all: case .all:
titleColor = .labelTextColor2 titleColor = .labelTextColor2
...@@ -187,7 +187,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -187,7 +187,7 @@ class YHCertificateInfoCell: UITableViewCell {
nameTextView.snp.makeConstraints { make in nameTextView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10) make.left.equalToSuperview().offset(10)
make.top.equalToSuperview().offset(4) make.top.equalToSuperview().offset(4)
make.right.equalTo(statusLabel.snp.left).offset(-26) make.right.equalTo(statusLabel.snp.left).offset(-21)
} }
infoLabel.snp.makeConstraints { make in infoLabel.snp.makeConstraints { make in
......
...@@ -13,6 +13,7 @@ class YHBasicInfoSessionModel { ...@@ -13,6 +13,7 @@ class YHBasicInfoSessionModel {
var arrQuestionItem : [YHBasicInfoCellModel] = [] var arrQuestionItem : [YHBasicInfoCellModel] = []
var model : SpouseModel? var model : SpouseModel?
var gcModel: YHGCApplicantModel?
init(sessionTitle: String, arrQuestionItem: [YHBasicInfoCellModel]) { init(sessionTitle: String, arrQuestionItem: [YHBasicInfoCellModel]) {
self.sessionTitle = sessionTitle self.sessionTitle = sessionTitle
self.arrQuestionItem = arrQuestionItem self.arrQuestionItem = arrQuestionItem
......
...@@ -667,7 +667,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol { ...@@ -667,7 +667,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
// 是否与主申请人同住 1:是 0:否 // 是否与主申请人同住 1:是 0:否
var nows: Int = 0 var nows: Int = 0
// 是否拥有现时定居国家/地区的永久居留身份 0:否 1:是 2没有选择 // 是否拥有现时定居国家/地区的永久居留身份 0:否 1:是 2没有选择
var isCurrentlyOverseas: Int = 2 var havePermanentResidency: Int = 2
// 海外居留开始时间 // 海外居留开始时间
var residenceTime: String = "" var residenceTime: String = ""
// 是否办理过港澳通行证 1:是 0:否 // 是否办理过港澳通行证 1:是 0:否
...@@ -755,7 +755,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol { ...@@ -755,7 +755,7 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
case isHkHandled = "is_hk_handled" case isHkHandled = "is_hk_handled"
case isInHk = "is_in_hk" case isInHk = "is_in_hk"
case isLiveOverseaYear = "is_live_oversea_year" case isLiveOverseaYear = "is_live_oversea_year"
case isCurrentlyOverseas = "is_currently_overseas" case havePermanentResidency = "have_permanent_residency"
case residenceTime = "residence_time" case residenceTime = "residence_time"
case surname = "surname" case surname = "surname"
} }
...@@ -796,13 +796,19 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol { ...@@ -796,13 +796,19 @@ class YHFamilyMember: SmartCodable, YHFormItemProtocol {
self.nows = (value ? 1 : 0) self.nows = (value ? 1 : 0)
} }
// 是否拥有现时定居国家/地区的永久居留身份 // 是否拥有现时定居国家/地区的永久居留身份 nil表示未选
func isHavePermanentResidenceStatus() -> Bool { func isHavePermanentResidenceStatus() -> Bool? {
return self.isCurrentlyOverseas == 1 if self.havePermanentResidency == 1 {
return true
} else if self.havePermanentResidency == 0 {
return false
}
return nil
} }
func setHavePermanentResidenceStatus(_ value: Bool) { func setHavePermanentResidenceStatus(_ value: Bool) {
return self.isCurrentlyOverseas = value ? 1 : 2 return self.havePermanentResidency = value ? 1 : 0
} }
// 是否在海外居住满1年及以上 // 是否在海外居住满1年及以上
......
...@@ -210,14 +210,14 @@ class YHFormItemDoubleChoiceCell: UITableViewCell { ...@@ -210,14 +210,14 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
tipsLabel.text = tips tipsLabel.text = tips
tipsLabel.isHidden = !isShow tipsLabel.isHidden = !isShow
if isShow { if isShow {
tipsLabel.snp.makeConstraints { make in tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalTo(titleLabel.snp.bottom) make.top.equalTo(titleLabel.snp.bottom)
make.bottom.equalToSuperview().offset(-16).priority(.medium) make.bottom.equalToSuperview().offset(-16).priority(.medium)
} }
} else { } else {
tipsLabel.snp.makeConstraints { make in tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap) make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap) make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(0) make.height.equalTo(0)
......
...@@ -42,6 +42,8 @@ class YHIncomeRecordItemCell: YHResignDocumentCell { ...@@ -42,6 +42,8 @@ class YHIncomeRecordItemCell: YHResignDocumentCell {
private lazy var deleteButton: UIButton = { private lazy var deleteButton: UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setTitle("删除", for: .normal) button.setTitle("删除", for: .normal)
button.setTitleColor(UIColor.failColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(deleteButtonDidClick(_:)), for: .touchUpInside) button.addTarget(self, action: #selector(deleteButtonDidClick(_:)), for: .touchUpInside)
return button return button
}() }()
...@@ -68,25 +70,11 @@ class YHIncomeRecordItemCell: YHResignDocumentCell { ...@@ -68,25 +70,11 @@ class YHIncomeRecordItemCell: YHResignDocumentCell {
if isEditing { if isEditing {
rightLabel.isHidden = true rightLabel.isHidden = true
rightArrowIcon.isHidden = true rightArrowIcon.isHidden = true
deleteButton.isHidden = true deleteButton.isHidden = false
bottomLineView.snp.remakeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
} else { } else {
rightLabel.isHidden = false rightLabel.isHidden = false
rightArrowIcon.isHidden = false rightArrowIcon.isHidden = false
deleteButton.isHidden = true deleteButton.isHidden = true
bottomLineView.snp.remakeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
} }
bottomLineView.isHidden = !showBottomLine bottomLineView.isHidden = !showBottomLine
......
...@@ -24,13 +24,16 @@ class YHIncomeRecordSummaryCell: YHResignDocumentCell { ...@@ -24,13 +24,16 @@ class YHIncomeRecordSummaryCell: YHResignDocumentCell {
let label = UILabel() let label = UILabel()
label.font = .PFSC_R(ofSize: 12) label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2") label.textColor = UIColor(hexString: "#8993A2")
label.text = "(仅申报近12个月应纳税收入总额))" label.text = "(仅申报近12个月应纳税收入总额)"
return label return label
}() }()
private lazy var rightButton: UIButton = { private lazy var rightButton: UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setImage(UIImage(named: "work_more"), for: .normal) button.setTitle("编辑", for: .normal)
button.setTitle("取消编辑", for: .selected)
button.setTitleColor(.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(rightButtonDidClick(_:)), for: .touchUpInside) button.addTarget(self, action: #selector(rightButtonDidClick(_:)), for: .touchUpInside)
return button return button
}() }()
...@@ -64,14 +67,20 @@ extension YHIncomeRecordSummaryCell { ...@@ -64,14 +67,20 @@ extension YHIncomeRecordSummaryCell {
} }
private func updateRightButtonState(_ isEditing: Bool) { private func updateRightButtonState(_ isEditing: Bool) {
rightButton.isSelected = isEditing
if isEditing { if isEditing {
rightButton.setImage(nil, for: .normal) rightButton.snp.remakeConstraints { make in
rightButton.setTitle("取消操作", for: .normal) make.right.equalToSuperview().offset(-18)
rightButton.setTitleColor(.brandMainColor, for: .normal) make.top.equalToSuperview().offset(16)
rightButton.titleLabel?.font = .PFSC_R(ofSize: 14) make.width.equalTo(56)
make.height.equalTo(24)
}
} else { } else {
rightButton.setImage(UIImage(named: "work_more"), for: .normal) rightButton.snp.remakeConstraints { make in
rightButton.setTitle(nil, for: .normal) make.right.equalToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.width.height.equalTo(28)
}
} }
} }
......
...@@ -56,8 +56,10 @@ class YHTotalIncomeCell: YHResignDocumentCell { ...@@ -56,8 +56,10 @@ class YHTotalIncomeCell: YHResignDocumentCell {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
func setupCellInfo(detail: ASAttributedString) { func setupCellInfo(detail: ASAttributedString, cellType: YHResignRoundCellType = .bottom, showTopLine: Bool = true) {
infoDetailLabel.attributed.text = detail infoDetailLabel.attributed.text = detail
updateCellCorner(cellType)
topLineView.isHidden = !showTopLine
} }
} }
......
...@@ -11,7 +11,7 @@ import UIKit ...@@ -11,7 +11,7 @@ import UIKit
class YHWorkingHoursStatementCell: YHResignDocumentCell { class YHWorkingHoursStatementCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHWorkingHoursStatementCell" static let cellReuseIdentifier = "YHWorkingHoursStatementCell"
private let maxCount = 200 private let maxCount = 1000
var textViewDidChanged: ((UITextView) -> Void)? var textViewDidChanged: ((UITextView) -> Void)?
var textDidExceedsMaxLimit: ((Int) -> Void)? var textDidExceedsMaxLimit: ((Int) -> Void)?
...@@ -77,6 +77,7 @@ class YHWorkingHoursStatementCell: YHResignDocumentCell { ...@@ -77,6 +77,7 @@ class YHWorkingHoursStatementCell: YHResignDocumentCell {
func setupCellInfo(placeholder: String, remark: String?, detail: ASAttributedString, isShowBottomLine: Bool) { func setupCellInfo(placeholder: String, remark: String?, detail: ASAttributedString, isShowBottomLine: Bool) {
editTipsLabel.text = placeholder editTipsLabel.text = placeholder
editTipsLabel.isHidden = remark?.isEmpty == false
remarkTextView.text = remark remarkTextView.text = remark
infoDetailLabel.attributed.text = detail infoDetailLabel.attributed.text = detail
bottomLineView.isHidden = !isShowBottomLine bottomLineView.isHidden = !isShowBottomLine
...@@ -85,7 +86,7 @@ class YHWorkingHoursStatementCell: YHResignDocumentCell { ...@@ -85,7 +86,7 @@ class YHWorkingHoursStatementCell: YHResignDocumentCell {
extension YHWorkingHoursStatementCell { extension YHWorkingHoursStatementCell {
private func setupUI() { private func setupUI() {
updateCellCorner(.bottom) updateCellCorner(.single)
subContainerView.addSubview(infoDetailLabel) subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(remarkTextViewContainer) subContainerView.addSubview(remarkTextViewContainer)
subContainerView.addSubview(bottomLineView) subContainerView.addSubview(bottomLineView)
......
...@@ -16,7 +16,7 @@ class YHAcademicPreviewModel: SmartCodable { ...@@ -16,7 +16,7 @@ class YHAcademicPreviewModel: SmartCodable {
var edu_count: Int = 0 var edu_count: Int = 0
var qla_count: Int = 0 var qla_count: Int = 0
var is_married: Int = 0 var is_married: Int = 0
var is_name_same: Bool = false
var edu_list : [eduListModel]? var edu_list : [eduListModel]?
var qla_list : [qlaListModel]? var qla_list : [qlaListModel]?
...@@ -36,9 +36,13 @@ class eduListModel: SmartCodable { ...@@ -36,9 +36,13 @@ class eduListModel: SmartCodable {
var professional: String = "" var professional: String = ""
var background: String = "" var background: String = ""
var degree_type: String = "" var degree_type: String = ""
var cert_confirm: Int = 0
var school_address: schoolAddressModel? var school_address: schoolAddressModel?
var major_other: String = ""
var has_bachelor_degree: Int = 0
required init() { required init() {
} }
} }
......
...@@ -77,7 +77,7 @@ class YHGCMyFileListViewController: YHBaseViewController { ...@@ -77,7 +77,7 @@ class YHGCMyFileListViewController: YHBaseViewController {
}() }()
lazy var bgImgView:UIImageView = { lazy var bgImgView:UIImageView = {
let bgView = UIImageView(image: UIImage(named: "my_filelist_bg")) let bgView = UIImageView(image: UIImage(named: "my_filelist_gc_bg"))
return bgView return bgView
}() }()
...@@ -244,7 +244,8 @@ class YHGCMyFileListViewController: YHBaseViewController { ...@@ -244,7 +244,8 @@ class YHGCMyFileListViewController: YHBaseViewController {
let textColor = UIColor.mainTextColor70 let textColor = UIColor.mainTextColor70
let countColor = UIColor.brandMainColor let countColor = UIColor.brandMainColor
let textFont = UIFont.PFSC_R(ofSize: 14) let textFont = UIFont.PFSC_R(ofSize: 14)
let countFont = UIFont.PFSC_B(ofSize: 16) let countFont = UIFont(name: "DINAlternate-Bold", size: 16)!
let a: ASAttributedString = .init("您有 ", .font(textFont),.foreground(textColor)) let a: ASAttributedString = .init("您有 ", .font(textFont),.foreground(textColor))
let b: ASAttributedString = .init(NSAttributedString(string: String(submitCount)), .font(countFont),.foreground(countColor)) let b: ASAttributedString = .init(NSAttributedString(string: String(submitCount)), .font(countFont),.foreground(countColor))
let c: ASAttributedString = .init(" 项待提交,", .font(textFont),.foreground(textColor)) let c: ASAttributedString = .init(" 项待提交,", .font(textFont),.foreground(textColor))
......
...@@ -146,7 +146,7 @@ class YHGCCertificateListContainerVC: YHBaseViewController { ...@@ -146,7 +146,7 @@ class YHGCCertificateListContainerVC: YHBaseViewController {
view.addSubview(navBar) view.addSubview(navBar)
view.addSubview(segmentContainerView) view.addSubview(segmentContainerView)
segmentContainerView.addSubview(segmentedView) segmentContainerView.addSubview(segmentedView)
segmentContainerView.addSubview(filterBtn) // segmentContainerView.addSubview(filterBtn)
view.addSubview(listContainerView) view.addSubview(listContainerView)
navBar.snp.makeConstraints { make in navBar.snp.makeConstraints { make in
...@@ -162,15 +162,15 @@ class YHGCCertificateListContainerVC: YHBaseViewController { ...@@ -162,15 +162,15 @@ class YHGCCertificateListContainerVC: YHBaseViewController {
segmentedView.snp.makeConstraints { make in segmentedView.snp.makeConstraints { make in
make.top.left.equalToSuperview() make.top.left.equalToSuperview()
make.right.equalToSuperview().offset(-21-18) make.right.equalToSuperview()
make.height.equalTo(Self.segmentHeight) make.height.equalTo(Self.segmentHeight)
} }
filterBtn.snp.makeConstraints { make in // filterBtn.snp.makeConstraints { make in
make.width.height.equalTo(YHCertificateFilterButton.width) // make.width.height.equalTo(YHCertificateFilterButton.width)
make.centerY.equalToSuperview().offset(-2) // make.centerY.equalToSuperview().offset(-2)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
} // }
listContainerView.snp.makeConstraints { make in listContainerView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
......
...@@ -50,7 +50,7 @@ class YHGCMineCertificateEntryViewController: YHBaseViewController { ...@@ -50,7 +50,7 @@ class YHGCMineCertificateEntryViewController: YHBaseViewController {
tableView.showsHorizontalScrollIndicator = false tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension tableView.rowHeight = UITableView.automaticDimension
tableView.register(YHCertificateEntryCell.self,forCellReuseIdentifier: YHCertificateEntryCell.cellReuseIdentifier) tableView.register(YHGCCertificateEntryCell.self,forCellReuseIdentifier: YHGCCertificateEntryCell.cellReuseIdentifier)
return tableView return tableView
}() }()
...@@ -168,11 +168,11 @@ extension YHGCMineCertificateEntryViewController : UITableViewDelegate,UITableVi ...@@ -168,11 +168,11 @@ extension YHGCMineCertificateEntryViewController : UITableViewDelegate,UITableVi
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return YHCertificateEntryCell.cellH return YHGCCertificateEntryCell.cellH
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHCertificateEntryCell.self) let cell0 = tableView.dequeueReusableCell(withClass: YHGCCertificateEntryCell.self)
cell0.selectionStyle = .none cell0.selectionStyle = .none
guard let model = certificateReqVM.certificateEntryModel else { return cell0 } guard let model = certificateReqVM.certificateEntryModel else { return cell0 }
......
//
// YHGCCertificateEntryCell.swift
// galaxy
//
// Created by Dufet on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCCertificateEntryCell: UITableViewCell {
static let cellReuseIdentifier = "YHGCCertificateEntryCell"
static let cellH : CGFloat = 68.0
var dataModel : YHCategoryData? {
didSet {
updateUI()
}
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var contractNameLable = {
let lable = UILabel()
lable.textColor = UIColor.mainTextColor
lable.font = UIFont.PFSC_M(ofSize: 16)
lable.text = "主申请人(张三)"
return lable
}()
lazy var contractIdLable = {
let lable = UILabel()
lable.textColor = UIColor(hex: 0x3CC694)
lable.font = UIFont.PFSC_R(ofSize: 14)
lable.text = "已完成"
lable.textAlignment = .right
return lable
}()
}
extension YHGCCertificateEntryCell {
func updateUI() {
guard let dataModel = dataModel else { return }
var name = ""
if dataModel.userName.isEmpty == false {
name = "(" + dataModel.userName + ")"
}
contractNameLable.text = dataModel.applicantName + name
//0:未审核,1:通过 2:驳回,3:未提交',
var title = ""
var color : UIColor = .failColor
if dataModel.checkStatus == 0 {
title = "审核中"
color = UIColor.warnColor
} else if dataModel.checkStatus == 1 {
title = "已完成"
color = UIColor(hex: 0x3CC694)
} else if dataModel.checkStatus == 2 {
title = "已驳回"
color = UIColor.failColor
} else if dataModel.checkStatus == 3 {
title = "待上传"
color = UIColor.brandMainColor
} else {
title = "--"
color = UIColor.brandMainColor
}
contractIdLable.text = title
contractIdLable.textColor = color
}
func setupUI() {
let holdView = UIView()
holdView.backgroundColor = .white
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
backgroundColor = .clear
contentView.backgroundColor = .clear
contentView.addSubview(holdView)
holdView.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
}
let nextImgV = UIImageView()
nextImgV.image = UIImage(named: "service_center_right_next_icon")
nextImgV.contentMode = .scaleAspectFill
holdView.addSubview(nextImgV)
nextImgV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(-26)
make.width.height.equalTo(kMargin)
}
holdView.addSubview(contractIdLable)
contractIdLable.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(nextImgV.snp.left).offset(-2)
make.width.equalTo(50)
make.height.equalTo(20)
}
holdView.addSubview(contractNameLable)
contractNameLable.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(21)
make.right.equalTo(contractIdLable.snp.left).offset(-10)
make.height.equalTo(24)
}
}
}
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
class YHGCBasicInfoFillViewController: YHBaseViewController { class YHGCBasicInfoFillViewController: YHBaseViewController {
var orderId: Int? var orderId: Int?
private let basicInfoVM: YHBasicInfoFillViewModel = YHBasicInfoFillViewModel() private let basicInfoVM: YHGCBasicInfoFillViewModel = YHGCBasicInfoFillViewModel()
var homeTableView: UITableView = { var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped) let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
...@@ -122,27 +122,28 @@ extension YHGCBasicInfoFillViewController { ...@@ -122,27 +122,28 @@ extension YHGCBasicInfoFillViewController {
// 保存 // 保存
let arr = basicInfoVM.arrBasicInfoSessionDataForEdit let arr = basicInfoVM.arrBasicInfoSessionDataForEdit
var param: [String: Any] = ["order_id": orderId as Any, "save_type": isSaveFlag ? "save" : "submit"] var param: [String: Any] = ["orderId": orderId ?? 0, "save_type": isSaveFlag ? "save" : "submit"]
for item in arr { for item in arr {
if item.sessionTitle == "主申请人" { if item.sessionTitle == "主申请人" {
var applicant: [String: Any] = [:] var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() { for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 { if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] if item0.answer == "Y" {
applicant.updateValue(value, forKey: "has_conviction") applicant.updateValue(item0.info.count > 0 ? 1 : 2, forKey: "deny")
applicant.updateValue(item0.info, forKey: "denyContent")
} else if item0.answer == "N" {
applicant.updateValue(0, forKey: "deny")
applicant.updateValue("", forKey: "denyContent")
}
} else if index0 == 1 { } else if index0 == 1 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] if item0.answer == "Y" {
applicant.updateValue(value, forKey: "has_departure") applicant.updateValue(item0.info.count > 0 ? 1 : 2, forKey: "crime")
} else if index0 == 2 { applicant.updateValue(item0.info, forKey: "crimeContent")
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] } else if item0.answer == "N" {
applicant.updateValue(value, forKey: "has_deny") applicant.updateValue(0, forKey: "crime")
} else if index0 == 3 { applicant.updateValue("", forKey: "crimeContent")
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] }
applicant.updateValue(value, forKey: "has_breaking_law")
} else if index0 == 4 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "has_other_id")
} else { } else {
printLog("其他数据没有处理") printLog("其他数据没有处理")
} }
...@@ -153,17 +154,27 @@ extension YHGCBasicInfoFillViewController { ...@@ -153,17 +154,27 @@ extension YHGCBasicInfoFillViewController {
var applicant: [String: Any] = [:] var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() { for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 { if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] if item0.answer == "Y" {
applicant.updateValue(value, forKey: "child_departure") applicant.updateValue(item0.info.count > 0 ? 1 : 2, forKey: "deny")
applicant.updateValue(item0.info, forKey: "denyContent")
} else if item0.answer == "N" {
applicant.updateValue(0, forKey: "deny")
applicant.updateValue("", forKey: "denyContent")
}
} else if index0 == 1 { } else if index0 == 1 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] if item0.answer == "Y" {
applicant.updateValue(value, forKey: "child_deny") applicant.updateValue(item0.info.count > 0 ? 1 : 2, forKey: "crime")
applicant.updateValue(item0.info, forKey: "crimeContent")
} else if item0.answer == "N" {
applicant.updateValue(0, forKey: "crime")
applicant.updateValue("", forKey: "crimeContent")
}
} else { } else {
printLog("其他数据没有处理") printLog("其他数据没有处理")
} }
} }
applicant.updateValue(basicInfoVM.dataModelForBasicInfo?.spouse?.id ?? 0, forKey: "id") applicant.updateValue(basicInfoVM.dataModelForBasicInfo?.spouse?.id ?? 0, forKey: "id")
applicant.updateValue(basicInfoVM.dataModelForBasicInfo?.spouse?.subset_name ?? 0, forKey: "subset_name") // applicant.updateValue(basicInfoVM.dataModelForBasicInfo?.spouse?.name ?? "", forKey: "name")
param.updateValue(applicant, forKey: "spouse") param.updateValue(applicant, forKey: "spouse")
} else if item.sessionTitle.hasPrefix("子女") { } else if item.sessionTitle.hasPrefix("子女") {
var arr: [[String: Any]] = [] var arr: [[String: Any]] = []
...@@ -174,33 +185,31 @@ extension YHGCBasicInfoFillViewController { ...@@ -174,33 +185,31 @@ extension YHGCBasicInfoFillViewController {
var applicant: [String: Any] = [:] var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() { for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 { if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] if item0.answer == "Y" {
applicant.updateValue(value, forKey: "child_departure") applicant.updateValue(item0.info.count > 0 ? 1 : 2, forKey: "deny")
applicant.updateValue(item0.info, forKey: "denyContent")
} else if item0.answer == "N" {
applicant.updateValue(0, forKey: "deny")
applicant.updateValue("", forKey: "denyContent")
}
} else if index0 == 1 { } else if index0 == 1 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""] if item0.answer == "Y" {
applicant.updateValue(value, forKey: "child_deny") applicant.updateValue(item0.info.count > 0 ? 1 : 2, forKey: "crime")
applicant.updateValue(item0.info, forKey: "crimeContent")
} else if item0.answer == "N" {
applicant.updateValue(0, forKey: "crime")
applicant.updateValue("", forKey: "crimeContent")
}
} else { } else {
printLog("其他数据没有处理") printLog("其他数据没有处理")
} }
} }
applicant.updateValue(item.model?.id ?? 0, forKey: "id") applicant.updateValue(item.gcModel?.id ?? 0, forKey: "id")
applicant.updateValue(item.model?.subset_name ?? "", forKey: "subset_name") // applicant.updateValue(item.gcModel?.name ?? "", forKey: "name")
arr.append(applicant) arr.append(applicant)
param.updateValue(arr, forKey: "child") param.updateValue(arr, forKey: "child")
} else if item.sessionTitle == "家庭背景" {
var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "background_member")
} else {
printLog("其他数据没有处理")
}
}
param.updateValue(applicant, forKey: "background")
} else {
} }
} }
......
//
// YHGCBasicInfoFillModel.swift
// galaxy
//
// Created by alexzzw on 2024/12/24.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import SmartCodable
import UIKit
class YHGCBasicInfoFillModel: SmartCodable {
var applicant: YHGCApplicantModel?
var spouse: YHGCApplicantModel?
var child: [YHGCApplicantModel]?
required init() {
}
}
class YHGCApplicantModel: SmartCodable {
// deny 和 crime 如果是2那就是没填, 0 1 或者 2
var deny: Int = 0
var denyContent: String = ""
var crime: Int = 0
var crimeContent: String = ""
var name: String = ""
var id: Int = 0
required init() {
}
}
//
// YHGCBasicInfoFillViewModel.swift
// galaxy
//
// Created by alexzzw on 2024/12/24.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCBasicInfoFillViewModel: YHBaseViewModel {
// UI层需要的数据源
var arrBasicInfoSessionDataForEdit: [YHBasicInfoSessionModel] = []
// 从网络请求的数据源
var dataModelForBasicInfo: YHGCBasicInfoFillModel? {
didSet {
assembleBasicInfoData()
}
}
}
extension YHGCBasicInfoFillViewModel {
private func createOrgBasiceInfoData() {
var arrData: [YHBasicInfoSessionModel] = []
do {
// 主申请人
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝签发签证或入境香港,或被遣返、遣送和要求离开香港?", answer: "", info: "")
let model2 = YHBasicInfoCellModel(question: "2、是否曾因任何罪行或违法行为在香港或其他地方被定罪?", answer: "", info: "")
let arr = [model1, model2]
let sessionModel = YHBasicInfoSessionModel(sessionTitle: "主申请人", arrQuestionItem: arr)
arrData.append(sessionModel)
}
do {
// 配偶
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝签发签证或入境香港,或被遣返、遣送和要求离开香港?", answer: "", info: "")
let model2 = YHBasicInfoCellModel(question: "2、是否曾因任何罪行或违法行为在香港或其他地方被定罪?", answer: "", info: "")
let arr = [model1, model2]
let sessionModel = YHBasicInfoSessionModel(sessionTitle: "配偶", arrQuestionItem: arr)
arrData.append(sessionModel)
}
do {
// 子女 - xxx
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝签发签证或入境香港,或被遣返、遣送和要求离开香港?", answer: "", info: "")
let model2 = YHBasicInfoCellModel(question: "2、是否曾因任何罪行或违法行为在香港或其他地方被定罪?", answer: "", info: "")
let arr = [model1, model2]
let sessionModel = YHBasicInfoSessionModel(sessionTitle: "子女 - xxx", arrQuestionItem: arr)
arrData.append(sessionModel)
}
arrBasicInfoSessionDataForEdit = arrData
}
// 根据网络数据 组装数据
private func assembleBasicInfoData() {
guard let dataModelForBasicInfo = dataModelForBasicInfo else {
createOrgBasiceInfoData()
return
}
var arrData: [YHBasicInfoSessionModel] = []
do {
// 主申请人
if let model = dataModelForBasicInfo.applicant {
let answer1 = model.deny == 0 ? "N" : "Y"
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝签发签证或入境香港,或被遣返、遣送和要求离开香港?", answer: answer1, info: model.denyContent)
let answer2 = model.crime == 0 ? "N" : "Y"
let model2 = YHBasicInfoCellModel(question: "2、是否曾因任何罪行或违法行为在香港或其他地方被定罪?", answer: answer2, info: model.crimeContent)
let arr = [model1, model2]
let sessionModel = YHBasicInfoSessionModel(sessionTitle: "主申请人", arrQuestionItem: arr)
arrData.append(sessionModel)
}
}
do {
// 配偶
if let spouse = dataModelForBasicInfo.spouse {
let answer1 = spouse.deny == 0 ? "N" : "Y"
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝签发签证或入境香港,或被遣返、遣送和要求离开香港?", answer: answer1, info: spouse.denyContent)
let answer2 = spouse.crime == 0 ? "N" : "Y"
let model2 = YHBasicInfoCellModel(question: "2、是否曾因任何罪行或违法行为在香港或其他地方被定罪?", answer: answer2, info: spouse.crimeContent)
let arr = [model1, model2]
let sessionModel = YHBasicInfoSessionModel(sessionTitle: "配偶", arrQuestionItem: arr)
arrData.append(sessionModel)
}
}
do {
// 子女 - xxx
if let arrChild = dataModelForBasicInfo.child {
for item in arrChild {
let answer1 = item.deny == 0 ? "N" : "Y"
let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝签发签证或入境香港,或被遣返、遣送和要求离开香港?", answer: answer1, info: item.denyContent)
let answer2 = item.crime == 0 ? "N" : "Y"
let model2 = YHBasicInfoCellModel(question: "2、是否曾因任何罪行或违法行为在香港或其他地方被定罪?", answer: answer2, info: item.crimeContent)
let arr = [model1, model2]
let title = "子女" + "-" + item.name
let sessionModel = YHBasicInfoSessionModel(sessionTitle: title, arrQuestionItem: arr)
sessionModel.gcModel = item
arrData.append(sessionModel)
}
}
}
arrBasicInfoSessionDataForEdit = arrData
}
}
extension YHGCBasicInfoFillViewModel {
// 获取基本资料信息
func getBasicInfo(params: [String: Any], callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.GCBasics.basicInfoApi
_ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, _ in
// 1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
guard let dic = json.data?.peel as? [String: Any], let resultModel = YHGCBasicInfoFillModel.deserialize(from: dic) else {
callBackBlock(false, nil)
return
}
self.dataModelForBasicInfo = resultModel
// 根据返回值 组装 真实的数据
callBackBlock(true, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
// 保存基本资料信息
func saveBasicInfo(params: [String: Any], callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.GCBasics.updateBasicInfoApi
_ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, _ in
// 1. json字符串 转 对象
guard self != nil else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
}
...@@ -124,7 +124,7 @@ class YHGCEducationInfoListVC: YHBaseViewController { ...@@ -124,7 +124,7 @@ class YHGCEducationInfoListVC: YHBaseViewController {
isDegreeEditMode = .none isDegreeEditMode = .none
} }
// 新增学历信息 // 新增学历信息
arr0.append(YHFormAddItem(type: .addEducation)) // arr0.append(YHFormAddItem(type: .addEducation))
items.append(arr0) items.append(arr0)
// 主申请人专业资格及会员资格 // 主申请人专业资格及会员资格
...@@ -316,7 +316,7 @@ extension YHGCEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -316,7 +316,7 @@ extension YHGCEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
if let college = eduInfo.college, !college.isEmpty { if let college = eduInfo.college, !college.isEmpty {
cell.title = eduInfo.college cell.title = eduInfo.college
} else { } else {
cell.title = "学历标题".local cell.title = "学历".local
} }
let tips = String(format: "有%d项未填", eduInfo.vacantNum) let tips = String(format: "有%d项未填", eduInfo.vacantNum)
cell.detailLabel.text = tips cell.detailLabel.text = tips
......
...@@ -75,7 +75,9 @@ class YHGCChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -75,7 +75,9 @@ class YHGCChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
// 居住信息 // 居住信息
let title2 = YHFormTitleItem(type: .liveInfo) let title2 = YHFormTitleItem(type: .liveInfo)
let item20 = YHFormDetailItem(type: .isLiveTother, value:String(child.isLiveTother())) let item20 = YHFormDetailItem(type: .isLiveTother, value:String(child.isLiveTother()))
var arr2: [YHFormItemProtocol] = [title2, item20] let item21 = YHFormDetailItem(type:.permanentResidenceStatus, value: String(child.havePermanentResidency))
item21.tips = "请选择"
var arr2: [YHFormItemProtocol] = [title2, item20, item21]
if !child.isLiveTother() { // 不同住 才需填写国家/地区 if !child.isLiveTother() { // 不同住 才需填写国家/地区
let item21 = YHFormDetailItem(type: .nationOrArea, value:child.address.country, tips:"请选择国家/地区".local) let item21 = YHFormDetailItem(type: .nationOrArea, value:child.address.country, tips:"请选择国家/地区".local)
...@@ -194,6 +196,7 @@ class YHGCChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -194,6 +196,7 @@ class YHGCChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
|| detailItem.type == .ownCustody || detailItem.type == .ownCustody
|| detailItem.type == .isLiveTother || detailItem.type == .isLiveTother
|| detailItem.type == .isLiveOverSeasMore1Year || detailItem.type == .isLiveOverSeasMore1Year
|| detailItem.type == .permanentResidenceStatus
{ {
return .twoChoice return .twoChoice
} }
...@@ -244,19 +247,52 @@ extension YHGCChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -244,19 +247,52 @@ extension YHGCChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.enableEdit = true cell.enableEdit = true
cell.disableEditTips = nil cell.disableEditTips = nil
var select = false var isShowTips = detailItem.isShowTips
if let value = detailItem.value { if detailItem.type == .permanentResidenceStatus {
select = Bool(value)! isShowTips = ((child?.isHavePermanentResidenceStatus()) == nil)
} }
cell.setTips(detailItem.tips, isShow: isNeedShowError && isShowTips)
if detailItem.type == .isAccompanyToHK, let child = child, child.is18YearsOld() { // 是否随行至香港 if detailItem.type == .isAccompanyToHK, let child = child, child.is18YearsOld() { // 是否随行至香港
// 年满18岁不能随行 随行按钮不可编辑固定为否 // 年满18岁不能随行 随行按钮不可编辑固定为否
cell.enableEdit = isFollowCanEdit cell.enableEdit = isFollowCanEdit
cell.disableEditTips = "年满十八岁的子女不能随行至香港" cell.disableEditTips = "年满十八岁的子女不能随行至香港"
} }
let answers = [YHFormChoiceItem(title: "是".local, isSelect: select),YHFormChoiceItem(title: "否".local, isSelect: !select)] if detailItem.type == .permanentResidenceStatus { // 永久居留身份
cell.answerArr = answers var isSelectYES = false
var isSelectNO = false
if let value = detailItem.value, let status = Int(value) {
if status == 2 {
isSelectYES = false
isSelectNO = false
} else if status == 1 {
isSelectYES = true
isSelectNO = false
} else if status == 0 {
isSelectYES = false
isSelectNO = true
}
}
let answers = [YHFormChoiceItem(title: "是".local, isSelect: isSelectYES),YHFormChoiceItem(title: "否".local, isSelect: isSelectNO)]
cell.answerArr = answers
} else {
var select = false
if let value = detailItem.value {
select = Bool(value)!
}
let answers = [YHFormChoiceItem(title: "是".local, isSelect: select),YHFormChoiceItem(title: "否".local, isSelect: !select)]
cell.answerArr = answers
}
cell.answerBlock = { cell.answerBlock = {
...@@ -286,7 +322,11 @@ extension YHGCChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -286,7 +322,11 @@ extension YHGCChildPrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .ownCustody { // 抚养权 } else if detailItem.type == .ownCustody { // 抚养权
self.child?.setOwnCustody(option) self.child?.setOwnCustody(option)
} else if detailItem.type == .permanentResidenceStatus { // 永久居留身份
self.child?.setHavePermanentResidenceStatus(option)
} }
self.loadInfo() self.loadInfo()
save() save()
} }
...@@ -507,6 +547,10 @@ extension YHGCChildPrimaryInfoVC { ...@@ -507,6 +547,10 @@ extension YHGCChildPrimaryInfoVC {
return false return false
} }
if child.isHavePermanentResidenceStatus() == nil {
return false
}
if !child.isLiveTother() { // 没有与主申请人同住 if !child.isLiveTother() { // 没有与主申请人同住
if isEmptyString(child.address.country) { if isEmptyString(child.address.country) {
return false return false
......
...@@ -81,8 +81,9 @@ class YHGCSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -81,8 +81,9 @@ class YHGCSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
let item20 = YHFormDetailItem(type:.isLiveTother, value:String(spouse.isLiveTother())) let item20 = YHFormDetailItem(type:.isLiveTother, value:String(spouse.isLiveTother()))
arr2.append(item20) arr2.append(item20)
// let item21 = YHFormDetailItem(type:.permanentResidenceStatus, value: "") let item21 = YHFormDetailItem(type:.permanentResidenceStatus, value: String(spouse.havePermanentResidency))
// arr2.append(item21) item21.tips = "请选择"
arr2.append(item21)
if !spouse.isLiveTother() { // 不同住 才需填写国家/地区 if !spouse.isLiveTother() { // 不同住 才需填写国家/地区
...@@ -212,14 +213,47 @@ extension YHGCSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -212,14 +213,47 @@ extension YHGCSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isShowTips)
var isShowTips = detailItem.isShowTips
if detailItem.type == .permanentResidenceStatus {
isShowTips = ((spouse?.isHavePermanentResidenceStatus()) == nil)
}
cell.setTips(detailItem.tips, isShow: isNeedShowError && isShowTips)
var select = false if detailItem.type == .permanentResidenceStatus { // 永久居留身份
if let value = detailItem.value { var isSelectYES = false
select = Bool(value)! var isSelectNO = false
if let value = detailItem.value, let status = Int(value) {
if status == 2 {
isSelectYES = false
isSelectNO = false
} else if status == 1 {
isSelectYES = true
isSelectNO = false
} else if status == 0 {
isSelectYES = false
isSelectNO = true
}
}
let answers = [YHFormChoiceItem(title: "是".local, isSelect: isSelectYES),YHFormChoiceItem(title: "否".local, isSelect: isSelectNO)]
cell.answerArr = answers
} else {
var select = false
if let value = detailItem.value {
select = Bool(value)!
}
let answers = [YHFormChoiceItem(title: "是".local, isSelect: select),YHFormChoiceItem(title: "否".local, isSelect: !select)]
cell.answerArr = answers
} }
let answers = [YHFormChoiceItem(title: "是".local, isSelect: select),YHFormChoiceItem(title: "否".local, isSelect: !select)]
cell.answerArr = answers
cell.answerBlock = { cell.answerBlock = {
...@@ -251,9 +285,15 @@ extension YHGCSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -251,9 +285,15 @@ extension YHGCSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上 } else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
self.spouse?.setOverSearsOver1Year(option) self.spouse?.setOverSearsOver1Year(option)
self.loadInfo() self.loadInfo()
} else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上 } else if detailItem.type == .isLiveOverSeasMore1Year { // 是否在海外居住满1年及以上
self.spouse?.setOverSearsOver1Year(option) self.spouse?.setOverSearsOver1Year(option)
self.loadInfo() self.loadInfo()
} else if detailItem.type == .permanentResidenceStatus { // 永久居留身份
self.spouse?.setHavePermanentResidenceStatus(option)
self.loadInfo()
} }
save() save()
} }
...@@ -446,6 +486,10 @@ extension YHGCSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -446,6 +486,10 @@ extension YHGCSpousePrimaryInfoVC : UITableViewDelegate, UITableViewDataSource {
return false return false
} }
if spouse.isHavePermanentResidenceStatus() == nil {
return false
}
if !spouse.isLiveTother() { // 没有与主申请人同住 if !spouse.isLiveTother() { // 没有与主申请人同住
if isEmptyString(spouse.address.country) { if isEmptyString(spouse.address.country) {
return false return false
......
...@@ -251,6 +251,7 @@ extension YHGCFamilyMemberInfoListVC { ...@@ -251,6 +251,7 @@ extension YHGCFamilyMemberInfoListVC {
"next":false, "next":false,
"info":["subset_name":"", "info":["subset_name":"",
"not_fill_number":-1, "not_fill_number":-1,
"have_permanent_residency":2,
"follow":0]] "follow":0]]
self.familyRequest.addOrSaveFamilyMember(params: dict) { [weak self] success, error in self.familyRequest.addOrSaveFamilyMember(params: dict) { [weak self] success, error in
......
...@@ -235,7 +235,7 @@ extension YHGCIncomeRecordWorkExperienceViewController { ...@@ -235,7 +235,7 @@ extension YHGCIncomeRecordWorkExperienceViewController {
firstSection.append(.inputMoney("收入金额", "约\(hkdFmt.string(from: NSNumber(value: companyModel.income_money / rate)) ?? "0")港币", rmbFmt.string(from: NSNumber(value: companyModel.income_money)) ?? "0", false, true, true)) firstSection.append(.inputMoney("收入金额", "约\(hkdFmt.string(from: NSNumber(value: companyModel.income_money / rate)) ?? "0")港币", rmbFmt.string(from: NSNumber(value: companyModel.income_money)) ?? "0", false, true, true))
firstSection.append(.inputRemark("注:按1港币≈\(rate)人民币计算,实际金额按递交时入境处给出的汇率为准")) firstSection.append(.inputRemark("注:按1港币≈\(rate)人民币计算,实际金额按递交时入境处给出的汇率为准"))
let secondSection: [TableRow] = [.header("企业信息"), .infoSelect("派国家/地区", nil, "请选择"), .infoSelect("派薪城市", nil, "请选择"), .infoEdit("职位", nil, "请输入"), .infoSelect("入职年月", nil, "请选择"), .infoTillNowSelect("离职年月", nil, "请选择", true), .infoCheckbox("是否可以提供工作证明"), .infoSelect("职业界别", nil, "请选择"), .infoEdit("具体职业界别", nil, "请输入")] let secondSection: [TableRow] = [.header("企业信息"), .infoSelect("派国家/地区", nil, "请选择"), .infoSelect("派薪城市", nil, "请选择"), .infoEdit("职位", nil, "请输入"), .infoSelect("入职年月", nil, "请选择"), .infoTillNowSelect("离职年月", nil, "请选择", true), .infoCheckbox("是否可以提供工作证明"), .infoSelect("职业界别", nil, "请选择"), .infoEdit("具体职业界别", nil, "请输入")]
let tips: ASAttributedString = .init(string: "备注:为了进一步确认您的具体信息,如有相关", .font(.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray)) + .init(string: "工作/收入证明文件", .font(.PFSC_R(ofSize: 13)), .foreground(UIColor.brandMainColor)) + .init(string: ",请优先在列表上传。", .font(.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray)) let tips: ASAttributedString = .init(string: "备注:为了进一步确认您的具体信息,如有相关", .font(.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray)) + .init(string: "工作/收入证明文件", .font(.PFSC_R(ofSize: 13)), .foreground(UIColor.brandMainColor)) + .init(string: ",请优先在列表上传。", .font(.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let thirdSection: [TableRow] = [.header("工作证件(选填)"), .incomeTips(tips), .uploadWorkId("上传工作证件", "去上传")] let thirdSection: [TableRow] = [.header("工作证件(选填)"), .incomeTips(tips), .uploadWorkId("上传工作证件", "去上传")]
...@@ -541,6 +541,36 @@ extension YHGCIncomeRecordWorkExperienceViewController: UITableViewDelegate, UIT ...@@ -541,6 +541,36 @@ extension YHGCIncomeRecordWorkExperienceViewController: UITableViewDelegate, UIT
// //
} }
navigationController?.pushViewController(vc) navigationController?.pushViewController(vc)
} else if case let .infoSelect(title, _, _) = tableRow {
if title == "派薪国家/地区" {
let vc = YHSelectCountryViewController()
vc.backLocationStringController = { (country) in
//self.dataSource?.message = country
//
}
navigationController?.pushViewController(vc)
} else if title == "入职年月" {
let title = "选择入职年月"
let lastIsTaday = true
YHDatePickView.show(type: .yyyymm, title: title, lastIsTaday: lastIsTaday, currentDay: "") { date in
//
}
} else if title == "职业界别" {
YHOtherPickerView.show(type: .position, selectTitle: "") {[weak self] data in
guard let self = self else { return }
// data.title
//
}
}
} else if case let .infoTillNowSelect(title, _, _, _) = tableRow {
if title == "离职年月" {
let title = "选择离职年月"
let lastIsTaday = true
YHDatePickView.show(type: .yyyymm, title: title, lastIsTaday: lastIsTaday, currentDay: "") { date in
//
}
}
} }
} }
} }
......
//
// YHGCIncomeRecordViewModel.swift
// galaxy
//
// Created by alexzzw on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCIncomeRecordViewModel: YHBaseViewModel {
// MARK: - 表单状态
enum FormState {
case viewing
case editing
}
var mainModel: YHGCWorkModel = YHGCWorkModel()
var listModel: [YHWorkItemListModel] = []
var workId: Int = 0
private(set) var formState: FormState = .viewing
// 切换编辑状态
func toggleEditingState() {
switch formState {
case .viewing:
formState = .editing
case .editing:
formState = .viewing
}
}
override init() {
super.init()
}
func requestWorkList(_ orderId: Int, callBackBlock: @escaping (_ success: YHGCWorkModel?, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.gclist
let params: [String: Any] = ["order_id": orderId]
_ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, _ in
// 1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [String: Any], let result = YHGCWorkModel.deserialize(from: dic) else {
callBackBlock(nil, nil)
return
}
self.mainModel = result
self.listModel = result.list ?? []
callBackBlock(self.mainModel, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(nil, error)
}
} failBlock: { err in
callBackBlock(nil, err)
}
}
func requestDeleteWorkExperience(_ id: Int, _ orderId: Int, callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let params: [String: Any] = ["id": id, "order_id": orderId]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.del
_ = YHNetRequest.postRequest(url: strUrl, params: params) { json, _ in
// 1. json字符串 转 对象
if json.code == 200 {
callBackBlock(true, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func requestWorkTimeRemarkWorkExperience(_ orderId: Int, _ isSubmit: Bool = true, callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let params: [String: Any] = ["order_id": orderId,
"has_company_consent": mainModel.has_company_consent,
"consent_work_id": mainModel.consent_work_id,
"has_center_consent": mainModel.has_center_consent,
"why_work_time_overlap": mainModel.why_work_time_overlap,
"has_work_experience": mainModel.has_work_experience,
"is_submit": isSubmit]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.saveAll
_ = YHNetRequest.postRequest(url: strUrl, params: params) { json, _ in
// 1. json字符串 转 对象
if json.code == 200 {
callBackBlock(true, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
// 创建新的是否可用
// func requestCreateNewWork(_ orderId: Int, callBackBlock: @escaping (_ success: Int, _ error: YHErrorModel?) -> Void) {
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.createNewWork
// let params: [String: Any] = ["order_id": orderId]
//
// _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, _ in
// // 1. json字符串 转 对象
// guard let self = self else { return }
// if json.code == 200 {
// guard let dic = json.data?.peel as? [String: Any], let result = YHWorkExperienceDetailModel.deserialize(from: dic) else {
// callBackBlock(0, nil)
// return
// }
// self.workId = result.work_id
// callBackBlock(result.work_id, nil)
// } else {
// let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
// callBackBlock(0, error)
// }
// } failBlock: { err in
// callBackBlock(0, err)
// }
// }
}
//
// YHGCIncomeRecordWorkExperienceViewModel.swift
// galaxy
//
// Created by alexzzw on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCIncomeRecordWorkExperienceViewModel: YHBaseViewModel {
var position: YHGCWorkExperienceModel = YHGCWorkExperienceModel()
override init() {
super.init()
}
func requestWorkPositionDetail(_ workId: Int, _ orderID: Int, callBackBlock: @escaping (_ success: Bool?, _ error: YHErrorModel?) -> Void) {
let param: [String: Any] = ["id": workId, "order_id": orderID]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.gcworkDetail
_ = YHNetRequest.getRequest(url: strUrl, params: param) { [weak self] json, _ in
// 1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [String: Any], let result = YHGCWorkExperienceModel.deserialize(from: dic) else {
callBackBlock(false, nil)
return
}
self.position = result
callBackBlock(true, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func saveWorkPosition(callBackBlock: @escaping (_ success: Bool?, _ error: YHErrorModel?) -> Void) {
let address = ["area": position.location.area,
"country": position.location.country,
"details": position.location.details,
"foreign": position.location.foreign] as [String: Any]
let params: [String: Any] = ["id": position.id,
"order_id": position.order_id,
"company_name": position.company_name,
"entry_time": position.entry_time,
"departure_time": position.departure_time,
"position": position.position,
"has_work_certificate": position.has_work_certificate,
"company_type": position.company_type,
"company_type_other": position.company_type_other,
"location": address]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.gcWorkSave
_ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, _ in
guard let self = self else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [String: Any], let result = YHWorkExperiencePositionModel.deserialize(from: dic) else {
callBackBlock(false, nil)
return
}
callBackBlock(true, nil)
} else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
}
//
// YHGCPreviewAcademicAndProfessionalQualificationViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/2/29.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
*学历/专业资格 预览
*/
class YHGCPreviewAcademicAndProfessionalQualificationViewController: YHPreviewBaseViewController {
private let previewVM : YHGCPreviewViewModel = YHGCPreviewViewModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData()
}
}
private extension YHGCPreviewAcademicAndProfessionalQualificationViewController {
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
// let tmp = 133967 //全数据 可测试
previewVM.getPreviewForAcademicInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
}
} else {
printLog("error : orderID 为空")
}
}
func setupUI() {
self.homeTableView.register(YHPreviewInfoCell.self,forCellReuseIdentifier: YHPreviewInfoCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHGCPreviewAcademicAndProfessionalQualificationViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return previewVM.arrDataForAcademicInfo.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
cell.model = previewVM.arrDataForAcademicInfo[indexPath.row]
return cell
}
}
//
// YHGCPreviewBasiceInformationViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/2/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
*基本资料信息 预览
*/
class YHGCPreviewBasiceInformationViewController: YHPreviewBaseViewController {
private let previewVM : YHGCPreviewViewModel = YHGCPreviewViewModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData()
}
}
private extension YHGCPreviewBasiceInformationViewController {
func setupUI() {
self.homeTableView.register(YHPreviewInfoCell.self,forCellReuseIdentifier: YHPreviewInfoCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
previewVM.getPreviewForBasicInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
}
} else {
printLog("error : orderID 为空")
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHGCPreviewBasiceInformationViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return previewVM.arrDataForBasicInfo.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
cell.model = previewVM.arrDataForBasicInfo[indexPath.row]
return cell
}
}
//
// YHPersonInfoControllerHoldViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/1/29.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHGCPreviewControllerHoldViewController: UIViewController {
var productType : Int = 0 //0-优才 1-高才A 2-高才B 3-高才C
var canScroll : Bool = false {
didSet {
for vc in arrItemVCs {
vc.vcCanScroll = canScroll
}
}
}
var myDefaultNavItemIndex : Int = 0 {
didSet {
self.segmentedView.selectItemAt(index: self.myDefaultNavItemIndex)
}
}
lazy var arrItemTitles:[String] = {
if productType == 1 { // 高才A
return ["主申请人信息","家庭成员信息","工作经验","收入记录", "基本资料"]
}
return ["主申请人信息","家庭成员信息","学历/专业资格","工作经验", "基本资料"]
}()
var arrItemVCs : [YHPreviewBaseViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 55))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource()
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 16)
dataSource.titleSelectedColor = UIColor.labelTextColor2
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleSelectedColor = UIColor.brandMainColor
dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension
dataSource.itemSpacing = 21.5
return dataSource
}()
//分类title 所对应的VC
lazy var listContainerView: JXSegmentedListContainerView! = {
return JXSegmentedListContainerView(dataSource: self, type: .collectionView)
}()
override func viewDidLoad() {
super.viewDidLoad()
if productType == 1 { // 高才A
//主申请人
let vc1 = YHGCPreviewMainApplicantInfoViewController()
arrItemVCs.append(vc1)
//家庭成员信息
let vc2 = YHGCPreviewFamilyMemberViewController()
arrItemVCs.append(vc2)
//工作经验
let vc3 = YHGCPreviewWorkExpViewController()
arrItemVCs.append(vc3)
// 收入记录
let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") as? Int ?? 0
let vc4 = YHGCPreviewIncomeRecordViewController(orderId: orderID)
arrItemVCs.append(vc4)
//基本资料
let vc5 = YHGCPreviewBasiceInformationViewController()
arrItemVCs.append(vc5)
} else { // 高才BC
//主申请人
let vc1 = YHGCPreviewMainApplicantInfoViewController()
arrItemVCs.append(vc1)
//家庭成员信息
let vc2 = YHGCPreviewFamilyMemberViewController()
arrItemVCs.append(vc2)
//学历/专业资格
let vc3 = YHGCPreviewAcademicAndProfessionalQualificationViewController()
arrItemVCs.append(vc3)
//工作经验
let vc4 = YHGCPreviewWorkExpViewController()
arrItemVCs.append(vc4)
// // 收入记录
// let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") as? Int ?? 0
// let vc5 = YHGCPreviewIncomeRecordViewController(orderId: orderID)
// arrItemVCs.append(vc5)
//基本资料
let vc5 = YHGCPreviewBasiceInformationViewController()
arrItemVCs.append(vc5)
}
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self
view.addSubview(segmentedView)
segmentedView.listContainer = listContainerView
view.addSubview(listContainerView)
//分类Title
segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self
//配置指示器
let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16
indicator.indicatorHeight = 4
indicator.indicatorCornerRadius = 2
indicator.verticalOffset = 4
indicator.indicatorColor = UIColor.brandMainColor
segmentedView.indicators = [indicator]
segmentedView.defaultSelectedIndex = self.myDefaultNavItemIndex
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
//处于第一个item的时候,才允许屏幕边缘手势返回
// navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
//离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面
// navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 55)
listContainerView.frame = CGRect(x: 0, y: 55, width: view.bounds.size.width, height: view.bounds.size.height - 55)
segmentedView.backgroundColor = .white
}
}
extension YHGCPreviewControllerHoldViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
}
/// 正在滚动中的回调
///
/// - Parameters:
/// - segmentedView: JXSegmentedView
/// - leftIndex: 正在滚动中,相对位置处于左边的index
/// - rightIndex: 正在滚动中,相对位置处于右边的index
/// - percent: 从左往右计算的百分比
func segmentedView(_ segmentedView: JXSegmentedView, scrollingFrom leftIndex: Int, to rightIndex: Int, percent: CGFloat) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
}
}
extension YHGCPreviewControllerHoldViewController: JXSegmentedListContainerViewDataSource {
func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
return titleDataSource.dataSource.count
}
return 0
}
func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
return arrItemVCs[index] as JXSegmentedListContainerViewListDelegate
}
}
//
// YHGCPreviewIncomeRecordViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCPreviewIncomeRecordViewController: YHPreviewBaseViewController {
enum TableRow {
case infoHeader(_ title: String)
case infoSectionHeader(_ title: String)
case infoTitleAndDetail(_ title: String, _ detail: String, _ cellType: YHResignRoundCellType, _ topMargin: CGFloat, _ bottomMargin: CGFloat)
case infoIncomeType(_ title: String, _ types: [String])
}
private lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无收入记录", kEmptyCommonBgName)
view.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 164)
view.backgroundColor = .clear
view.isHidden = true
return view
}()
private lazy var datas: [TableRow] = []
private lazy var viewModel = YHIncomeRecordViewModel()
private var incomeModel = YHIncomeRecordCompleteModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
requestData()
}
private let orderId: Int
init(orderId: Int) {
self.orderId = orderId
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension YHGCPreviewIncomeRecordViewController {
private func setupUI() {
view.addSubview(noDataView)
noDataView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(-100)
make.width.equalTo(KScreenWidth)
make.height.equalTo(164)
}
homeTableView.snp.remakeConstraints { make in
make.left.right.top.bottom.equalToSuperview()
}
homeTableView.register(YHPreviewInfoHeaderCell.self, forCellReuseIdentifier: YHPreviewInfoHeaderCell.cellReuseIdentifier)
homeTableView.register(YHPreviewInfoNameAndDetailCell.self, forCellReuseIdentifier: YHPreviewInfoNameAndDetailCell.cellReuseIdentifier)
homeTableView.register(YHPreviewInfoSectionHeaderCell.self, forCellReuseIdentifier: YHPreviewInfoSectionHeaderCell.cellReuseIdentifier)
homeTableView.register(YHPreviewInfoIncomeTypeCell.self, forCellReuseIdentifier: YHPreviewInfoIncomeTypeCell.cellReuseIdentifier)
homeTableView.tableHeaderView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 16))
homeTableView.tableFooterView = UIView(frame: CGRect(x: 16, y: 0, width: KScreenWidth, height: 44))
}
private func currencyFormat(_ currencySymbol: String) -> NumberFormatter {
let formatter = NumberFormatter()
formatter.numberStyle = .currency
formatter.currencySymbol = currencySymbol
formatter.maximumFractionDigits = 0
return formatter
}
private func setupData() {
datas.removeAll()
datas.append(.infoHeader("收入情况"))
guard incomeModel.income_over_100 == YHIncomeOver100.true.rawValue else {
if incomeModel.income_over_100 == YHIncomeOver100.false.rawValue {
datas.append(.infoTitleAndDetail("前一年全年收入是否达港币100万元或以上:", "否", .bottom, 16, 16))
noDataView.isHidden = true
homeTableView.reloadData()
} else {
noDataView.isHidden = false
datas = []
homeTableView.reloadData()
}
return
}
datas.append(.infoTitleAndDetail("前一年全年收入是否达港币100万元或以上:", "是", .mid, 16, 8))
let currencyFmt = currencyFormat("")
let rate = incomeModel.rate > 0 ? incomeModel.rate : 0.92
var totalMoney: Double = 0
let listCount = incomeModel.list.count
incomeModel.list.enumerated().forEach { index, model in
datas.append(.infoSectionHeader("收入\(index + 1)"))
datas.append(.infoTitleAndDetail("收入来源公司:", model.company_name, .mid, 8, 8))
let selectedTypes = model.income_type.compactMap {
YHIncomeType(rawValue: $0)
}
datas.append(.infoIncomeType("收入类型:", selectedTypes.map {
$0.nameString()
}))
if selectedTypes.contains(.incomeOfMainland) || selectedTypes.contains(.incomeOfHKCompanies) || selectedTypes.contains(.incomeOfMacauCompanies) || selectedTypes.contains(.incomeOfOtherOverseasCompanies) {
datas.append(.infoTitleAndDetail("公司营业额/人民币 (近一年):", currencyFmt.string(from: NSNumber(value: model.corporate_turnover)) ?? "0", .mid, 8, 8))
}
let isLast = (listCount - 1 == index)
datas.append(.infoTitleAndDetail("收入金额(港元):", currencyFmt.string(from: NSNumber(value: model.income_money / rate)) ?? "0", isLast ? .bottom : .mid, 8, 16))
totalMoney += model.income_money
}
if datas.count >= 2 {
if incomeModel.list.count == 0 {
datas.insert(.infoTitleAndDetail("主申请人总收入(港元):", currencyFmt.string(from: NSNumber(value: totalMoney / rate)) ?? "0", .bottom, 8, 16), at: 2)
} else {
datas.insert(.infoTitleAndDetail("主申请人总收入(港元):", currencyFmt.string(from: NSNumber(value: totalMoney / rate)) ?? "0", .mid, 8, 16), at: 2)
}
}
noDataView.isHidden = true
homeTableView.reloadData()
}
private func requestData() {
viewModel.getIncomeList(orderId: orderId) { [weak self] incomeModel, error in
guard let self = self else {
return
}
guard let incomeModel = incomeModel else {
printLog("YHGCPreviewIncomeRecordViewController: 请求失败")
if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
YHHUD.flash(message: errorMsg)
}
self.noDataView.isHidden = false
self.datas = []
self.homeTableView.reloadData()
return
}
self.incomeModel = incomeModel
self.setupData()
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHGCPreviewIncomeRecordViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datas.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = datas[indexPath.row]
switch tableRow {
case let .infoHeader(title):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHPreviewInfoHeaderCell.cellReuseIdentifier) as? YHPreviewInfoHeaderCell {
cell.setup(title: title)
return cell
}
case let .infoSectionHeader(title):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHPreviewInfoSectionHeaderCell.cellReuseIdentifier) as? YHPreviewInfoSectionHeaderCell {
cell.setup(title: title)
return cell
}
case let .infoTitleAndDetail(title, detail, cellType, top, bottom):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHPreviewInfoNameAndDetailCell.cellReuseIdentifier) as? YHPreviewInfoNameAndDetailCell {
cell.setup(title: title, detail: detail, cellType: cellType, topMargin: top, bottomMargin: bottom)
return cell
}
case let .infoIncomeType(title, docs):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHPreviewInfoIncomeTypeCell.cellReuseIdentifier) as? YHPreviewInfoIncomeTypeCell {
cell.setupCellInfo(title: title, documents: docs)
return cell
}
}
return UITableViewCell()
}
}
//
// YHMainApplicantInfoViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/1/29.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
*主申请人信息 预览
*/
class YHGCPreviewMainApplicantInfoViewController: YHPreviewBaseViewController {
private let previewVM : YHGCPreviewViewModel = YHGCPreviewViewModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
homeTableView.reloadData()
}
}
private extension YHGCPreviewMainApplicantInfoViewController {
func setupUI() {
self.homeTableView.register(YHPreviewInfoCell.self,forCellReuseIdentifier: YHPreviewInfoCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
previewVM.getPreviewForMainApplicationInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
}
} else {
printLog("error : orderID 为空")
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHGCPreviewMainApplicantInfoViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return previewVM.arrDataForMainApplicationInfo.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
cell.model = previewVM.arrDataForMainApplicationInfo[indexPath.row]
return cell
}
}
//
// YHOtherInfoPreviewViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/2/24.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
*其他信息 预览
*/
class YHGCPreviewOtherInformationViewController: YHPreviewBaseViewController {
private let previewVM : YHGCPreviewViewModel = YHGCPreviewViewModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData()
}
}
private extension YHGCPreviewOtherInformationViewController {
func setupUI() {
self.homeTableView.register(YHPreviewInfoCell.self,forCellReuseIdentifier: YHPreviewInfoCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
previewVM.getPreviewForOtherInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
}
} else {
printLog("error : orderID 为空")
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHGCPreviewOtherInformationViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return previewVM.arrDataForOtherInfo.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
cell.model = previewVM.arrDataForOtherInfo[indexPath.row]
return cell
}
}
//
// YHGCPreviewWorkExpViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/3/5.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
*工作经验 预览
*/
class YHGCPreviewWorkExpViewController: YHPreviewBaseViewController {
private let previewVM : YHGCPreviewViewModel = YHGCPreviewViewModel()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
// loadData()
loadData2()
}
}
private extension YHGCPreviewWorkExpViewController {
func setupUI() {
self.homeTableView.register(YHPreviewInfoCell.self,forCellReuseIdentifier: YHPreviewInfoCell.cellReuseIdentifier)
self.homeTableView.reloadData()
}
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
previewVM.getPreviewForWorkExpInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
}
} else {
printLog("error : orderID 为空")
}
}
func loadData2() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
previewVM.getPreviewForWorkExpNewInfo(params: ["order_id" : orderID]) { success, error in
if success == true {
} else {
}
self.homeTableView.reloadData()
}
} else {
printLog("error : orderID 为空")
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHGCPreviewWorkExpViewController {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// return previewVM.arrDataForWorkExpInfo.count
return previewVM.arrDataForWorkExpInfoNew.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHPreviewInfoCell.self)
cell.selectionStyle = .none
// cell.model = previewVM.arrDataForWorkExpInfo[indexPath.row]
if !previewVM.arrDataForWorkExpInfoNew.isEmpty,indexPath.row < previewVM.arrDataForWorkExpInfoNew.count {
cell.model = previewVM.arrDataForWorkExpInfoNew[indexPath.row]
}
return cell
}
}
...@@ -21,6 +21,190 @@ class YHGCWorkExperienceModel: SmartCodable { ...@@ -21,6 +21,190 @@ class YHGCWorkExperienceModel: SmartCodable {
var company_type: String = "" var company_type: String = ""
var company_type_other: String = "" var company_type_other: String = ""
var location: YHAddress = YHAddress() var location: YHAddress = YHAddress()
/// 公司近一年的营业额 对于高A,仅当收入类型包含 6/7/8/10 时,该字段才有效
var turnover: String = ""
/// 高A使用 收入类型 1 工资薪金所得及全年一次性奖金; 2 上市公司股票期权或股权收入; 3 持股公司分红收入; 4 个体工商户/合伙企业/独资企业经营所得收入; 5
/// 股权转让收入; 6 内地公司收入(持股50%及以上); 7 香港公司收入(持股50%及以上); 8 其他境外公司收入(持股50%及以上); 10 澳门公司收入(持股50%及以上)
var typeOfIncome: [Int] = []
/// 高A使用 收入金额
var income: String = ""
required init() { required init() {
} }
} }
/*
/// 工作经历-详情-具体数据
// MARK: - InfoflowWorkDetailData
struct InfoflowWorkDetailData {
/// 行政架构级别
var administrativeLevel: Int?
/// 公司业务性质/范畴/所属行业
var businessNature: String?
/// 工作经验备注
var businessRemark: String?
/// 用人单位介绍
var companyIntroduce: String?
/// 高管在企业管理人数规模
var companyManageTotal: String?
/// 企业人数规模
var companyMemberTotal: String?
/// 公司名称
var companyName: String?
/// 高才使用 职业界别
var companyType: String?
/// 高才使用 其他职业界别
var companyTypeOther: String?
/// 用人单位官网
var companyWebsite: String?
/// 创建来源(rpc.rpc_app.id)
var createFromAppid: Int?
/// 创建时间
var createdAt: String?
/// 用户中心对应模块的id
var customerCenterid: Int?
/// 删除时间
var deletedAt: String?
/// 离职时间
var departureTime: String?
/// 职责性质
var duty: String?
/// 入职时间
var entryTime: String?
/// 高管证明文件
var executivesCertificate: String?
/// 简历/工作总结附件
var file: [InfoflowWorkDetaiFile]?
/// 高才使用 是否能提供工作证明 0 未知 1 是 2 否
var hasWorkCertificate: Int?
/// 工作亮点
var highlights: String?
/// 工作经历id 只在返回工作经历详情时才必需,保存工作经历时非必需
var id: Int?
/// 高A使用 收入金额
var income: String?
/// 雇主所属机构性质
var industry: String?
/// 国际工作经验0没有1有
var internationalWorkExperience: Int?
/// 是否高管? 1是 2否
var isExecutives: Int?
/// 是否名企 0.否 1.是
var isFamousEnterprise: Int?
/// 是否项目详细介绍
var isProjectIntroduction: Int?
/// 是否展示 1是0否 保存工作经历时非必需,不传则默认1
var isShow: Int?
/// 是否合成 1合成 2不合成
var isSynthetic: Int?
var location: InfoflowWorkDetaiLocation?
/// 工作地点 0-国内 1-国外 2-未知
var locationAboard: Int?
/// 是否重要项目负责人 0-未知;1-是;2-否
var masterOfImportantProject: Int?
/// 是否符合清单 1-是;0-否
var matchListing: Int?
/// 是否不需要上传简历/工作总结附件
var notNeedUploadFile: Int?
/// 老CRM的order_child表id
var oldid: Int?
/// 操作人英文
var operatorEnglishName: String?
/// 操作人ID
var operatorid: Int?
/// 操作人中文
var operatorName: String?
/// 订单id
var orderid: Int?
/// 职位
var position: String?
/// 职位水平(1.高级经理人2.中级经理人3.初级经理人4.专业人士5.半专业人士6.其他)
var professionalLevel: Int?
/// 职业水平其他
var professionalOther: String?
/// 工作经历项目
var projects: [InfoflowWorkDetaiProject]?
/// 备注
var remark: String?
/// 工作信息填写进度:0:基本信息 1:工作职责 2:工作亮点 3:简历/总结
var step: Int?
/// 高管任职结束时间
var topManagerEndAt: String?
/// 高管任职开始时间
var topManagerStartAt: String?
/// 公司近一年的营业额 对于高A,仅当收入类型包含 6/7/8/10 时,该字段才有效
var turnover: String?
/// 高A使用 收入类型 1 工资薪金所得及全年一次性奖金; 2 上市公司股票期权或股权收入; 3 持股公司分红收入; 4 个体工商户/合伙企业/独资企业经营所得收入; 5
/// 股权转让收入; 6 内地公司收入(持股50%及以上); 7 香港公司收入(持股50%及以上); 8 其他境外公司收入(持股50%及以上); 10 澳门公司收入(持股50%及以上)
var typeOfIncome: [Int]?
/// 更新来源(rpc.rpc_app.id)
var updateFromAppid: Int?
/// 更新时间
var updatedAt: String?
/// 是否校验数据准确性 0-不检验;1-校验 (只在保存工作经历时才必需,返回工作经历详情数据时非必需)
var verify: Int?
/// 工作职责
var wduty: String?
/// 工作证明文件
var workCertificate: String?
}
/// 工作经历-详情-简历/工作总结附件
// MARK: - InfoflowWorkDetaiFile
struct InfoflowWorkDetaiFile {
/// 文件名
var fileName: String?
/// 文件地址
var fileUrl: String?
/// 上传时间
var uploadedAt: String?
}
/// 工作经历-详情-位置信息
// MARK: - InfoflowWorkDetaiLocation
struct InfoflowWorkDetaiLocation {
/// 省市
var area: [String]?
/// 国家
var country: String?
/// 详细
var details: String?
/// 国外具体地址
var foreign: String?
}
/// 工作经历-详情-项目信息
// MARK: - InfoflowWorkDetaiProject
struct InfoflowWorkDetaiProject {
/// 来源
var createFromAppid: Int?
/// 创建时间
var createdAt: String?
/// 用户中心对应模块的id
var customerCenterid: Int?
/// 删除时间
var deletedAt: String?
/// 项目ID
var id: Int?
/// 订单id
var orderid: Int?
/// 工作项目结束时间
var projectEndTime: String?
/// 工作项目亮点
var projectHighlights: String?
/// 项目名称
var projectName: String?
/// 工作项目开始时间
var projectStartTime: String?
/// 更新来源
var updateFromAppid: Int?
/// 更新时间
var updatedAt: String?
/// 工作经验ID
var workid: Int?
}
*/
...@@ -11,6 +11,7 @@ import SmartCodable ...@@ -11,6 +11,7 @@ import SmartCodable
class YHGCWorkModel: SmartCodable { class YHGCWorkModel: SmartCodable {
var count: Int? var count: Int?
// 高才使用 是否有工作时间重叠期 0-否 1-是
var has_work_time_overlap: Int = 0 var has_work_time_overlap: Int = 0
var has_work_time_empty: Int = 0 var has_work_time_empty: Int = 0
var work_time_overlap_remark: String = "" //重叠期 var work_time_overlap_remark: String = "" //重叠期
......
...@@ -29,6 +29,8 @@ class YHLivePlayerViewController: YHBasePlayerViewController { ...@@ -29,6 +29,8 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
private var timer: DispatchSourceTimer? private var timer: DispatchSourceTimer?
private var isDisappearFromZoom = false private var isDisappearFromZoom = false
private let timeCount: Int = 120 private let timeCount: Int = 120
// 进聊天室尝试次数
private let maxRetryCount = 3
// MARK: - UI Components // MARK: - UI Components
...@@ -347,12 +349,16 @@ class YHLivePlayerViewController: YHBasePlayerViewController { ...@@ -347,12 +349,16 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
// MARK: - Chat Room Methods // MARK: - Chat Room Methods
private func joinChatRoom(roomId: String) { private func joinChatRoom(roomId: String) {
func joinRoom() { func joinRoom(retryCount: Int) {
YHIMHelper.shared.joinChatRoom(roomID: roomId, leaveOtherRooms: true) { [weak self] error in YHIMHelper.shared.joinChatRoom(roomID: roomId, leaveOtherRooms: true) { [weak self] error in
guard let self = self else { return } guard let self = self else { return }
if let error = error, retryCount <= self.maxRetryCount {
if let error = error {
printLog("joinChatRoom: \(error)") printLog("joinChatRoom: \(error)")
DispatchQueue.main.asyncAfter(deadline: .now() + TimeInterval(5 * retryCount)) {
YHIMHelper.shared.registerAndLoginCurrentUser { _ in
joinRoom(retryCount: retryCount + 1)
}
}
} else { } else {
self.loadHistoryMessages(roomId: roomId) self.loadHistoryMessages(roomId: roomId)
} }
...@@ -361,10 +367,10 @@ class YHLivePlayerViewController: YHBasePlayerViewController { ...@@ -361,10 +367,10 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
if !YHIMHelper.shared.isCurrentUserLogin { if !YHIMHelper.shared.isCurrentUserLogin {
YHIMHelper.shared.registerAndLoginCurrentUser { _ in YHIMHelper.shared.registerAndLoginCurrentUser { _ in
joinRoom() joinRoom(retryCount: 0)
} }
} else { } else {
joinRoom() joinRoom(retryCount: 0)
} }
} }
...@@ -442,12 +448,22 @@ class YHLivePlayerViewController: YHBasePlayerViewController { ...@@ -442,12 +448,22 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
DispatchQueue.global().async { DispatchQueue.global().async {
if let url = YHShareManager.shared.createMutilShareUrl(type: 1, param: ["LiveID":"106"]) { if let url = YHShareManager.shared.createMutilShareUrl(type: 1, param: ["LiveID":String(self.liveId)]) {
printLog(url) //for test hjl let tmpT = url.base64Encoded ?? ""//对deepLink使用 base64编码
var oldUrl = liveModel.live_h5_url
if oldUrl.contains("?") {
oldUrl = oldUrl + "&uid=\(YHLoginManager.shared.userModel?.id ?? "0")" + "&fromPlatform=iOS" + "&appDeepLink=\(tmpT)"
} else {
oldUrl = oldUrl + "?uid=\(YHLoginManager.shared.userModel?.id ?? "0")" + "&fromPlatform=iOS" + "&appDeepLink=\(tmpT)"
}
DispatchQueue.main.async {
YHShareAlertView.show(image: liveModel.live_image, title: "@" + liveModel.account, subMessage: liveModel.live_title, linkUrl: oldUrl, isLive: true, fromAiSale: true)
}
return
} }
// printLog(url.absoluteString)
DispatchQueue.main.async { DispatchQueue.main.async {
YHShareAlertView.show(image: liveModel.live_image, title: "@" + liveModel.account, subMessage: liveModel.live_title, linkUrl: liveModel.live_h5_url, isLive: true, fromAiSale: true) YHShareAlertView.show(image: liveModel.live_image, title: "@" + liveModel.account, subMessage: liveModel.live_title, linkUrl: liveModel.live_h5_url, isLive: true, fromAiSale: true)
} }
......
...@@ -366,6 +366,9 @@ class YHPlayerManager: NSObject { ...@@ -366,6 +366,9 @@ class YHPlayerManager: NSObject {
} }
func enterLive(from sourceView: UIView?, playbackInfo: PlaybackInfo) { func enterLive(from sourceView: UIView?, playbackInfo: PlaybackInfo) {
NotificationCenter.default.post(name: YhConstant.YhNotification.closeShareUIInLiveRoomNotifiction, object: nil)
let playerType = determinePlayerType(for: .fullscreen) let playerType = determinePlayerType(for: .fullscreen)
var updatedInfo = playbackInfo var updatedInfo = playbackInfo
updatedInfo.scene = .fullscreen updatedInfo.scene = .fullscreen
......
...@@ -76,7 +76,15 @@ class YHShareAlertView: UIView { ...@@ -76,7 +76,15 @@ class YHShareAlertView: UIView {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
deinit {
NotificationCenter.default.removeObserver(self)
}
func setView() { func setView() {
NotificationCenter.default.addObserver(self, selector: #selector(dismiss), name: YhConstant.YhNotification.closeShareUIInLiveRoomNotifiction, object: nil)
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5) backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = { centerView = {
let view = UIView() let view = UIView()
...@@ -296,7 +304,8 @@ class YHShareAlertView: UIView { ...@@ -296,7 +304,8 @@ class YHShareAlertView: UIView {
@objc func wxClick() { @objc func wxClick() {
if fromAiSale { if fromAiSale {
let content = isLive ? "\(title)正在直播中,快来围观吧~" : "点击查看详情讲解~" // let content = isLive ? "\(title)正在直播中,快来围观吧~" : "点击查看详情讲解~"
let content = isLive ? "分享您一个直播间,快来看看吧~" : "点击查看详情讲解~"
YHShareManager.shared.sendLinkContent(subMessage, content, mainImageView.image ?? UIImage(), link: linkUrl) YHShareManager.shared.sendLinkContent(subMessage, content, mainImageView.image ?? UIImage(), link: linkUrl)
} else { } else {
YHShareManager.shared.sendLinkContent(title, subMessage, mainImageView.image ?? UIImage(), link: linkUrl) YHShareManager.shared.sendLinkContent(title, subMessage, mainImageView.image ?? UIImage(), link: linkUrl)
......
...@@ -284,15 +284,15 @@ extension YHShareManager { ...@@ -284,15 +284,15 @@ extension YHShareManager {
let components = AGCAppLinkingComponents() let components = AGCAppLinkingComponents()
//通过urlPrefix属性设置为申请链接前缀中的链接前缀 //通过urlPrefix属性设置为申请链接前缀中的链接前缀
components.uriPrefix = "https://yinheapp.drcn.agconnect.link" components.uriPrefix = YhConstant.DeepLink.urlPreUrlFix
//通过deepLink属性设置深度链接地址 //通过deepLink属性设置深度链接地址
var linkUrl = YhConstant.DeepLink.url + "?" + "type=\(type)" var linkUrl = YhConstant.DeepLink.url + "?" + "type=\(type)"
let arrKey = param.keys let arrKey = param.keys
for (_,item) in arrKey.enumerated() { for (_,item) in arrKey.enumerated() {
if let value = param[item],!value.isEmpty,let value2 = YHURLEncodeHelper.urlEncodedString(value) { if let value = param[item],!value.isEmpty {
linkUrl = linkUrl + "&" + item + "=" + value2 linkUrl = linkUrl + "&" + item + "=" + value
} }
} }
...@@ -300,7 +300,7 @@ extension YHShareManager { ...@@ -300,7 +300,7 @@ extension YHShareManager {
components.deepLink = linkUrl components.deepLink = linkUrl
components.iosBundleId = Bundle.main.bundleIdentifier components.iosBundleId = Bundle.main.bundleIdentifier
components.androidDeepLink = linkUrl//安卓平台调用不过 所以需要单独写出来 components.androidDeepLink = linkUrl //安卓平台调用不过 所以需要单独写出来
components.androidPackageName = "com.galaxy.galaxyandroid" components.androidPackageName = "com.galaxy.galaxyandroid"
let url = components.buildLongLink() let url = components.buildLongLink()
......
...@@ -193,18 +193,6 @@ func configTabBarController() -> YHTabBarViewController { ...@@ -193,18 +193,6 @@ func configTabBarController() -> YHTabBarViewController {
} }
return false return false
} }
tabBarController.didHijackHandler = {
tabBarController, viewController, index in
if index == ai_tabIndex {
if !YHLoginManager.shared.isLogin() {
YHOneKeyLoginManager.shared.oneKeyLogin()
return
}
let vc = YHAITabViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
v0.tabBarItem = ESTabBarItem.init(YHHomeLottieAnimateContentView(),title: "首页", image: UIImage(named: "home"), selectedImage: UIImage(named: "home_1")) v0.tabBarItem = ESTabBarItem.init(YHHomeLottieAnimateContentView(),title: "首页", image: UIImage(named: "home"), selectedImage: UIImage(named: "home_1"))
...@@ -239,6 +227,7 @@ extension YhConstant { ...@@ -239,6 +227,7 @@ extension YhConstant {
//DeepLink 常量 //DeepLink 常量
struct DeepLink { struct DeepLink {
static let urlPreUrlFix = "https://yinheapp.drcn.agconnect.link"
static let url = "yinheapp://hkdiy-h5.galaxy-immi.com/galaxyapp" static let url = "yinheapp://hkdiy-h5.galaxy-immi.com/galaxyapp"
static let compareUrl = "yinheapp://hkdiy-h5.galaxy-immi.com/galaxyapp?type=" static let compareUrl = "yinheapp://hkdiy-h5.galaxy-immi.com/galaxyapp?type="
...@@ -414,5 +403,8 @@ extension YhConstant { ...@@ -414,5 +403,8 @@ extension YhConstant {
public static let backToHomeNotification = Notification.Name(rawValue: "com.yinhe.backToHomeNotification") public static let backToHomeNotification = Notification.Name(rawValue: "com.yinhe.backToHomeNotification")
// 切换到AI对话tab // 切换到AI对话tab
public static let didSwitchToAIChatNotification = Notification.Name(rawValue: "com.yinhe.switchToAIChat") public static let didSwitchToAIChatNotification = Notification.Name(rawValue: "com.yinhe.switchToAIChat")
//关闭直播间弹出的分享界面
public static let closeShareUIInLiveRoomNotifiction = Notification.Name(rawValue: "com.yinhe.app.close.share.ui")
} }
} }
...@@ -217,6 +217,15 @@ class YHAllApiName { ...@@ -217,6 +217,15 @@ class YHAllApiName {
static let updateBasicInfoApi = "infoflow/basics/update_basics" static let updateBasicInfoApi = "infoflow/basics/update_basics"
} }
//Basics
struct GCBasics {
//获取 基本资料信息
static let basicInfoApi = "super-app/basic/gc-information"
//保存基本资料信息
static let updateBasicInfoApi = "super-app/basic/gc-information/update"
}
struct OrderInformation { struct OrderInformation {
//主申请人获取信息 //主申请人获取信息
static let getInformation = "infoflow/order-information/get_information" static let getInformation = "infoflow/order-information/get_information"
...@@ -723,4 +732,9 @@ class YHAllApiName { ...@@ -723,4 +732,9 @@ class YHAllApiName {
static let createMessage = "super-app/ai/agent/chat-create-message" static let createMessage = "super-app/ai/agent/chat-create-message"
} }
//数据收集
struct DataCollection {
static let shareApi = "infoflow/article/share"
}
} }
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "待完善清单-头图背景@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "待完善清单-头图背景@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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