Commit 3284f9a1 authored by Steven杜宇's avatar Steven杜宇

// 强制更新通知

parent 69054f3c
...@@ -261,6 +261,7 @@ ...@@ -261,6 +261,7 @@
04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */; }; 04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */; };
04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */; }; 04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */; };
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */; }; 04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */; };
04AF514E2BEB585C00009E3A /* YHVideoPlayerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF514D2BEB585C00009E3A /* YHVideoPlayerVC.swift */; };
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; }; 04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; }; 04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; }; 04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; };
...@@ -720,6 +721,7 @@ ...@@ -720,6 +721,7 @@
04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsDetailViewModel.swift; sourceTree = "<group>"; }; 04A7BD162BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsDetailViewModel.swift; sourceTree = "<group>"; };
04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsUrlModel.swift; sourceTree = "<group>"; }; 04A7BD182BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocumentsUrlModel.swift; sourceTree = "<group>"; };
04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Applegate(JPush).swift"; sourceTree = "<group>"; }; 04AA19FC2BB40D5C00C1CBBD /* Applegate(JPush).swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Applegate(JPush).swift"; sourceTree = "<group>"; };
04AF514D2BEB585C00009E3A /* YHVideoPlayerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVideoPlayerVC.swift; sourceTree = "<group>"; };
04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; }; 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; }; 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; }; 04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
...@@ -1746,6 +1748,14 @@ ...@@ -1746,6 +1748,14 @@
path = ViewModel; path = ViewModel;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
04AF514C2BEB57FC00009E3A /* VideoPlay */ = {
isa = PBXGroup;
children = (
04AF514D2BEB585C00009E3A /* YHVideoPlayerVC.swift */,
);
path = VideoPlay;
sourceTree = "<group>";
};
04AF58BA2B4FB71C0066011A /* Localized */ = { 04AF58BA2B4FB71C0066011A /* Localized */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -2116,6 +2126,7 @@ ...@@ -2116,6 +2126,7 @@
A5ACE8EE2B4564F7002C94D2 /* Tools */ = { A5ACE8EE2B4564F7002C94D2 /* Tools */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04AF514C2BEB57FC00009E3A /* VideoPlay */,
0468D4292B55017400CFB916 /* Analytics */, 0468D4292B55017400CFB916 /* Analytics */,
04AF58BA2B4FB71C0066011A /* Localized */, 04AF58BA2B4FB71C0066011A /* Localized */,
A5ACE8F12B4564F7002C94D2 /* NetWork */, A5ACE8F12B4564F7002C94D2 /* NetWork */,
...@@ -2564,6 +2575,7 @@ ...@@ -2564,6 +2575,7 @@
A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */, A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */,
045EEEFF2B9F171A0022A143 /* YHSaveAndSubmitView.swift in Sources */, 045EEEFF2B9F171A0022A143 /* YHSaveAndSubmitView.swift in Sources */,
045EEF0E2B9F171A0022A143 /* YHBasicInfoFillView.swift in Sources */, 045EEF0E2B9F171A0022A143 /* YHBasicInfoFillView.swift in Sources */,
04AF514E2BEB585C00009E3A /* YHVideoPlayerVC.swift in Sources */,
045EEEA12B9F171A0022A143 /* YHWorkExperienceDetailModel.swift in Sources */, 045EEEA12B9F171A0022A143 /* YHWorkExperienceDetailModel.swift in Sources */,
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */, A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */,
A567E5A12BD7643D00D5D5A0 /* YHHKEventViewController.swift in Sources */, A567E5A12BD7643D00D5D5A0 /* YHHKEventViewController.swift in Sources */,
......
...@@ -209,5 +209,8 @@ extension YhConstant { ...@@ -209,5 +209,8 @@ extension YhConstant {
// 请求通知权限通知 // 请求通知权限通知
public static let didReqeustNotifyPermissionNotification = Notification.Name(rawValue: "com.yinhe.msgPage.notifyPermission") public static let didReqeustNotifyPermissionNotification = Notification.Name(rawValue: "com.yinhe.msgPage.notifyPermission")
//强制更新通知
public static let didForceUpgradeNotifiction = Notification.Name(rawValue: "com.yinhe.version.forceUpgrade")
} }
} }
...@@ -314,6 +314,15 @@ class YHNetRequest: NSObject { ...@@ -314,6 +314,15 @@ class YHNetRequest: NSObject {
#if DEBUG #if DEBUG
printLog("服务器返回数据是:\(obj)") printLog("服务器返回数据是:\(obj)")
#endif #endif
if obj.code == YHErrorCode.forceUpdate.rawValue { // 强制版本升级
DispatchQueue.main.async {
YHAppVersionForceUpdateView.alertView().show()
// 发送强制更新通知
NotificationCenter.default.post(name: YhConstant.YhNotification.didForceUpgradeNotifiction, object: nil)
}
return
}
if obj.code == YHErrorCode.tokenInvalidError.rawValue { if obj.code == YHErrorCode.tokenInvalidError.rawValue {
DispatchQueue.main.async { DispatchQueue.main.async {
YHLoginManager.shared.clearUserInfo() YHLoginManager.shared.clearUserInfo()
...@@ -327,12 +336,6 @@ class YHNetRequest: NSObject { ...@@ -327,12 +336,6 @@ class YHNetRequest: NSObject {
return return
} }
if obj.code == YHErrorCode.forceUpdate.rawValue { // 强制版本升级
DispatchQueue.main.async {
YHAppVersionForceUpdateView.alertView().show()
}
return
}
guard let suclock = self.success else { return } guard let suclock = self.success else { return }
suclock(obj, statusCode) suclock(obj, statusCode)
......
//
// YHVideoPlayerVC.swift
// galaxy
//
// Created by edy on 2024/5/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVideoPlayerVC: YHBaseViewController {
lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar()
bar.backgroundColor = .white
if let title = self.title, !title.isEmpty {
bar.title = title
}
bar.showRightButtonType(.clean)
bar.backBlock = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popViewController(animated: true)
}
bar.rightBtnClick = {
[weak self] in
guard let self = self else { return }
}
return bar
}()
override func viewDidLoad() {
super.viewDidLoad()
}
func createUI() {
gk_navigationBar.isHidden = true
view.backgroundColor = .black
view.addSubview(navBar)
navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
}
}
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