Commit 8ad4e6d3 authored by Steven杜宇's avatar Steven杜宇

// 版本升级

parent 669e1673
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
044414012BC3979800784A14 /* YHServerHKLifeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */; }; 044414012BC3979800784A14 /* YHServerHKLifeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */; };
044414032BC39B8D00784A14 /* YHServerTableHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */; }; 044414032BC39B8D00784A14 /* YHServerTableHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */; };
044414052BC3B9DE00784A14 /* YHServiceTableFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */; }; 044414052BC3B9DE00784A14 /* YHServiceTableFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */; };
0445E6AF2BE9CFF6003C52F9 /* YHAppVersionUpdateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0445E6AE2BE9CFF6003C52F9 /* YHAppVersionUpdateView.swift */; }; 0445E6AF2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0445E6AE2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift */; };
0445E6B12BE9E15C003C52F9 /* YHFindAppNewVersionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0445E6B02BE9E15C003C52F9 /* YHFindAppNewVersionView.swift */; }; 0445E6B12BE9E15C003C52F9 /* YHFindAppNewVersionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0445E6B02BE9E15C003C52F9 /* YHFindAppNewVersionView.swift */; };
044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */; }; 044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */; };
044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */; }; 044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */; };
...@@ -485,7 +485,7 @@ ...@@ -485,7 +485,7 @@
044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerHKLifeViewController.swift; sourceTree = "<group>"; }; 044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerHKLifeViewController.swift; sourceTree = "<group>"; };
044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerTableHeadView.swift; sourceTree = "<group>"; }; 044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerTableHeadView.swift; sourceTree = "<group>"; };
044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceTableFootView.swift; sourceTree = "<group>"; }; 044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceTableFootView.swift; sourceTree = "<group>"; };
0445E6AE2BE9CFF6003C52F9 /* YHAppVersionUpdateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppVersionUpdateView.swift; sourceTree = "<group>"; }; 0445E6AE2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppVersionForceUpdateView.swift; sourceTree = "<group>"; };
0445E6B02BE9E15C003C52F9 /* YHFindAppNewVersionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFindAppNewVersionView.swift; sourceTree = "<group>"; }; 0445E6B02BE9E15C003C52F9 /* YHFindAppNewVersionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFindAppNewVersionView.swift; sourceTree = "<group>"; };
044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterView.swift; sourceTree = "<group>"; }; 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterView.swift; sourceTree = "<group>"; };
044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterItemCell.swift; sourceTree = "<group>"; }; 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterItemCell.swift; sourceTree = "<group>"; };
...@@ -1036,7 +1036,7 @@ ...@@ -1036,7 +1036,7 @@
0445E6AD2BE9CF95003C52F9 /* V */ = { 0445E6AD2BE9CF95003C52F9 /* V */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0445E6AE2BE9CFF6003C52F9 /* YHAppVersionUpdateView.swift */, 0445E6AE2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift */,
0445E6B02BE9E15C003C52F9 /* YHFindAppNewVersionView.swift */, 0445E6B02BE9E15C003C52F9 /* YHFindAppNewVersionView.swift */,
); );
path = V; path = V;
...@@ -2755,7 +2755,7 @@ ...@@ -2755,7 +2755,7 @@
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */, 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */,
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */, A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */,
045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */, 045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */,
0445E6AF2BE9CFF6003C52F9 /* YHAppVersionUpdateView.swift in Sources */, 0445E6AF2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift in Sources */,
045EEEC12B9F171A0022A143 /* YHOtherInfoFillModel.swift in Sources */, 045EEEC12B9F171A0022A143 /* YHOtherInfoFillModel.swift in Sources */,
0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */, 0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */,
045EEE9E2B9F171A0022A143 /* YHWorkExampleModel.swift in Sources */, 045EEE9E2B9F171A0022A143 /* YHWorkExampleModel.swift in Sources */,
......
...@@ -235,6 +235,20 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -235,6 +235,20 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
if (indexPath.row >= items.count) { return } if (indexPath.row >= items.count) { return }
#if DEBUG
if true {
let view = YHFindAppNewVersionView.alertView()
view.updateContentArray(["阿斯顿发发阿斯顿发发阿斯顿发发阿斯顿发发阿斯顿发发阿斯顿发发。 ",
"阿打发打发是的发生富士达",
"阿打发打发山东发斯蒂芬撒打发撒打发手打",
"阿斯顿发发是的发生"])
view.show()
// YHAppVersionForceUpdateView.alertView().show()
return
}
#endif
if !checkLogin() { if !checkLogin() {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController()) let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom vc.modalPresentationStyle = .custom
......
// //
// YHAppVersionUpdateView.swift // YHAppVersionForceUpdateView.swift
// galaxy // galaxy
// //
// Created by edy on 2024/5/7. // Created by edy on 2024/5/7.
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
// //
// 【Usage】 // 【Usage】
/* /*
YHAppVersionUpdateView.alertView().show() YHAppVersionForceUpdateView.alertView().show()
*/ */
import UIKit import UIKit
class YHAppVersionUpdateView: UIView { class YHAppVersionForceUpdateView: UIView {
// 底层蒙版 // 底层蒙版
lazy var blackMaskView: UIView = { lazy var blackMaskView: UIView = {
...@@ -89,8 +89,8 @@ class YHAppVersionUpdateView: UIView { ...@@ -89,8 +89,8 @@ class YHAppVersionUpdateView: UIView {
createUI() createUI()
} }
static func alertView() -> YHAppVersionUpdateView { static func alertView() -> YHAppVersionForceUpdateView {
let alertView = YHAppVersionUpdateView(frame:UIScreen.main.bounds) let alertView = YHAppVersionForceUpdateView(frame:UIScreen.main.bounds)
return alertView return alertView
} }
......
...@@ -25,6 +25,8 @@ public enum YHErrorCode : Int32 { ...@@ -25,6 +25,8 @@ public enum YHErrorCode : Int32 {
case networkFail = -1 case networkFail = -1
case unknowError = -10000 case unknowError = -10000
case dictParseError = -10001 case dictParseError = -10001
case tokenInvalidError = 20001 // 登录token失效
case forceUpdate = 10025 // 强制更新版本
public func description() -> String { public func description() -> String {
switch self { switch self {
...@@ -36,6 +38,10 @@ public enum YHErrorCode : Int32 { ...@@ -36,6 +38,10 @@ public enum YHErrorCode : Int32 {
return "未知错误" return "未知错误"
case .dictParseError: case .dictParseError:
return "字典解析错误" return "字典解析错误"
case .tokenInvalidError:
return "登录token失效"
case .forceUpdate:
return "强制更新版本"
default: default:
return "未知" return "未知"
} }
...@@ -308,7 +314,7 @@ class YHNetRequest: NSObject { ...@@ -308,7 +314,7 @@ class YHNetRequest: NSObject {
#if DEBUG #if DEBUG
printLog("服务器返回数据是:\(obj)") printLog("服务器返回数据是:\(obj)")
#endif #endif
if obj.code == 20001 { if obj.code == YHErrorCode.tokenInvalidError.rawValue {
DispatchQueue.main.async { DispatchQueue.main.async {
YHLoginManager.shared.clearUserInfo() YHLoginManager.shared.clearUserInfo()
YHHUD.flash(message: "登录状态失效") YHHUD.flash(message: "登录状态失效")
...@@ -320,6 +326,14 @@ class YHNetRequest: NSObject { ...@@ -320,6 +326,14 @@ 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)
} else { } else {
......
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