Commit 1334471c authored by Steven杜宇's avatar Steven杜宇

Merge branch 'HIGH' into 'develop'

High

See merge request !11
parents b83e48b8 e42167d3
...@@ -34,7 +34,7 @@ platform :ios do ...@@ -34,7 +34,7 @@ platform :ios do
main_fix = "main-fix" main_fix = "main-fix"
jiaofei = "jiaofei" jiaofei = "jiaofei"
plan = "4.25-1" plan = "4.25-1"
push = "push" push = "HIGH"
#打包正使用的分支 #打包正使用的分支
myPack_branch = push myPack_branch = push
......
...@@ -1275,6 +1275,7 @@ ...@@ -1275,6 +1275,7 @@
04E507D62D6EE856005F758B /* YHUserLevelAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */; }; 04E507D62D6EE856005F758B /* YHUserLevelAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */; };
04EA376D2BEA06EF00DBAF64 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376C2BEA06EF00DBAF64 /* WebKit.framework */; }; 04EA376D2BEA06EF00DBAF64 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376C2BEA06EF00DBAF64 /* WebKit.framework */; };
04EA376F2BEA071600DBAF64 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376E2BEA070500DBAF64 /* libc++.tbd */; }; 04EA376F2BEA071600DBAF64 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 04EA376E2BEA070500DBAF64 /* libc++.tbd */; };
04F1924D2DE0125B004BDAAC /* YHNewsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F1924C2DE0125B004BDAAC /* YHNewsModel.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; }; 6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A5573EE92B317C0100D98EC0 /* galaxyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EE82B317C0100D98EC0 /* galaxyTests.swift */; }; A5573EE92B317C0100D98EC0 /* galaxyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EE82B317C0100D98EC0 /* galaxyTests.swift */; };
A5573EF32B317C0100D98EC0 /* galaxyUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EF22B317C0100D98EC0 /* galaxyUITests.swift */; }; A5573EF32B317C0100D98EC0 /* galaxyUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573EF22B317C0100D98EC0 /* galaxyUITests.swift */; };
...@@ -2587,6 +2588,7 @@ ...@@ -2587,6 +2588,7 @@
04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserLevelAlertView.swift; sourceTree = "<group>"; }; 04E507D52D6EE856005F758B /* YHUserLevelAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserLevelAlertView.swift; sourceTree = "<group>"; };
04EA376C2BEA06EF00DBAF64 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 04EA376C2BEA06EF00DBAF64 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
04EA376E2BEA070500DBAF64 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 04EA376E2BEA070500DBAF64 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
04F1924C2DE0125B004BDAAC /* YHNewsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNewsModel.swift; sourceTree = "<group>"; };
04FA8B2D2C084C7E00ABE43F /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = ATAuthSDK.bundle; path = "galaxy/Classes/Modules/AutoLogin(一键登录)/framework/ATAuthSDK_D.framework/ATAuthSDK.bundle"; sourceTree = "<group>"; }; 04FA8B2D2C084C7E00ABE43F /* ATAuthSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = ATAuthSDK.bundle; path = "galaxy/Classes/Modules/AutoLogin(一键登录)/framework/ATAuthSDK_D.framework/ATAuthSDK.bundle"; sourceTree = "<group>"; };
19B28612265782F9DC1BE0B0 /* Pods-galaxy.testenv.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.testenv.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.testenv.xcconfig"; sourceTree = "<group>"; }; 19B28612265782F9DC1BE0B0 /* Pods-galaxy.testenv.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.testenv.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.testenv.xcconfig"; sourceTree = "<group>"; };
58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; }; 58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; };
...@@ -5789,6 +5791,7 @@ ...@@ -5789,6 +5791,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
045C0EC62D12CA5E00BD2DC0 /* YHMsgListModel.swift */, 045C0EC62D12CA5E00BD2DC0 /* YHMsgListModel.swift */,
04F1924C2DE0125B004BDAAC /* YHNewsModel.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -7915,6 +7918,7 @@ ...@@ -7915,6 +7918,7 @@
045C121F2D12CA5F00BD2DC0 /* YHCertificateTemplateSheetView.swift in Sources */, 045C121F2D12CA5F00BD2DC0 /* YHCertificateTemplateSheetView.swift in Sources */,
045C12202D12CA5F00BD2DC0 /* YHResignMaterialListVC.swift in Sources */, 045C12202D12CA5F00BD2DC0 /* YHResignMaterialListVC.swift in Sources */,
045C12212D12CA5F00BD2DC0 /* YHResignUploadTravelPassportTableViewCell.swift in Sources */, 045C12212D12CA5F00BD2DC0 /* YHResignUploadTravelPassportTableViewCell.swift in Sources */,
04F1924D2DE0125B004BDAAC /* YHNewsModel.swift in Sources */,
045C12222D12CA5F00BD2DC0 /* YHResignCertificatePassportTableViewCell.swift in Sources */, 045C12222D12CA5F00BD2DC0 /* YHResignCertificatePassportTableViewCell.swift in Sources */,
045C12232D12CA5F00BD2DC0 /* YHIncomeRecordItemCell.swift in Sources */, 045C12232D12CA5F00BD2DC0 /* YHIncomeRecordItemCell.swift in Sources */,
045C12242D12CA5F00BD2DC0 /* YHAdopterResidentViewController.swift in Sources */, 045C12242D12CA5F00BD2DC0 /* YHAdopterResidentViewController.swift in Sources */,
...@@ -8494,7 +8498,7 @@ ...@@ -8494,7 +8498,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8521,7 +8525,7 @@ ...@@ -8521,7 +8525,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.2.3; MARKETING_VERSION = 2.2.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -8642,7 +8646,7 @@ ...@@ -8642,7 +8646,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8669,7 +8673,7 @@ ...@@ -8669,7 +8673,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.2.3; MARKETING_VERSION = 2.2.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -8852,7 +8856,7 @@ ...@@ -8852,7 +8856,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8879,7 +8883,7 @@ ...@@ -8879,7 +8883,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.2.3; MARKETING_VERSION = 2.2.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -8902,7 +8906,7 @@ ...@@ -8902,7 +8906,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements; CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = RXHYW88XR7; DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -8929,7 +8933,7 @@ ...@@ -8929,7 +8933,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.2.3; MARKETING_VERSION = 2.2.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
......
...@@ -22,6 +22,8 @@ import HyphenateChat ...@@ -22,6 +22,8 @@ import HyphenateChat
@main @main
class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
private lazy var liveViewModel = YHLiveSalesViewModel() private lazy var liveViewModel = YHLiveSalesViewModel()
let viewModel = YHMsgViewModel()
var window: UIWindow? var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
......
...@@ -33,7 +33,7 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -33,7 +33,7 @@ extension AppDelegate: JPUSHRegisterDelegate {
#if DEBUG #if DEBUG
let isProduction = false let isProduction = false
#elseif TESTENV #elseif TESTENV
let isProduction = true let isProduction = false
#else #else
let isProduction = true let isProduction = true
#endif #endif
...@@ -118,6 +118,21 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -118,6 +118,21 @@ extension AppDelegate: JPUSHRegisterDelegate {
YHLoginManager.shared.needJumpToMsgTabFlag = true YHLoginManager.shared.needJumpToMsgTabFlag = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: { DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
goToMessagePage() goToMessagePage()
if let msgType = userInfo["msg_type"] as? Int, msgType == YHMessageType.article.rawValue {
let model = YHNewsModel()
let taskId = userInfo["task_id"] as? Int ?? 0
model.article_id = userInfo["article_id"] as? Int ?? 0
model.news_type = userInfo["news_type"] as? Int ?? 0
model.cover_img = userInfo["cover_img"] as? String ?? ""
model.url = userInfo["url"] as? String ?? ""
model.media_url = userInfo["media_url"] as? String ?? ""
model.media_transcode_url = userInfo["media_transcode_url"] as? String ?? ""
printLog("DDDDY: \(model.id)")
yh_newsList.enterDetail(model)
self.viewModel.readMessage(taskId: taskId) { _, _ in
}
}
}) })
} }
......
...@@ -12,6 +12,7 @@ import IQKeyboardManagerSwift ...@@ -12,6 +12,7 @@ import IQKeyboardManagerSwift
class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate { class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate {
var viewDidAppear: Bool = false
var defaltIndex: Int = 0 var defaltIndex: Int = 0
let viewModel = YHAIViewModel() let viewModel = YHAIViewModel()
...@@ -110,34 +111,27 @@ class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate { ...@@ -110,34 +111,27 @@ class YHAITabViewController: YHBaseViewController, UIGestureRecognizerDelegate {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
// 处于第一个item的时候,才允许屏幕边缘手势返回
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0)
self.gk_interactivePopDisabled = (self.segmentedView.selectedIndex != 0)
self.gk_fullScreenPopDisabled = (self.segmentedView.selectedIndex != 0)
requestList() requestList()
} }
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated) super.viewDidAppear(animated)
viewDidAppear = true
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0) self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0)
self.gk_interactivePopDisabled = (self.segmentedView.selectedIndex != 0)
self.gk_fullScreenPopDisabled = (self.segmentedView.selectedIndex != 0)
} }
override func viewWillDisappear(_ animated: Bool) { override func viewDidDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewDidDisappear(animated)
viewDidAppear = false
// 离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面 // 离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
self.gk_interactivePopDisabled = false
self.gk_fullScreenPopDisabled = false
} }
override func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { override func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if gestureRecognizer == navigationController?.interactivePopGestureRecognizer {
if self.segmentedView.selectedIndex == 0 { if viewDidAppear {
self.gk_interactivePopDisabled = false return self.segmentedView.selectedIndex == 0
self.gk_fullScreenPopDisabled = false }
return true
} }
return false return false
} }
...@@ -281,8 +275,6 @@ extension YHAITabViewController: JXSegmentedViewDelegate { ...@@ -281,8 +275,6 @@ extension YHAITabViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) { func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0) self.navigationController?.interactivePopGestureRecognizer?.isEnabled = (self.segmentedView.selectedIndex == 0)
self.gk_interactivePopDisabled = (self.segmentedView.selectedIndex != 0)
self.gk_fullScreenPopDisabled = (self.segmentedView.selectedIndex != 0)
if segmentedView.selectedIndex == 1 { // AI对话 if segmentedView.selectedIndex == 1 { // AI对话
bgImgView.isHidden = false bgImgView.isHidden = false
......
...@@ -49,6 +49,9 @@ class YHOrderTipsItemView: UIView { ...@@ -49,6 +49,9 @@ class YHOrderTipsItemView: UIView {
} else if msg.type == YHMessageType.business.rawValue { } else if msg.type == YHMessageType.business.rawValue {
return "银河商务" return "银河商务"
} else if msg.type == YHMessageType.article.rawValue {
return "银河资讯"
} else { } else {
return "--" return "--"
} }
......
...@@ -341,8 +341,12 @@ extension YHServiceCenterViewController { ...@@ -341,8 +341,12 @@ extension YHServiceCenterViewController {
self.homeTableView.tableHeaderView = UIView() self.homeTableView.tableHeaderView = UIView()
if self.model.product_type == 1 { if self.model.product_type == 1 {
self.titleLabel.setTitle("优才审批阶段", for: .normal) self.titleLabel.setTitle("优才审批阶段", for: .normal)
} else { } else if self.model.product_type == 2 {
self.titleLabel.setTitle("高才审批阶段", for: .normal) self.titleLabel.setTitle("高才审批阶段", for: .normal)
} else if self.model.product_type == 4 {
self.titleLabel.setTitle("专才审批阶段", for: .normal)
} else if self.model.product_type == 5 {
self.titleLabel.setTitle("留学审批阶段", for: .normal)
} }
self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal) self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal)
} }
...@@ -362,8 +366,12 @@ extension YHServiceCenterViewController { ...@@ -362,8 +366,12 @@ extension YHServiceCenterViewController {
self.headView.dataSource = self.serviceCenterMainReqVM.mainModel.renewalSection.list self.headView.dataSource = self.serviceCenterMainReqVM.mainModel.renewalSection.list
if self.model.product_type == 1 { if self.model.product_type == 1 {
self.titleLabel.setTitle("优才续签阶段", for: .normal) self.titleLabel.setTitle("优才续签阶段", for: .normal)
} else { } else if self.model.product_type == 2 {
self.titleLabel.setTitle("高才续签阶段", for: .normal) self.titleLabel.setTitle("高才续签阶段", for: .normal)
} else if self.model.product_type == 4 {
self.titleLabel.setTitle("专才续签阶段", for: .normal)
} else if self.model.product_type == 5 {
self.titleLabel.setTitle("留学续签阶段", for: .normal)
} }
self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal) self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal)
self.isCanSelectStep = true self.isCanSelectStep = true
...@@ -413,8 +421,12 @@ extension YHServiceCenterViewController { ...@@ -413,8 +421,12 @@ extension YHServiceCenterViewController {
self.homeTableView.tableHeaderView = UIView() self.homeTableView.tableHeaderView = UIView()
if self.model.product_type == 1 { if self.model.product_type == 1 {
self.titleLabel.setTitle("优才申请阶段", for: .normal) self.titleLabel.setTitle("优才申请阶段", for: .normal)
} else { } else if self.model.product_type == 2 {
self.titleLabel.setTitle("高才申请阶段", for: .normal) self.titleLabel.setTitle("高才申请阶段", for: .normal)
} else if self.model.product_type == 4 {
self.titleLabel.setTitle("专才申请阶段", for: .normal)
} else if self.model.product_type == 5 {
self.titleLabel.setTitle("留学申请阶段", for: .normal)
} }
self.titleLabel.setImage(UIImage(named: ""), for: .normal) self.titleLabel.setImage(UIImage(named: ""), for: .normal)
} }
...@@ -423,8 +435,12 @@ extension YHServiceCenterViewController { ...@@ -423,8 +435,12 @@ extension YHServiceCenterViewController {
self.homeTableView.tableHeaderView = UIView() self.homeTableView.tableHeaderView = UIView()
if self.model.product_type == 1 { if self.model.product_type == 1 {
self.titleLabel.setTitle("优才审批阶段", for: .normal) self.titleLabel.setTitle("优才审批阶段", for: .normal)
} else { } else if self.model.product_type == 2 {
self.titleLabel.setTitle("高才审批阶段", for: .normal) self.titleLabel.setTitle("高才审批阶段", for: .normal)
} else if self.model.product_type == 4 {
self.titleLabel.setTitle("专才审批阶段", for: .normal)
} else if self.model.product_type == 5 {
self.titleLabel.setTitle("留学审批阶段", for: .normal)
} }
if isCanSelectStep { if isCanSelectStep {
self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal) self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal)
...@@ -448,8 +464,12 @@ extension YHServiceCenterViewController { ...@@ -448,8 +464,12 @@ extension YHServiceCenterViewController {
self.headView.dataSource = self.serviceCenterMainReqVM.mainModel.renewalSection.list self.headView.dataSource = self.serviceCenterMainReqVM.mainModel.renewalSection.list
if self.model.product_type == 1 { if self.model.product_type == 1 {
self.titleLabel.setTitle("优才续签阶段", for: .normal) self.titleLabel.setTitle("优才续签阶段", for: .normal)
} else { } else if self.model.product_type == 2 {
self.titleLabel.setTitle("高才续签阶段", for: .normal) self.titleLabel.setTitle("高才续签阶段", for: .normal)
} else if self.model.product_type == 4 {
self.titleLabel.setTitle("专才续签阶段", for: .normal)
} else if self.model.product_type == 5 {
self.titleLabel.setTitle("留学续签阶段", for: .normal)
} }
self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal) self.titleLabel.setImage(UIImage(named: "service_center_select_step"), for: .normal)
} }
......
...@@ -63,6 +63,8 @@ class YHServiceOrderListViewController: YHBaseViewController { ...@@ -63,6 +63,8 @@ class YHServiceOrderListViewController: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name: Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name: Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
} }
// swiftlint:disable function_body_length
// swiftlint:disable cyclomatic_complexity
class func jumpToMessageController(type: Int, orderId: Int, _ stepId: Int = 0, productType: Int = 0) { class func jumpToMessageController(type: Int, orderId: Int, _ stepId: Int = 0, productType: Int = 0) {
if type == 1 { if type == 1 {
// 我的证件 // 我的证件
...@@ -118,6 +120,7 @@ class YHServiceOrderListViewController: YHBaseViewController { ...@@ -118,6 +120,7 @@ class YHServiceOrderListViewController: YHBaseViewController {
let vc = YHPrincipleWaitResultViewController() let vc = YHPrincipleWaitResultViewController()
vc.status = type vc.status = type
vc.orderId = orderId vc.orderId = orderId
vc.orderType = 1
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 13 { } else if type == 13 {
...@@ -129,6 +132,7 @@ class YHServiceOrderListViewController: YHBaseViewController { ...@@ -129,6 +132,7 @@ class YHServiceOrderListViewController: YHBaseViewController {
} else if type == 15 { } else if type == 15 {
// 正式批已获批~ // 正式批已获批~
let vc = YHOfficialApprovalResultVC() let vc = YHOfficialApprovalResultVC()
vc.orderType = 1
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 21 { } else if type == 21 {
// 新增受养人 // 新增受养人
...@@ -204,6 +208,296 @@ class YHServiceOrderListViewController: YHBaseViewController { ...@@ -204,6 +208,296 @@ class YHServiceOrderListViewController: YHBaseViewController {
let vc = YHUploadCertificateVC() let vc = YHUploadCertificateVC()
vc.orderId = orderId vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 211 || type == 212 || type == 214 {
// 11 原则批等待结果
// 12 原则批待补件
// 14 原则批未获批准
let vc = YHPrincipleWaitResultViewController()
vc.status = type % 100
vc.orderId = orderId
vc.orderType = 2
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 213 {
// 原则批已获批~
let vc = YHPrincipleApprovedResultVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 215 {
// 正式批已获批~
let vc = YHOfficialApprovalResultVC()
vc.orderType = 2
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 221 {
// 新增受养人
let vc = YHAddAdoptersViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 222 {
// 家庭信息确认
let vc = YHFamilyInfoConfirmViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 223 {
// 电子签字缴费
let vc = YHVisaPaymentVC()
vc.orderID = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 224 {
// 赴港时间预约
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 225 {
// 赴港行程指引
YHHUD.show(.progress(message: "加载中..."))
let appointViewModel = YHCerAppointViewModel()
appointViewModel.getIsNeedGoToHK(orderId: orderId) {
// needGoHK 1需要赴港 0不需要 2没有选择
// reservationToHK 0 没有预约 1 已经预約
needGoHK, reservationToHK in
YHHUD.hide()
var isNeedAppoint = true
if needGoHK == 1, reservationToHK == 1 { // 选择赴港且已预约
isNeedAppoint = false
} else if needGoHK == 0 { // 赴港选择否
isNeedAppoint = false
}
if isNeedAppoint {
// 预约弹窗
let alert = YHDisappointHKAlertView.alertView()
alert.confirmBlock = {
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
}
alert.show()
} else { // 已预约过直接进入赴港行程指引
if let token = YHLoginManager.shared.userModel?.token, token.count > 5 {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/tohkList"
url = url + "?paramO=\(orderId)" + "&param=" + YHLoginManager.shared.h5Token
url = url + "&app_platform=ios" + "&app_version=" + UIDevice.appVersion()
printLog("UURL: \(url)")
let vc = YHH5WebViewVC()
vc.title = "赴港行程指引"
vc.url = url
vc.isFullScreenFlag = false
vc.navTitle = "赴港行程指引"
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
}
} else if type == 226 {
// 旅行证件准备
let vc = YHTravelDocsPreparationListViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 227 {
// 上传过关证件
let vc = YHUploadCertificateVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 311 || type == 312 || type == 314 {
// 11 原则批等待结果
// 12 原则批待补件
// 14 原则批未获批准
let vc = YHPrincipleWaitResultViewController()
vc.status = type % 100
vc.orderId = orderId
vc.orderType = 3
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 313 {
// 原则批已获批~
let vc = YHPrincipleApprovedResultVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 315 {
// 正式批已获批~
let vc = YHOfficialApprovalResultVC()
vc.orderType = 3
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 321 {
// 新增受养人
let vc = YHAddAdoptersViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 322 {
// 家庭信息确认
let vc = YHFamilyInfoConfirmViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 323 {
// 电子签字缴费
let vc = YHVisaPaymentVC()
vc.orderID = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 324 {
// 赴港时间预约
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 325 {
// 赴港行程指引
YHHUD.show(.progress(message: "加载中..."))
let appointViewModel = YHCerAppointViewModel()
appointViewModel.getIsNeedGoToHK(orderId: orderId) {
// needGoHK 1需要赴港 0不需要 2没有选择
// reservationToHK 0 没有预约 1 已经预約
needGoHK, reservationToHK in
YHHUD.hide()
var isNeedAppoint = true
if needGoHK == 1, reservationToHK == 1 { // 选择赴港且已预约
isNeedAppoint = false
} else if needGoHK == 0 { // 赴港选择否
isNeedAppoint = false
}
if isNeedAppoint {
// 预约弹窗
let alert = YHDisappointHKAlertView.alertView()
alert.confirmBlock = {
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
}
alert.show()
} else { // 已预约过直接进入赴港行程指引
if let token = YHLoginManager.shared.userModel?.token, token.count > 5 {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/tohkList"
url = url + "?paramO=\(orderId)" + "&param=" + YHLoginManager.shared.h5Token
url = url + "&app_platform=ios" + "&app_version=" + UIDevice.appVersion()
printLog("UURL: \(url)")
let vc = YHH5WebViewVC()
vc.title = "赴港行程指引"
vc.url = url
vc.isFullScreenFlag = false
vc.navTitle = "赴港行程指引"
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
}
} else if type == 326 {
// 旅行证件准备
let vc = YHTravelDocsPreparationListViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 327 {
// 上传过关证件
let vc = YHUploadCertificateVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 411 || type == 412 || type == 414 {
// 11 原则批等待结果
// 12 原则批待补件
// 14 原则批未获批准
let vc = YHPrincipleWaitResultViewController()
vc.status = type % 100
vc.orderId = orderId
vc.orderType = 4
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 413 {
// 原则批已获批~
let vc = YHPrincipleApprovedResultVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 415 {
// 正式批已获批~
let vc = YHOfficialApprovalResultVC()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 421 {
// 新增受养人
let vc = YHAddAdoptersViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 422 {
// 家庭信息确认
let vc = YHFamilyInfoConfirmViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 423 {
// 电子签字缴费
let vc = YHVisaPaymentVC()
vc.orderID = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 424 {
// 赴港时间预约
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 425 {
// 赴港行程指引
YHHUD.show(.progress(message: "加载中..."))
let appointViewModel = YHCerAppointViewModel()
appointViewModel.getIsNeedGoToHK(orderId: orderId) {
// needGoHK 1需要赴港 0不需要 2没有选择
// reservationToHK 0 没有预约 1 已经预約
needGoHK, reservationToHK in
YHHUD.hide()
var isNeedAppoint = true
if needGoHK == 1, reservationToHK == 1 { // 选择赴港且已预约
isNeedAppoint = false
} else if needGoHK == 0 { // 赴港选择否
isNeedAppoint = false
}
if isNeedAppoint {
// 预约弹窗
let alert = YHDisappointHKAlertView.alertView()
alert.confirmBlock = {
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
}
alert.show()
} else { // 已预约过直接进入赴港行程指引
if let token = YHLoginManager.shared.userModel?.token, token.count > 5 {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/tohkList"
url = url + "?paramO=\(orderId)" + "&param=" + YHLoginManager.shared.h5Token
url = url + "&app_platform=ios" + "&app_version=" + UIDevice.appVersion()
printLog("UURL: \(url)")
let vc = YHH5WebViewVC()
vc.title = "赴港行程指引"
vc.url = url
vc.isFullScreenFlag = false
vc.navTitle = "赴港行程指引"
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
}
} else if type == 426 {
// 旅行证件准备
let vc = YHTravelDocsPreparationListViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 427 {
// 上传过关证件
let vc = YHUploadCertificateVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 31 { } else if type == 31 {
// 续签资料管理 // 续签资料管理
let vc = YHResinMaterialManageContainerVC() let vc = YHResinMaterialManageContainerVC()
...@@ -350,6 +644,8 @@ class YHServiceOrderListViewController: YHBaseViewController { ...@@ -350,6 +644,8 @@ class YHServiceOrderListViewController: YHBaseViewController {
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} }
} }
// swiftlint:enable function_body_length
// swiftlint:enable cyclomatic_complexity
} }
extension YHServiceOrderListViewController { extension YHServiceOrderListViewController {
...@@ -561,7 +857,7 @@ extension YHServiceOrderListViewController: UITableViewDelegate, UITableViewData ...@@ -561,7 +857,7 @@ extension YHServiceOrderListViewController: UITableViewDelegate, UITableViewData
let arr = self.arrDataForSeviceCenterProgress let arr = self.arrDataForSeviceCenterProgress
if 0 <= indexPath.row, indexPath.row < arr.count { if 0 <= indexPath.row, indexPath.row < arr.count {
let model = arr[indexPath.row] let model = arr[indexPath.row]
if model.type == 27 || model.type == 32 || model.type == 31 || model.type == 34 || model.type == 42 || model.type == 41 || model.type == 44 { if model.type == 27 || model.type == 227 || model.type == 327 || model.type == 427 || model.type == 32 || model.type == 31 || model.type == 34 || model.type == 42 || model.type == 41 || model.type == 44 {
return 162 return 162
} }
return 144 return 144
......
...@@ -18,7 +18,7 @@ struct YHContactItemModel: SmartCodable { ...@@ -18,7 +18,7 @@ struct YHContactItemModel: SmartCodable {
var type: String = "" var type: String = ""
var mobile: String = "" var mobile: String = ""
var status: Int = 0 var status: Int = 0
var product_type: Int = 0 // 1-优才 2-高才 var product_type: Int = 0 // 1-优才 2-高才 3-小项目 4-专才 5-留学
var isOther: Bool = false // 是否协作单 var isOther: Bool = false // 是否协作单
var service_name: String = "" var service_name: String = ""
} }
...@@ -154,6 +154,149 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -154,6 +154,149 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)" messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
} }
if model.type == 222 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
}
if model.type == 221 {
titleLabel.text = "新增受养人"
messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明"
progress.isHidden = true
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 224 {
titleLabel.text = "赴港办证预约"
messageLabel.text = "请填写意向办证时间,银河代预约~"
}
if model.type == 223 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
}
if model.type == 225 {
titleLabel.text = "赴港行程指引"
messageLabel.text = "请根据指引清单提前规划赴港行程"
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 226 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
}
if model.type == 227 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
}
if model.type == 322 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
}
if model.type == 321 {
titleLabel.text = "新增受养人"
messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明"
progress.isHidden = true
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 324 {
titleLabel.text = "赴港办证预约"
messageLabel.text = "请填写意向办证时间,银河代预约~"
}
if model.type == 323 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
}
if model.type == 325 {
titleLabel.text = "赴港行程指引"
messageLabel.text = "请根据指引清单提前规划赴港行程"
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 326 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
}
if model.type == 327 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
}
if model.type == 422 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
}
if model.type == 421 {
titleLabel.text = "新增受养人"
messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明"
progress.isHidden = true
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 424 {
titleLabel.text = "赴港办证预约"
messageLabel.text = "请填写意向办证时间,银河代预约~"
}
if model.type == 423 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
}
if model.type == 425 {
titleLabel.text = "赴港行程指引"
messageLabel.text = "请根据指引清单提前规划赴港行程"
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 426 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
}
if model.type == 427 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
}
if model.type == 31 { if model.type == 31 {
titleLabel.text = "续签资料管理" titleLabel.text = "续签资料管理"
messageLabel.text = "请根据资料清单上传您的续签证明文件~" messageLabel.text = "请根据资料清单上传您的续签证明文件~"
...@@ -234,109 +377,506 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -234,109 +377,506 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel.text = "请上传&核对续签旅行证件~" messageLabel.text = "请上传&核对续签旅行证件~"
} }
if model.type == 201 { if model.type == 201 {
titleLabel.text = "我的信息" titleLabel.text = "我的信息"
}
if model.type == 202 {
titleLabel.text = "我的方案"
messageLabel.text = "您的专属方案还没生成哦~"
}
if model.type == 203 {
titleLabel.text = "我的证件"
messageLabel.text = "您的证件还没生成哦~"
}
if model.type == 204 {
titleLabel.text = "我的签字"
messageLabel.text = "您的文件还没签字哦~"
}
}
if model.status == 2 {
titleLabel.textColor = UIColor.mainTextColor
buttonLabel.text = "进行中"
buttonLabel.backgroundColor = UIColor.brandMainColor
progressImageView.image = UIImage(named: "service_progress_start")
progress.changeColor(UIColor.brandMainColor)
// 1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
if model.type == 1 {
titleLabel.text = "我的证件"
// messageLabel.text = "恭喜您,证件已全部上传完~"
buttonLabel.text = "去上传"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("证件待上传哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
}
if model.type == 2 {
titleLabel.text = "我的信息"
buttonLabel.text = "去填写"
if model.reject_status == 0 {
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("信息待填写哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
} else {
let a: ASAttributedString = .init("您的信息被", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "驳回"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.failColor))
let aaa: ASAttributedString = .init("了哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "去修改"
}
}
if model.type == 3 {
titleLabel.text = "我的评分"
messageLabel.text = "后端出问题会显示"
}
if model.type == 4 {
titleLabel.text = "我的方案"
messageLabel.text = "后端出问题会显示"
}
if model.type == 5 {
titleLabel.text = "我的签字"
buttonLabel.text = "去签字"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("文件待签字哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
}
if model.type == 6 {
titleLabel.text = "我的文书"
buttonLabel.text = "去确认"
if model.percentage == 66 {
let a: ASAttributedString = .init("您的文书正在", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "审核中"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "请稍候"
buttonLabel.backgroundColor = UIColor.mainTextColor50
} else {
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("文书待返稿哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
}
}
if model.type == 7 {
titleLabel.text = "递交确认"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)项"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("信息确认签署待完成哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "去确认"
}
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
if model.type == 11 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在等待原则批结果~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 12 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在进行原则批补件~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 13 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,原则批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_start")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 14 {
titleLabel.text = "港府获批结果"
messageLabel.text = "很遗憾,您未获批准~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 15 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 22 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
buttonLabel.text = "待确认"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 21 {
titleLabel.text = "新增受养人"
messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明"
buttonLabel.text = "待完善"
progress.isHidden = true
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.textColor = UIColor.mainTextColor50
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 24 {
titleLabel.text = "赴港办证预约"
if model.percentage == 50 {
messageLabel.text = "抢号中~"
} else {
messageLabel.text = "请填写意向办证时间,银河代预约~"
}
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 23 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
buttonLabel.text = "待缴费"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 25 {
titleLabel.text = "赴港行程指引"
messageLabel.text = "请根据指引清单提前规划赴港行程"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 26 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
buttonLabel.text = "去上传"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 27 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
buttonLabel.text = "去上传"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 211 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在等待审批结果~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 212 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在进行补件~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 213 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,原则批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_start")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 214 {
titleLabel.text = "港府获批结果"
messageLabel.text = "很遗憾,您未获批准~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 215 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 222 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
buttonLabel.text = "待确认"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 221 {
titleLabel.text = "新增受养人"
messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明"
buttonLabel.text = "待完善"
progress.isHidden = true
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.textColor = UIColor.mainTextColor50
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 224 {
titleLabel.text = "赴港办证预约"
if model.percentage == 50 {
messageLabel.text = "抢号中~"
} else {
messageLabel.text = "请填写意向办证时间,银河代预约~"
}
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 223 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
buttonLabel.text = "待缴费"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 225 {
titleLabel.text = "赴港行程指引"
messageLabel.text = "请根据指引清单提前规划赴港行程"
buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.mainTextColor50
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
}
}
if model.type == 226 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
buttonLabel.text = "去上传"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 227 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
buttonLabel.text = "去上传"
messageLabel.textColor = UIColor.mainTextColor50
}
if model.type == 311 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在等待审批结果~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 312 {
titleLabel.text = "港府获批结果"
messageLabel.text = "正在进行补件~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_normal")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
}
if model.type == 313 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,原则批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor.brandMainColor)
progressImageView.image = UIImage(named: "service_progress_start")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
} }
if model.type == 202 { if model.type == 314 {
titleLabel.text = "我的方案" titleLabel.text = "港府获批结果"
messageLabel.text = "您的专属方案还没生成哦~" messageLabel.text = "很遗憾,您未获批准~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
} }
if model.type == 203 { if model.type == 315 {
titleLabel.text = "我的证件" titleLabel.text = "港府获批结果"
messageLabel.text = "您的证件还没生成哦~" messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor(hex: 0x55cba0)
messageLabel.textColor = UIColor.mainTextColor50
progress.changeColor(UIColor(hex: 0x55cba0))
progressImageView.image = UIImage(named: "service_progress_end")
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
} }
if model.type == 204 { if model.type == 322 {
titleLabel.text = "我的签字" titleLabel.text = "家庭信息确认"
messageLabel.text = "您的文件还没签字哦~" messageLabel.text = "请确认现阶段信息是否存在变更~"
buttonLabel.text = "待确认"
messageLabel.textColor = UIColor.mainTextColor50
} }
if model.type == 321 {
titleLabel.text = "新增受养人"
messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明"
buttonLabel.text = "待完善"
progress.isHidden = true
progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.textColor = UIColor.mainTextColor50
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
} }
if model.status == 2 {
titleLabel.textColor = UIColor.mainTextColor
buttonLabel.text = "进行中"
buttonLabel.backgroundColor = UIColor.brandMainColor
progressImageView.image = UIImage(named: "service_progress_start")
progress.changeColor(UIColor.brandMainColor)
// 1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
if model.type == 1 {
titleLabel.text = "我的证件"
// messageLabel.text = "恭喜您,证件已全部上传完~"
buttonLabel.text = "去上传"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("证件待上传哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
} }
if model.type == 2 {
titleLabel.text = "我的信息" if model.type == 324 {
buttonLabel.text = "去填写" titleLabel.text = "赴港办证预约"
if model.reject_status == 0 { if model.percentage == 50 {
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor)) messageLabel.text = "抢号中~"
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("信息待填写哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
} else { } else {
let a: ASAttributedString = .init("您的信息被", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor)) messageLabel.text = "请填写意向办证时间,银河代预约~"
let aa: ASAttributedString = .init(NSAttributedString(string: "驳回"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.failColor))
let aaa: ASAttributedString = .init("了哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "去修改"
}
} }
if model.type == 3 { buttonLabel.text = "去查看"
titleLabel.text = "我的评分" messageLabel.textColor = UIColor.mainTextColor50
messageLabel.text = "后端出问题会显示"
} }
if model.type == 4 {
titleLabel.text = "我的方案" if model.type == 323 {
messageLabel.text = "后端出问题会显示" titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
buttonLabel.text = "待缴费"
messageLabel.textColor = UIColor.mainTextColor50
} }
if model.type == 5 {
titleLabel.text = "我的签字" if model.type == 325 {
buttonLabel.text = "去签字" titleLabel.text = "赴港行程指引"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor)) messageLabel.text = "请根据指引清单提前规划赴港行程"
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor)) buttonLabel.text = "去查看"
let aaa: ASAttributedString = .init("文件待签字哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor)) messageLabel.textColor = UIColor.mainTextColor50
messageLabel.attributed.text = a + aa + aaa progressImageView.isHidden = true
progressLabel.isHidden = true
messageLabel.snp.remakeConstraints { make in
make.top.equalTo(49)
make.left.equalTo(21)
make.right.equalTo(-21)
} }
if model.type == 6 {
titleLabel.text = "我的文书"
buttonLabel.text = "去确认"
if model.percentage == 66 {
let a: ASAttributedString = .init("您的文书正在", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "审核中"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "请稍候"
buttonLabel.backgroundColor = UIColor.mainTextColor50
} else {
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)份"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("文书待返稿哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
} }
if model.type == 326 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
buttonLabel.text = "去上传"
messageLabel.textColor = UIColor.mainTextColor50
} }
if model.type == 7 { if model.type == 327 {
titleLabel.text = "递交确认" titleLabel.text = "上传过关证件"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor)) messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)项"), .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.brandMainColor)) buttonLabel.text = "去上传"
let aaa: ASAttributedString = .init("信息确认签署待完成哦~", .font(UIFont.PFSC_M(ofSize: 13)), .foreground(UIColor.yhGreyColor)) messageLabel.textColor = UIColor.mainTextColor50
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "去确认"
} }
if model.type == 411 {
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)), .foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
if model.type == 11 {
titleLabel.text = "港府获批结果" titleLabel.text = "港府获批结果"
messageLabel.text = "正在等待原则批结果~" messageLabel.text = "正在等待批结果~"
buttonLabel.text = "去查看" buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50 messageLabel.textColor = UIColor.mainTextColor50
...@@ -347,9 +887,9 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -347,9 +887,9 @@ extension YHServiceOrderProgressTableViewCell {
progressLabel.attributed.text = b + bb progressLabel.attributed.text = b + bb
} }
if model.type == 12 { if model.type == 412 {
titleLabel.text = "港府获批结果" titleLabel.text = "港府获批结果"
messageLabel.text = "正在进行原则批补件~" messageLabel.text = "正在进行补件~"
buttonLabel.text = "去查看" buttonLabel.text = "去查看"
buttonLabel.backgroundColor = UIColor.brandMainColor buttonLabel.backgroundColor = UIColor.brandMainColor
messageLabel.textColor = UIColor.mainTextColor50 messageLabel.textColor = UIColor.mainTextColor50
...@@ -360,7 +900,7 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -360,7 +900,7 @@ extension YHServiceOrderProgressTableViewCell {
progressLabel.attributed.text = b + bb progressLabel.attributed.text = b + bb
} }
if model.type == 13 { if model.type == 413 {
titleLabel.text = "港府获批结果" titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,原则批已获批~" messageLabel.text = "恭喜您,原则批已获批~"
buttonLabel.text = "去查看" buttonLabel.text = "去查看"
...@@ -373,7 +913,7 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -373,7 +913,7 @@ extension YHServiceOrderProgressTableViewCell {
progressLabel.attributed.text = b + bb progressLabel.attributed.text = b + bb
} }
if model.type == 14 { if model.type == 414 {
titleLabel.text = "港府获批结果" titleLabel.text = "港府获批结果"
messageLabel.text = "很遗憾,您未获批准~" messageLabel.text = "很遗憾,您未获批准~"
buttonLabel.text = "去查看" buttonLabel.text = "去查看"
...@@ -386,7 +926,7 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -386,7 +926,7 @@ extension YHServiceOrderProgressTableViewCell {
progressLabel.attributed.text = b + bb progressLabel.attributed.text = b + bb
} }
if model.type == 15 { if model.type == 415 {
titleLabel.text = "港府获批结果" titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,正式批已获批~" messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看" buttonLabel.text = "去查看"
...@@ -399,14 +939,14 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -399,14 +939,14 @@ extension YHServiceOrderProgressTableViewCell {
progressLabel.attributed.text = b + bb progressLabel.attributed.text = b + bb
} }
if model.type == 22 { if model.type == 422 {
titleLabel.text = "家庭信息确认" titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~" messageLabel.text = "请确认现阶段信息是否存在变更~"
buttonLabel.text = "待确认" buttonLabel.text = "待确认"
messageLabel.textColor = UIColor.mainTextColor50 messageLabel.textColor = UIColor.mainTextColor50
} }
if model.type == 21 { if model.type == 421 {
titleLabel.text = "新增受养人" titleLabel.text = "新增受养人"
messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明" messageLabel.text = "如需,建议现阶段新增,激活后新增需香港住址证明"
buttonLabel.text = "待完善" buttonLabel.text = "待完善"
...@@ -421,7 +961,7 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -421,7 +961,7 @@ extension YHServiceOrderProgressTableViewCell {
} }
} }
if model.type == 24 { if model.type == 424 {
titleLabel.text = "赴港办证预约" titleLabel.text = "赴港办证预约"
if model.percentage == 50 { if model.percentage == 50 {
messageLabel.text = "抢号中~" messageLabel.text = "抢号中~"
...@@ -432,14 +972,14 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -432,14 +972,14 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel.textColor = UIColor.mainTextColor50 messageLabel.textColor = UIColor.mainTextColor50
} }
if model.type == 23 { if model.type == 423 {
titleLabel.text = "电子签证缴费" titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~" messageLabel.text = "请根据指引缴费领取电子签证~"
buttonLabel.text = "待缴费" buttonLabel.text = "待缴费"
messageLabel.textColor = UIColor.mainTextColor50 messageLabel.textColor = UIColor.mainTextColor50
} }
if model.type == 25 { if model.type == 425 {
titleLabel.text = "赴港行程指引" titleLabel.text = "赴港行程指引"
messageLabel.text = "请根据指引清单提前规划赴港行程" messageLabel.text = "请根据指引清单提前规划赴港行程"
buttonLabel.text = "去查看" buttonLabel.text = "去查看"
...@@ -453,14 +993,14 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -453,14 +993,14 @@ extension YHServiceOrderProgressTableViewCell {
} }
} }
if model.type == 26 { if model.type == 426 {
titleLabel.text = "旅行证件准备" titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件" messageLabel.text = "请更新所有赴港人员的旅行证件"
buttonLabel.text = "去上传" buttonLabel.text = "去上传"
messageLabel.textColor = UIColor.mainTextColor50 messageLabel.textColor = UIColor.mainTextColor50
} }
if model.type == 27 { if model.type == 427 {
titleLabel.text = "上传过关证件" titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)" messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
buttonLabel.text = "去上传" buttonLabel.text = "去上传"
...@@ -691,7 +1231,111 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -691,7 +1231,111 @@ extension YHServiceOrderProgressTableViewCell {
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)" messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
buttonLabel.text = "已完成" buttonLabel.text = "已完成"
} }
if model.type == 215 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看"
}
if model.type == 222 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
buttonLabel.text = "已完成"
}
if model.type == 224 {
titleLabel.text = "赴港办证预约"
messageLabel.text = "请填写意向办证时间,银河代预约~"
buttonLabel.text = "已完成"
}
if model.type == 223 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
buttonLabel.text = "已完成"
}
if model.type == 226 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
buttonLabel.text = "已完成"
}
if model.type == 227 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
buttonLabel.text = "已完成"
}
if model.type == 315 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看"
}
if model.type == 322 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
buttonLabel.text = "已完成"
}
if model.type == 324 {
titleLabel.text = "赴港办证预约"
messageLabel.text = "请填写意向办证时间,银河代预约~"
buttonLabel.text = "已完成"
}
if model.type == 323 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
buttonLabel.text = "已完成"
}
if model.type == 326 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
buttonLabel.text = "已完成"
}
if model.type == 327 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
buttonLabel.text = "已完成"
}
if model.type == 415 {
titleLabel.text = "港府获批结果"
messageLabel.text = "恭喜您,正式批已获批~"
buttonLabel.text = "去查看"
}
if model.type == 422 {
titleLabel.text = "家庭信息确认"
messageLabel.text = "请确认现阶段信息是否存在变更~"
buttonLabel.text = "已完成"
}
if model.type == 424 {
titleLabel.text = "赴港办证预约"
messageLabel.text = "请填写意向办证时间,银河代预约~"
buttonLabel.text = "已完成"
}
if model.type == 423 {
titleLabel.text = "电子签证缴费"
messageLabel.text = "请根据指引缴费领取电子签证~"
buttonLabel.text = "已完成"
}
if model.type == 426 {
titleLabel.text = "旅行证件准备"
messageLabel.text = "请更新所有赴港人员的旅行证件"
buttonLabel.text = "已完成"
}
if model.type == 427 {
titleLabel.text = "上传过关证件"
messageLabel.text = "点击保存入境小白条及香港身份证(后续身份续签、永居均涉及)"
buttonLabel.text = "已完成"
}
if model.type == 31 { if model.type == 31 {
titleLabel.text = "续签资料管理" titleLabel.text = "续签资料管理"
messageLabel.text = "请根据资料清单上传您的续签证明文件~" messageLabel.text = "请根据资料清单上传您的续签证明文件~"
......
...@@ -73,8 +73,8 @@ class YHServiceSelectAlertView: UICollectionViewCell { ...@@ -73,8 +73,8 @@ class YHServiceSelectAlertView: UICollectionViewCell {
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.numberOfLines = 0 label.numberOfLines = 0
let a: ASAttributedString = .init("期望银河在", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("期望银河在您的", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("审批阶段", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.brandMainColor)) let b: ASAttributedString = .init("香港新生活", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init("\n提供哪些服务", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor)) let c: ASAttributedString = .init("\n提供哪些服务", .font(UIFont.PFSC_B(ofSize: 18)), .foreground(UIColor.mainTextColor))
label.attributed.text = a+b+c label.attributed.text = a+b+c
return label return label
......
...@@ -344,10 +344,14 @@ private extension YHTravelDocsPreparationDetailVC { ...@@ -344,10 +344,14 @@ private extension YHTravelDocsPreparationDetailVC {
var cerArr: [[String: Any]] = [] var cerArr: [[String: Any]] = []
for item in sectionItems { for item in sectionItems {
if item.type == .certificate { if item.type == .certificate {
var imageback = item.cerDetailModel.img_back
if self.type == .chinesePassPort || self.type == .forignPassPort {
imageback = ""
}
let dic: [String: Any] = [ let dic: [String: Any] = [
"type": item.cerDetailModel.type, "type": item.cerDetailModel.type,
"img_front": item.cerDetailModel.img_front, "img_front": item.cerDetailModel.img_front,
"img_back": item.cerDetailModel.img_back, "img_back": imageback,
"issue_start": item.cerDetailModel.issue_start, "issue_start": item.cerDetailModel.issue_start,
"issue_end": item.cerDetailModel.issue_end "issue_end": item.cerDetailModel.issue_end
] ]
......
...@@ -46,6 +46,7 @@ class YHOfficialApprovalResultVC: YHBaseViewController { ...@@ -46,6 +46,7 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
// 文档内容 // 文档内容
lazy var contentView: YHOffivialApprovalSuccessView = { lazy var contentView: YHOffivialApprovalSuccessView = {
let view = YHOffivialApprovalSuccessView() let view = YHOffivialApprovalSuccessView()
view.orderTypeString = orderTypeString
// view.isHidden = true // view.isHidden = true
return view return view
}() }()
...@@ -138,6 +139,18 @@ class YHOfficialApprovalResultVC: YHBaseViewController { ...@@ -138,6 +139,18 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
// 是否来着首页的弹窗 // 是否来着首页的弹窗
var isFromHomeAlertViewFlag: Bool = false var isFromHomeAlertViewFlag: Bool = false
var orderTypeString = ""
var orderType: Int = 1 {
didSet {
if orderType == 1 {
orderTypeString = "优秀人才入境计划"
} else if orderType == 2 {
orderTypeString = "高才通人才计划"
} else if orderType == 3 {
orderTypeString = "输入内地人才入境计划"
}
}
}
lazy var previewFileTool: YHFilePreviewTool = { lazy var previewFileTool: YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: UIViewController.current) let tool = YHFilePreviewTool(targetVC: UIViewController.current)
...@@ -205,6 +218,7 @@ private extension YHOfficialApprovalResultVC { ...@@ -205,6 +218,7 @@ private extension YHOfficialApprovalResultVC {
let view = YHOffivialApprovalSuccessCheckView.sheetView() let view = YHOffivialApprovalSuccessCheckView.sheetView()
view.days = self.princleVM.lettersModel?.days ?? 0 view.days = self.princleVM.lettersModel?.days ?? 0
view.orderType = self.orderType
view.show() view.show()
view.block = { tag in view.block = { tag in
......
...@@ -97,6 +97,18 @@ class YHOffivialApprovalSuccessCheckView: UIView { ...@@ -97,6 +97,18 @@ class YHOffivialApprovalSuccessCheckView: UIView {
lastText = "从递交资料伊始,经历了" + String(days) + "天,感谢您这一路以来对银河的信赖与包容!" lastText = "从递交资料伊始,经历了" + String(days) + "天,感谢您这一路以来对银河的信赖与包容!"
} }
} }
var orderType: Int = 1 {
didSet {
if orderType == 1 {
fullText = "恭喜您申请的【优秀人才入境计划】"
} else if orderType == 2 {
fullText = "恭喜您申请的【高才通人才计划】"
} else if orderType == 3 {
fullText = "恭喜您申请的【输入内地人才入境计划】"
}
}
}
} }
extension YHOffivialApprovalSuccessCheckView { extension YHOffivialApprovalSuccessCheckView {
......
...@@ -19,7 +19,7 @@ class YHOffivialApprovalSuccessView: UIView { ...@@ -19,7 +19,7 @@ class YHOffivialApprovalSuccessView: UIView {
private var titleLabel: UILabel! private var titleLabel: UILabel!
private var arrViews: [UIView] = [] private var arrViews: [UIView] = []
var orderTypeString: String = "优秀人才入境计划"
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
...@@ -100,13 +100,13 @@ private extension YHOffivialApprovalSuccessView { ...@@ -100,13 +100,13 @@ private extension YHOffivialApprovalSuccessView {
let arr = tmp.split(separator: "-") let arr = tmp.split(separator: "-")
if arr.count == 3 { if arr.count == 3 {
tmp = arr[0] + "年" + arr[1] + "月" + arr[2] + "日" + "正式获批" tmp = arr[0] + "年" + arr[1] + "月" + arr[2] + "日" + "正式获批"
let fourItems = ["祝贺您和您的家人申请的", "【优秀人才入境计划】", tmp, "这意味着,您领取香港居民身份证", "仅有一步之遥!!"] let fourItems = ["祝贺您和您的家人申请的", "【\(orderTypeString)】", tmp, "这意味着,您领取香港居民身份证", "仅有一步之遥!!"]
updataView(data: fourItems) updataView(data: fourItems)
} }
} else { } else {
titleLabel.text = "恭喜 客户!" titleLabel.text = "恭喜 客户!"
let tmp = "正式获批" let tmp = "正式获批"
let fourItems = ["祝贺您和您的家人申请的", "【优秀人才入境计划】", tmp, "这意味着,您领取香港居民身份证", "仅有一步之遥!!"] let fourItems = ["祝贺您和您的家人申请的", "【\(orderTypeString)】", tmp, "这意味着,您领取香港居民身份证", "仅有一步之遥!!"]
updataView(data: fourItems) updataView(data: fourItems)
} }
......
...@@ -27,7 +27,22 @@ class YHPrincipleWaitResultViewController: YHBaseViewController { ...@@ -27,7 +27,22 @@ class YHPrincipleWaitResultViewController: YHBaseViewController {
var status: Int = -1 var status: Int = -1
var items: [YHPrincipleWaitResultModel] = [] var items: [YHPrincipleWaitResultModel] = []
var isQuerying: Bool = false var isQuerying: Bool = false
var orderTypeString = ""
var orderTypeTime = ""
var orderType: Int = 1 {
didSet {
if orderType == 1 {
orderTypeString = "优秀人才入境计划"
orderTypeTime = "12个月"
} else if orderType == 2 {
orderTypeString = "高才通人才计划"
orderTypeTime = "2-3个月"
} else if orderType == 3 {
orderTypeString = "输入内地人才入境计划"
orderTypeTime = "3-6个月"
}
}
}
let viewModel = YHPrincleViewModel() let viewModel = YHPrincleViewModel()
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped) let tableView = UITableView(frame: .zero, style: .grouped)
...@@ -237,7 +252,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD ...@@ -237,7 +252,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
tipsLabel.numberOfLines = 0 tipsLabel.numberOfLines = 0
tipsLabel.font = UIFont.PFSC_R(ofSize: 14) tipsLabel.font = UIFont.PFSC_R(ofSize: 14)
tipsLabel.textColor = .mainTextColor(alpha: 0.7) tipsLabel.textColor = .mainTextColor(alpha: 0.7)
tipsLabel.text = "您的【优秀人才入境计划】赴港居留申请资料已经递交港府。" tipsLabel.text = "您的【\(orderTypeString)】赴港居留申请资料已经递交港府。"
view.addSubview(tipsLabel) view.addSubview(tipsLabel)
let detailLabel = UILabel() let detailLabel = UILabel()
...@@ -287,7 +302,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD ...@@ -287,7 +302,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
// 14 未获批准~ // 14 未获批准~
if status == YHCustomerServiceStatus.principleWaitResult.rawValue { // 等待原则批结果 if status == YHCustomerServiceStatus.principleWaitResult.rawValue { // 等待原则批结果
let str1: ASAttributedString = .init("您的【优秀人才入境计划】赴港居留申请资料已经递交港府,且入境事务处已经认收受理!港府审核周期预计在12个月内,", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7))) let str1: ASAttributedString = .init("您的【\(orderTypeString)】赴港居留申请资料已经递交港府,且入境事务处已经认收受理!港府审核周期预计在\(orderTypeTime)内,", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7)))
let str2: ASAttributedString = .init("我们将实时为您查询身份申请进度", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor.brandMainColor)) let str2: ASAttributedString = .init("我们将实时为您查询身份申请进度", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor.brandMainColor))
var str3: ASAttributedString = .init(",请您耐心等待!", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7))) var str3: ASAttributedString = .init(",请您耐心等待!", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7)))
if self.viewModel.waitResultModel.resultImageList.count > 0 { if self.viewModel.waitResultModel.resultImageList.count > 0 {
...@@ -302,7 +317,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD ...@@ -302,7 +317,7 @@ extension YHPrincipleWaitResultViewController: UITableViewDelegate, UITableViewD
} else if status == YHCustomerServiceStatus.principleRejected.rawValue { // 未获批准~ } else if status == YHCustomerServiceStatus.principleRejected.rawValue { // 未获批准~
let str1: ASAttributedString = .init("您【与家人】申请的【优秀人才入境计划】", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7))) let str1: ASAttributedString = .init("您【与家人】申请的【\(orderTypeString)】", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7)))
let str2: ASAttributedString = .init("未获批准", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor.brandMainColor)) let str2: ASAttributedString = .init("未获批准", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor.brandMainColor))
let str3: ASAttributedString = .init("。具体详情以及后续处理方式,请您联系专属服务您的生活管家进行详细沟通", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7))) let str3: ASAttributedString = .init("。具体详情以及后续处理方式,请您联系专属服务您的生活管家进行详细沟通", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor(alpha: 0.7)))
return str1 + str2 + str3 return str1 + str2 + str3
......
...@@ -8,9 +8,16 @@ ...@@ -8,9 +8,16 @@
import UIKit import UIKit
let yh_newsList = YHGalaxyNewsListViewController()
class YHGalaxyNewsListViewController: YHBaseViewController { class YHGalaxyNewsListViewController: YHBaseViewController {
var newsArr: [String] = ["", "", ""] let type: Int = YHMessageType.article.rawValue
var newsArr: [YHNewsModel] = []
var currentPage = 1
var isLastPage = false
let viewModel = YHMsgViewModel()
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped) let tableView = UITableView(frame: .zero, style: .grouped)
...@@ -27,11 +34,18 @@ class YHGalaxyNewsListViewController: YHBaseViewController { ...@@ -27,11 +34,18 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
tableView.backgroundView = emptyDataTipsView tableView.backgroundView = emptyDataTipsView
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHGalaxyNewsCell.self, forCellReuseIdentifier: YHGalaxyNewsCell.cellReuseIdentifier) tableView.register(YHGalaxyNewsCell.self, forCellReuseIdentifier: YHGalaxyNewsCell.cellReuseIdentifier)
tableView.es.addYHPullToRefresh {
self.getMsgList(more: false)
}
tableView.es.addInfiniteScrolling {
self.getMsgList(more: true)
}
return tableView return tableView
}() }()
lazy var emptyDataTipsView: YHEmptyDataView = { lazy var emptyDataTipsView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无消息", kEmptyMessageBgName) let view = YHEmptyDataView.createView("暂无资讯", kEmptyMessageBgName)
let topMargin = 310-k_Height_NavigationtBarAndStatuBar let topMargin = 310-k_Height_NavigationtBarAndStatuBar
view.topMargin = topMargin view.topMargin = topMargin
view.isHidden = true view.isHidden = true
...@@ -50,20 +64,132 @@ class YHGalaxyNewsListViewController: YHBaseViewController { ...@@ -50,20 +64,132 @@ class YHGalaxyNewsListViewController: YHBaseViewController {
view.backgroundColor = .init(hex: 0xF8F9FB) view.backgroundColor = .init(hex: 0xF8F9FB)
view.addSubview(tableView) view.addSubview(tableView)
tableView.snp.makeConstraints { make in tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar) make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
} }
getMsgList()
} }
@objc func didCleanBtnClicked() { @objc func didCleanBtnClicked() {
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") { YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") {
} callBack: {
self.markAllMsgsRead()
}
}
func getMsgList(more: Bool = false) {
if isLastPage {
if more {
tableView.es.stopLoadingMore()
} else {
tableView.es.stopPullToRefresh()
}
self.tableView.es.noticeNoMoreData()
self.tableView.footer?.isHidden = false
return
}
if more {
currentPage += 1
} else {
currentPage = 1
}
self.viewModel.getNewsDetailList(type: self.type, page: currentPage) { [weak self] _, isLastPage in
guard let self = self else { return }
newsArr.removeAll()
newsArr.append(contentsOf: self.viewModel.newsDetailList)
emptyDataTipsView.isHidden = newsArr.count > 0
self.isLastPage = isLastPage
if more {
tableView.es.stopLoadingMore()
} else {
tableView.es.stopPullToRefresh()
}
if isLastPage {
self.tableView.es.noticeNoMoreData()
self.tableView.footer?.isHidden = false
}
self.tableView.reloadData()
}
}
func markAllMsgsRead() {
YHHUD.show(.progress(message: "清除中..."))
self.viewModel.readMessages(type: self.type, msgIds: nil, isAllRead: true) { [weak self] success, error in
YHHUD.hide()
guard let self = self else { return }
if success {
YHHUD.flash(message: "清除成功")
for item in self.newsArr {
item.is_read = true
}
self.tableView.reloadData()
return
}
var msg = "清除失败"
if let error = error {
if error.errorMsg.count > 0 {
msg = error.errorMsg
}
}
YHHUD.flash(message: msg)
}
}
func markRead(_ model: YHNewsModel) {
if let id = Int(model.id) {
self.viewModel.readMessages(type: self.type, msgIds: [id], isAllRead: false) { [weak self] success, _ in
guard let self = self else { return }
if success {
for msgItem in newsArr {
if msgItem.article_id == model.article_id, msgItem.id == model.id {
msgItem.is_read = true
break
}
}
self.tableView.reloadData()
return
}
}
} }
} }
func enterDetail(_ item: YHNewsModel) {
if item.news_type == 2 { // 图文
let vc = YHHomeWebViewController()
vc.url = YHBaseUrlManager.shared.curH5URL() + "articleDetail.html" + "?id=\(item.article_id)"
vc.id = item.article_id
UIViewController.current?.navigationController?.pushViewController(vc)
return
} else if item.news_type == 1 { // 视频
if !item.media_url.isEmpty, let _ = URL(string: item.media_url) {
let vc = YHVideoPlayerVC()
if !item.media_transcode_url.isEmpty {
vc.url = item.media_transcode_url
} else {
vc.url = item.media_url
}
vc.id = item.article_id
UIViewController.current?.navigationController?.pushViewController(vc)
}
return
} else if item.news_type == 4 { // 纯网页
let vc = YHWebViewViewController()
vc.url = item.url
vc.navTitle = item.title
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
} }
extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSource { extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSource {
...@@ -77,7 +203,7 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo ...@@ -77,7 +203,7 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo
guard let cell = tableView.dequeueReusableCell(withIdentifier: YHGalaxyNewsCell.cellReuseIdentifier, for: indexPath) as? YHGalaxyNewsCell else { return UITableViewCell() } guard let cell = tableView.dequeueReusableCell(withIdentifier: YHGalaxyNewsCell.cellReuseIdentifier, for: indexPath) as? YHGalaxyNewsCell else { return UITableViewCell() }
if 0 <= indexPath.row && indexPath.row < newsArr.count { if 0 <= indexPath.row && indexPath.row < newsArr.count {
let item = newsArr[indexPath.row] let item = newsArr[indexPath.row]
cell.updateModel(item)
} }
return cell return cell
} }
...@@ -87,7 +213,11 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo ...@@ -87,7 +213,11 @@ extension YHGalaxyNewsListViewController: UITableViewDelegate, UITableViewDataSo
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.row && indexPath.row < newsArr.count {
let item = newsArr[indexPath.row]
self.enterDetail(item)
self.markRead(item)
}
} }
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
......
...@@ -177,7 +177,6 @@ class YHMessageListVC: YHBaseViewController { ...@@ -177,7 +177,6 @@ class YHMessageListVC: YHBaseViewController {
@objc func getUnreadMsgList() { @objc func getUnreadMsgList() {
if !YHLoginManager.shared.isLogin() { if !YHLoginManager.shared.isLogin() {
// 保留第一个元素银河管家,删除其他元素
msgArr.removeAll() msgArr.removeAll()
self.tableView.reloadData() self.tableView.reloadData()
emptyDataTipsView.isHidden = msgArr.count > 0 emptyDataTipsView.isHidden = msgArr.count > 0
...@@ -205,6 +204,9 @@ class YHMessageListVC: YHBaseViewController { ...@@ -205,6 +204,9 @@ class YHMessageListVC: YHBaseViewController {
msgArr.append(self.managerSession) msgArr.append(self.managerSession)
} }
// 银河资讯
msgArr.append(self.viewModel.msgList.article)
if success { if success {
var hasUnreadMsg = false var hasUnreadMsg = false
...@@ -437,13 +439,6 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -437,13 +439,6 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// do {
// // test
// let vc = YHGalaxyNewsListViewController()
// self.navigationController?.pushViewController(vc)
// return
// }
if 0 <= indexPath.row && indexPath.row < msgArr.count { if 0 <= indexPath.row && indexPath.row < msgArr.count {
let msgItem = msgArr[indexPath.row] let msgItem = msgArr[indexPath.row]
...@@ -464,6 +459,12 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -464,6 +459,12 @@ extension YHMessageListVC: UITableViewDelegate, UITableViewDataSource {
} }
return return
} }
if msgItem.type == YHMessageType.article.rawValue { // 银河资讯
let vc = YHGalaxyNewsListViewController()
self.navigationController?.pushViewController(vc)
return
}
let vc = YHMessageDetailListVC() let vc = YHMessageDetailListVC()
vc.type = msgItem.type vc.type = msgItem.type
vc.title = msgItem.getTitle() vc.title = msgItem.getTitle()
......
...@@ -20,6 +20,7 @@ enum YHMessageType: Int { ...@@ -20,6 +20,7 @@ enum YHMessageType: Int {
case goToHK = 7 // 赴港办证 case goToHK = 7 // 赴港办证
case renewal = 8 // 身份续签 case renewal = 8 // 身份续签
case business = 9 // 商务 case business = 9 // 商务
case article = 10 // 资讯
case yinheManager = 9527 // 银河管家 case yinheManager = 9527 // 银河管家
} }
...@@ -73,6 +74,9 @@ class YHMessageInfoModel: SmartCodable { ...@@ -73,6 +74,9 @@ class YHMessageInfoModel: SmartCodable {
} else if type == YHMessageType.business.rawValue { } else if type == YHMessageType.business.rawValue {
return "银河商务" return "银河商务"
} else if type == YHMessageType.article.rawValue {
return "银河资讯"
} }
return "" return ""
} }
...@@ -88,6 +92,7 @@ class YHMsgListModel: SmartCodable { ...@@ -88,6 +92,7 @@ class YHMsgListModel: SmartCodable {
var goToHK: YHMessageInfoModel = YHMessageInfoModel() var goToHK: YHMessageInfoModel = YHMessageInfoModel()
var renewal: YHMessageInfoModel = YHMessageInfoModel() var renewal: YHMessageInfoModel = YHMessageInfoModel()
var business: YHMessageInfoModel = YHMessageInfoModel() var business: YHMessageInfoModel = YHMessageInfoModel()
var article: YHMessageInfoModel = YHMessageInfoModel()
required init() { required init() {
self.information.type = YHMessageType.infoFill.rawValue self.information.type = YHMessageType.infoFill.rawValue
...@@ -99,10 +104,11 @@ class YHMsgListModel: SmartCodable { ...@@ -99,10 +104,11 @@ class YHMsgListModel: SmartCodable {
self.goToHK.type = YHMessageType.goToHK.rawValue self.goToHK.type = YHMessageType.goToHK.rawValue
self.renewal.type = YHMessageType.renewal.rawValue self.renewal.type = YHMessageType.renewal.rawValue
self.business.type = YHMessageType.business.rawValue self.business.type = YHMessageType.business.rawValue
self.article.type = YHMessageType.article.rawValue
} }
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case information, certificate, draft, signature, approval, renewal, business case information, certificate, draft, signature, approval, renewal, business, article
case dataSubmission = "data_submission" case dataSubmission = "data_submission"
case goToHK = "go_to_hk" case goToHK = "go_to_hk"
} }
......
//
// YHNewsModel.swift
// galaxy
//
// Created by Dufet on 2025/5/23.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import SmartCodable
class YHNewsListModel: SmartCodable {
var page_count: Int = 0
var list: [YHNewsModel] = []
required init() {
}
}
class YHNewsModel: SmartCodable {
var id: String = ""
var title: String = ""
var content: String = ""
var time: Int64 = 0
var is_read: Bool = false
var url: String = ""
var news_type: Int = 0 // 资讯类型:1视频 2图文 4 固定链接
var article_id: Int = 0
var type: Int = 0
var media_url: String = "" // 媒体链接
var media_transcode_url: String = "" // 媒体转码链接
var cover_img: String = "" // 封面图片链接
required init() {
}
}
...@@ -31,7 +31,9 @@ class YHGalaxyNewsCell: UITableViewCell { ...@@ -31,7 +31,9 @@ class YHGalaxyNewsCell: UITableViewCell {
lazy var coverImgV: UIImageView = { lazy var coverImgV: UIImageView = {
let imgV = UIImageView() let imgV = UIImageView()
imgV.contentMode = .scaleAspectFill
imgV.image = UIImage(named: "msg_news_cover_default") imgV.image = UIImage(named: "msg_news_cover_default")
imgV.clipsToBounds = true
return imgV return imgV
}() }()
...@@ -77,6 +79,16 @@ class YHGalaxyNewsCell: UITableViewCell { ...@@ -77,6 +79,16 @@ class YHGalaxyNewsCell: UITableViewCell {
setupUI() setupUI()
} }
func updateModel(_ model: YHNewsModel) {
timeLabel.text = formatTimestamp(Double(model.time))
coverImgV.sd_setImage(with: URL(string: model.cover_img), placeholderImage: UIImage(named: "msg_news_cover_default"))
titleLabel.text = model.title
descLabel.text = model.content
redPointView.isHidden = model.is_read
playImgV.isHidden = model.news_type != 1
}
func setupUI() { func setupUI() {
self.selectionStyle = .none self.selectionStyle = .none
...@@ -136,4 +148,29 @@ class YHGalaxyNewsCell: UITableViewCell { ...@@ -136,4 +148,29 @@ class YHGalaxyNewsCell: UITableViewCell {
} }
func formatTimestamp(_ timestamp: TimeInterval) -> String {
let currentDate = Date()
let calendar = Calendar.current
let currentYear = calendar.component(.year, from: currentDate)
let currentDay = calendar.component(.day, from: currentDate)
let date = Date(timeIntervalSince1970: timestamp)
let year = calendar.component(.year, from: date)
let day = calendar.component(.day, from: date)
let dateFormatter = DateFormatter()
if year == currentYear {
if day == currentDay {
dateFormatter.dateFormat = "HH:mm"
} else {
dateFormatter.dateFormat = "MM-dd"
}
} else {
dateFormatter.dateFormat = "yyyy-MM-dd"
}
return dateFormatter.string(from: date)
}
} }
...@@ -33,6 +33,7 @@ class YHMessageSessionCell: UITableViewCell { ...@@ -33,6 +33,7 @@ class YHMessageSessionCell: UITableViewCell {
func updateModel(_ model: YHMessageInfoModel) { func updateModel(_ model: YHMessageInfoModel) {
self.nameLabel.text = model.getTitle() self.nameLabel.text = model.getTitle()
self.iconContentView.backgroundColor = UIColor(hex: 0xF4F6FA)
if model.type == YHMessageType.yinheManager.rawValue { if model.type == YHMessageType.yinheManager.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_yinhe_manager") self.iconImgView.image = UIImage(named: "msg_icon_yinhe_manager")
...@@ -63,6 +64,11 @@ class YHMessageSessionCell: UITableViewCell { ...@@ -63,6 +64,11 @@ class YHMessageSessionCell: UITableViewCell {
} else if model.type == YHMessageType.business.rawValue { } else if model.type == YHMessageType.business.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_business") self.iconImgView.image = UIImage(named: "msg_icon_business")
} else if model.type == YHMessageType.article.rawValue {
self.iconImgView.image = UIImage(named: "msg_icon_news")
self.iconContentView.backgroundColor = UIColor(hex: 0xF0F5FF)
} }
self.badgeLabel.isHidden = model.unreadCount <= 0 self.badgeLabel.isHidden = model.unreadCount <= 0
......
...@@ -10,6 +10,7 @@ import UIKit ...@@ -10,6 +10,7 @@ import UIKit
import SmartCodable import SmartCodable
let kMsgPageSize = 30 let kMsgPageSize = 30
let kNewsPageSize = 10
class YHMsgViewModel: NSObject { class YHMsgViewModel: NSObject {
...@@ -17,6 +18,9 @@ class YHMsgViewModel: NSObject { ...@@ -17,6 +18,9 @@ class YHMsgViewModel: NSObject {
var msgDetailList: [YHDetailMessageModel] = [] var msgDetailList: [YHDetailMessageModel] = []
var unreadTotalCount: Int = 0 var unreadTotalCount: Int = 0
var newsList: YHNewsListModel = YHNewsListModel()
var newsDetailList: [YHNewsModel] = []
func getUnreadMsgList(_ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) { func getUnreadMsgList(_ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadMsgListApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadMsgListApi
...@@ -40,6 +44,7 @@ class YHMsgViewModel: NSObject { ...@@ -40,6 +44,7 @@ class YHMsgViewModel: NSObject {
self.msgList.goToHK.type = YHMessageType.goToHK.rawValue self.msgList.goToHK.type = YHMessageType.goToHK.rawValue
self.msgList.renewal.type = YHMessageType.renewal.rawValue self.msgList.renewal.type = YHMessageType.renewal.rawValue
self.msgList.business.type = YHMessageType.business.rawValue self.msgList.business.type = YHMessageType.business.rawValue
self.msgList.article.type = YHMessageType.article.rawValue
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg) let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
...@@ -135,6 +140,25 @@ class YHMsgViewModel: NSObject { ...@@ -135,6 +140,25 @@ class YHMsgViewModel: NSObject {
} }
} }
func readMessage(taskId: Int, _ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.readPushMsgApi
let params: [String: Any] = ["type": YHMessageType.article.rawValue,
"task_id": taskId]
_ = YHNetRequest.postRequest(url: strUrl, params: params) { json, _ in
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: { error in
callBackBlock(false, error)
}
}
func requestTotalUnreadMsgCount(_ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) { func requestTotalUnreadMsgCount(_ callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadTotalCountApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.unreadTotalCountApi
...@@ -183,4 +207,52 @@ class YHMsgViewModel: NSObject { ...@@ -183,4 +207,52 @@ class YHMsgViewModel: NSObject {
} }
} }
func getNewsDetailList(type: Int, page: Int, _ callBackBlock: @escaping (_ success: Bool, _ isLastPage: Bool) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Message.newsListApi
let params = ["type": type,
"page": page,
"page_size": kNewsPageSize]
_ = YHNetRequest.postRequest(url: strUrl, params: params) { json, _ in
guard let dic = json.data?.peel as? [String: Any], let totalPage = dic["page_count"] as? Int, let arrDict = dic["list"] as? [Any] else {
callBackBlock(false, false)
return
}
if json.code == 200 {
DispatchQueue.global().async {
guard let arr = [YHNewsModel].deserialize(from: arrDict) else {
DispatchQueue.main.async {
let error = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
self.newsDetailList = []
callBackBlock(false, false)
}
return
}
DispatchQueue.main.async {
if page == 1 {
self.newsDetailList.removeAll()
}
for item in arr {
self.newsDetailList.append(item)
}
let currentPage = (self.newsDetailList.count+kNewsPageSize-1)/kNewsPageSize
callBackBlock(true, currentPage == totalPage)
}
}
} else {
self.newsDetailList = []
let error: YHErrorModel = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg)
callBackBlock(false, false)
}
} failBlock: { _ in
self.newsDetailList = []
callBackBlock(false, false)
}
}
} }
...@@ -194,7 +194,7 @@ class YHMemberCenterViewController: YHBaseViewController, UIGestureRecognizerDel ...@@ -194,7 +194,7 @@ class YHMemberCenterViewController: YHBaseViewController, UIGestureRecognizerDel
func appendMenu(_ giftModel: YHMemberGiftModel) { func appendMenu(_ giftModel: YHMemberGiftModel) {
if memberCenterInfo.currentLevel < giftModel.minLevel { if memberCenterInfo.currentLevel < giftModel.minLevel {
let minLevel = YHMembershipLevel(rawValue: giftModel.minLevel) ?? .normal let minLevel = YHMembershipLevel(rawValue: giftModel.minLevel) ?? .normal
details.append("本月剩余兑换数量\(giftModel.num)") details.append("可供兑换剩余库存\(giftModel.num)")
buttonTitles.append("\(minLevel.description)可兑") buttonTitles.append("\(minLevel.description)可兑")
buttonStates.append(.memberOnly) buttonStates.append(.memberOnly)
} else if giftModel.num <= 0 { } else if giftModel.num <= 0 {
...@@ -202,7 +202,7 @@ class YHMemberCenterViewController: YHBaseViewController, UIGestureRecognizerDel ...@@ -202,7 +202,7 @@ class YHMemberCenterViewController: YHBaseViewController, UIGestureRecognizerDel
buttonTitles.append("暂无库存") buttonTitles.append("暂无库存")
buttonStates.append(.outOfStock) buttonStates.append(.outOfStock)
} else { } else {
details.append("本月剩余兑换数量\(giftModel.num)") details.append("可供兑换剩余库存\(giftModel.num)")
buttonTitles.append("了解更多") buttonTitles.append("了解更多")
buttonStates.append(.redeemable) buttonStates.append(.redeemable)
} }
......
...@@ -17,7 +17,7 @@ class YHAnalytics { ...@@ -17,7 +17,7 @@ class YHAnalytics {
#if DEBUG #if DEBUG
let options = SAConfigOptions.init(serverURL: YhConstant.SensorsAnalytics.urlForTest, launchOptions: launchOptions) let options = SAConfigOptions.init(serverURL: YhConstant.SensorsAnalytics.urlForTest, launchOptions: launchOptions)
// 开启log // 开启log
options.enableLog = true options.enableLog = false
SensorsAnalyticsSDK.sharedInstance()?.set(["evn": "test"]) SensorsAnalyticsSDK.sharedInstance()?.set(["evn": "test"])
#elseif TESTENV #elseif TESTENV
let options = SAConfigOptions.init(serverURL: YhConstant.SensorsAnalytics.urlForTest, launchOptions: launchOptions) let options = SAConfigOptions.init(serverURL: YhConstant.SensorsAnalytics.urlForTest, launchOptions: launchOptions)
......
...@@ -433,10 +433,13 @@ class YHAllApiName { ...@@ -433,10 +433,13 @@ class YHAllApiName {
static let msgDetaiListApi = "infoflow/message/list/v2" static let msgDetaiListApi = "infoflow/message/list/v2"
// 标记消息已读 // 标记消息已读
static let readMsgApi = "infoflow/read-push" static let readMsgApi = "infoflow/read-push"
static let readPushMsgApi = "infoflow/read-push-from-bar"
// 获取未读消息总数 // 获取未读消息总数
static let unreadTotalCountApi = "infoflow/unread-total" static let unreadTotalCountApi = "infoflow/unread-total"
// 报备设备信息 // 报备设备信息
static let reportDeviceInfoApi = "infoflow/report-device-info" static let reportDeviceInfoApi = "infoflow/report-device-info"
// 银河资讯列表
static let newsListApi = "infoflow/message/article-list/v2"
} }
// 人脉 // 人脉
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Message_yinhezixun@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Message_yinhezixun@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Group 2033194705@2x.png", "filename" : "Group 2033195498@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Group 2033194705@3x.png", "filename" : "Group 2033195498@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "2@2x.png", "filename" : "图片替换@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "3@3x.png", "filename" : "图片替换@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
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