Bläddra i källkod

3.6.5(1)
1.增加 App 升级功能
2.增加历史图群浏览功能

100Years 2 månader sedan
förälder
incheckning
76c0269eaf

+ 16 - 4
TSLiveWallpaper.xcodeproj/project.pbxproj

@@ -50,6 +50,7 @@
 		A81F5B5D2D1A906C00740085 /* TSHomeDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B5C2D1A905800740085 /* TSHomeDataModel.swift */; };
 		A81F5B5F2D1A909300740085 /* TSRandomWallpaperModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B5E2D1A907B00740085 /* TSRandomWallpaperModel.swift */; };
 		A81F5B622D1AB17E00740085 /* TSRandomWallpaperBrowseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B612D1AB17C00740085 /* TSRandomWallpaperBrowseVC.swift */; };
+		A828E9432E03AF4E00E6A9EA /* TSAppUpdateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A828E9422E03AF4D00E6A9EA /* TSAppUpdateManager.swift */; };
 		A83946212D1D61D600ABFF0D /* TSRateUsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A83946202D1D61D400ABFF0D /* TSRateUsVC.swift */; };
 		A83946272D1D623800ABFF0D /* TSShareUsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A83946262D1D623800ABFF0D /* TSShareUsVC.swift */; };
 		A839462F2D1D64BF00ABFF0D /* TSAboutUsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A839462E2D1D64B300ABFF0D /* TSAboutUsVC.swift */; };
@@ -195,6 +196,7 @@
 		A81F5B5C2D1A905800740085 /* TSHomeDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSHomeDataModel.swift; sourceTree = "<group>"; };
 		A81F5B5E2D1A907B00740085 /* TSRandomWallpaperModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperModel.swift; sourceTree = "<group>"; };
 		A81F5B612D1AB17C00740085 /* TSRandomWallpaperBrowseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperBrowseVC.swift; sourceTree = "<group>"; };
+		A828E9422E03AF4D00E6A9EA /* TSAppUpdateManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSAppUpdateManager.swift; sourceTree = "<group>"; };
 		A83946202D1D61D400ABFF0D /* TSRateUsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRateUsVC.swift; sourceTree = "<group>"; };
 		A83946262D1D623800ABFF0D /* TSShareUsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSShareUsVC.swift; sourceTree = "<group>"; };
 		A839462E2D1D64B300ABFF0D /* TSAboutUsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSAboutUsVC.swift; sourceTree = "<group>"; };
@@ -593,6 +595,14 @@
 			path = TSRandomWallpaperBrowseVC;
 			sourceTree = "<group>";
 		};
+		A828E9412E03AF3200E6A9EA /* TSAppUpdateManager */ = {
+			isa = PBXGroup;
+			children = (
+				A828E9422E03AF4D00E6A9EA /* TSAppUpdateManager.swift */,
+			);
+			path = TSAppUpdateManager;
+			sourceTree = "<group>";
+		};
 		A839461C2D1D61A900ABFF0D /* VC */ = {
 			isa = PBXGroup;
 			children = (
@@ -692,6 +702,7 @@
 		A86857802DF81AC20089D222 /* Data */ = {
 			isa = PBXGroup;
 			children = (
+				A828E9412E03AF3200E6A9EA /* TSAppUpdateManager */,
 				A8EE92CC2DFFF2860077DFFD /* OperationQueue */,
 				A868578B2DF843F90089D222 /* TSRealmManager */,
 				A868577F2DF81AB90089D222 /* Model */,
@@ -1144,6 +1155,7 @@
 			files = (
 				A81CA4992D1652C400A3AAC8 /* TSMineVC.swift in Sources */,
 				A8C4C0EF2D27BFF7003C46FC /* TSNetworkTool.swift in Sources */,
+				A828E9432E03AF4E00E6A9EA /* TSAppUpdateManager.swift in Sources */,
 				A81CA46E2D156C7000A3AAC8 /* GlobalImports.swift in Sources */,
 				A8FD8F382DFBD660008CAACF /* TSMineTopView.swift in Sources */,
 				A81CA4832D157F5C00A3AAC8 /* UIImageView+Ex.swift in Sources */,
@@ -1313,7 +1325,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 3;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -1330,7 +1342,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.6.4;
+				MARKETING_VERSION = 3.6.5;
 				PRODUCT_BUNDLE_IDENTIFIER = musicplayer.offline.com;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1353,7 +1365,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 3;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -1370,7 +1382,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.6.4;
+				MARKETING_VERSION = 3.6.5;
 				PRODUCT_BUNDLE_IDENTIFIER = musicplayer.offline.com;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";

+ 7 - 1
TSLiveWallpaper/AppDelegate.swift

@@ -62,7 +62,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
     }
 
     func applicationWillEnterForeground(_ application: UIApplication) {
-   
+        checkAppConfig()
     }
 }
 
@@ -85,5 +85,11 @@ extension AppDelegate {
         cache.diskStorage.config.sizeLimit = 0          // 无大小限制
         KingfisherManager.shared.cache = cache
         
+        checkAppConfig()
+    }
+    
+    
+    func checkAppConfig() {
+        TSAppUpdateManager.checkAppConfig()
     }
 }

+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Mine/mine_cell_update.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "mine_cell_update@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "mine_cell_update@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
TSLiveWallpaper/Assets.xcassets/Mine/mine_cell_update.imageset/mine_cell_update@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Mine/mine_cell_update.imageset/mine_cell_update@3x.png


+ 16 - 10
TSLiveWallpaper/Business/BusinessView/TSImageIPanComparisonView.swift

@@ -7,7 +7,7 @@
 
 import UIKit
 
-class TSImageIPanComparisonView: UIView {
+class TSImageIPanComparisonView: UIView , UIGestureRecognizerDelegate{
     // MARK: - 属性
     let oldImageView = UIImageView()
     let newImageView = UIImageView()
@@ -57,23 +57,29 @@ class TSImageIPanComparisonView: UIView {
         }
 
         let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePan(_:)))
+        panGesture.delegate = self
         addGestureRecognizer(panGesture)
       
     }
-    
+    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer,
+                          shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
+        return true // 允许同时识别
+    }
     // 处理拖动手势
     @objc private func handlePan(_ gesture: UIPanGestureRecognizer) {
     
         // 获取手指在视图中的移动距离(相对起点)
         let translation = gesture.translation(in: self)
-        if translation.x > 0 {
-//            print("向右移动: \(translation.x) 像素")
-            lineX = min(lineX + translation.x, self.width-1)
-        } else if translation.x < 0 {
-            lineX = max(lineX + translation.x, 0)
-//            print("向左移动: \(translation.x) 像素")
-        }
-        gesture.setTranslation(.zero, in: self) // 重置位移
+        
+        // 只处理水平移动
+         if abs(translation.x) > abs(translation.y) {
+             if translation.x > 0 {
+                 lineX = min(lineX + translation.x, self.width-1)
+             } else if translation.x < 0 {
+                 lineX = max(lineX + translation.x, 0)
+             }
+             gesture.setTranslation(.zero, in: self)
+         }
     }
 
 

+ 22 - 20
TSLiveWallpaper/Business/TSAIListVC/TSAIListHistoryVC/TSAIListHistoryVC.swift

@@ -175,30 +175,32 @@ extension TSAIListHistoryVC: UICollectionViewDataSource ,UICollectionViewDelegat
     public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
 
         if let dbModel = listModelArray.safeObj(At:indexPath.row){
-            let vc = TSAIPhotoDetailsVC()
-            vc.infoModel = dbModel
-            vc.deleteBlock = { [weak self]  in
-                guard let self = self else { return }
-                removeDelete(index: indexPath.row)
-            }
-            kPresentModalVC(target: self, modelVC: vc)
-            
-//            var dataModelArray: [TSActionInfoModel] = []
-//            for itemModel in listModelArray {
-//                if itemModel.status == "success" || itemModel.modelType == .example {
-//                    dataModelArray.append(itemModel)
-//                }
-//            }
-//            
-//            let vc = TSAIPhotoDetailsBrowserVC()
-//            vc.currentIndex = indexPath.item
-//            vc.dataModelArray = dataModelArray
-//            vc.deleteBlock = { [weak self]  index in
+            //单个浏览
+//            let vc = TSAIPhotoDetailsVC()
+//            vc.infoModel = dbModel
+//            vc.deleteBlock = { [weak self]  in
 //                guard let self = self else { return }
-//                removeDelete(index: index)
+//                removeDelete(index: indexPath.row)
 //            }
 //            kPresentModalVC(target: self, modelVC: vc)
             
+            //多个浏览
+            var dataModelArray: [TSActionInfoModel] = []
+            for itemModel in listModelArray {
+                if itemModel.status == "success" || itemModel.modelType == .example {
+                    dataModelArray.append(itemModel)
+                }
+            }
+            
+            let vc = TSAIPhotoDetailsBrowserVC()
+            vc.currentIndex = indexPath.item
+            vc.dataModelArray = dataModelArray
+            vc.deleteBlock = { [weak self]  index in
+                guard let self = self else { return }
+                removeDelete(index: index)
+            }
+            kPresentModalVC(target: self, modelVC: vc)
+            
         }
     }
 }

+ 7 - 3
TSLiveWallpaper/Business/TSAIListVC/TSAIPhotoDetailsVC/TSAIPhotoDetailsBrowserVC.swift

@@ -91,7 +91,7 @@ class TSAIPhotoDetailsBrowserVC: TSBaseVC {
         DispatchQueue.main.async {
             self.collectionView.isHidden = false
             self.collectionView.reloadData()
-            self.collectionView.setContentOffset(CGPoint(x: CGFloat(self.currentIndex) * self.collectionView.frame.size.width, y: 0), animated: false)
+            self.collectionView.setContentOffset(CGPoint(x:0 , y:CGFloat(self.currentIndex) * self.collectionView.frame.size.height), animated: false)
 
             if let flowLayout = self.collectionView.collectionViewLayout as? UICollectionViewFlowLayout {
                 flowLayout.itemSize = self.collectionView.bounds.size
@@ -126,8 +126,12 @@ class TSAIPhotoDetailsBrowserVC: TSBaseVC {
             confirmColor: .white,
             cancelAction: { [weak self]  in
                 guard let self = self else { return }
+                dataModelArray.remove(at: currentIndex)
+                collectionView.deleteItems(at: [IndexPath(item: currentIndex, section: 0)])
                 self.deleteBlock?(currentIndex)
-                self.navBarClickLeftAction()
+                if dataModelArray.count <= 0 {
+                    self.navBarClickLeftAction()
+                }
             }
         ))
     }
@@ -145,7 +149,7 @@ extension TSAIPhotoDetailsBrowserVC:UICollectionViewDataSource,UICollectionViewD
     }
 
     private func resetIndexWithOffset(_ scrollView: UIScrollView) {
-        let item = Int((scrollView.contentOffset.x / scrollView.bounds.width).rounded())
+        let item = Int((scrollView.contentOffset.y / scrollView.bounds.height).rounded())
         currentIndex = item
     }
     

+ 19 - 9
TSLiveWallpaper/Business/TSMineVC/TSMineCell.swift

@@ -23,19 +23,21 @@ class TSMineCell: TSSimpleTableViewCell {
         return UIImageView.createRightArrow()
     }()
     
+    
+    lazy var dotView: UIView = {
+        let view = UIView()
+        view.backgroundColor = "#FF2B2B".uiColor
+        view.cornerRadius = 2
+        view.isHidden = true
+        return view
+    }()
+    
     override var itemModel:TSBasicItemModel{
         didSet{
             leftImageView.image = itemModel.leftImage
             leftLab.text = itemModel.leftTitle
             rightLab.text = itemModel.rightString
-            
-            if itemModel.rightIsHave {
-                rightImageView.isHidden = false
-                rightLab.isHidden = true
-            }else{
-                rightImageView.isHidden = true
-                rightLab.isHidden = false
-            }
+            dotView.isHidden = !itemModel.isWhether
         }
     }
     
@@ -45,6 +47,7 @@ class TSMineCell: TSSimpleTableViewCell {
         bgContentView.addSubview(leftLab)
         bgContentView.addSubview(rightLab)
         bgContentView.addSubview(rightImageView)
+        bgContentView.addSubview(dotView)
         
         leftImageView.snp.makeConstraints { make in
             make.leading.equalTo(16)
@@ -58,7 +61,7 @@ class TSMineCell: TSSimpleTableViewCell {
         }
         
         rightLab.snp.makeConstraints { make in
-            make.trailing.equalTo(-16)
+            make.trailing.equalTo(rightImageView.snp.leading).offset(-4)
             make.centerY.equalToSuperview()
         }
         
@@ -67,6 +70,13 @@ class TSMineCell: TSSimpleTableViewCell {
             make.centerY.equalToSuperview()
             make.width.height.equalTo(16)
         }
+        
+        dotView.snp.makeConstraints { make in
+            make.trailing.equalTo(rightLab.snp.leading).offset(-4)
+            make.centerY.equalToSuperview()
+            make.width.height.equalTo(4)
+        }
+        
     }
 
 }

+ 7 - 1
TSLiveWallpaper/Business/TSMineVC/TSMineVC.swift

@@ -43,9 +43,10 @@ class TSMineVC: TSBaseVC {
     }
 
     override func dealThings() {
+        NotificationCenter.default.addObserver(self, selector: #selector(refreshView), name: .kAppUpdateNotification, object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(updateVipView), name: .kPurchaseDidChanged, object: nil)
         updateVipView()
-        
+        refreshView()
     }
     
     @objc func updateVipView() {
@@ -54,4 +55,9 @@ class TSMineVC: TSBaseVC {
             self.simpleTableView.tableView.reloadData()
         }
     }
+    
+    @objc func refreshView() {
+        self.viewModel.updateItem.isWhether = TSAppUpdateManager.isNeedUpdate
+        self.simpleTableView.tableView.reloadData()
+    }
 }

+ 18 - 19
TSLiveWallpaper/Business/TSMineVC/TSMineVM.swift

@@ -103,26 +103,25 @@ class TSMineVM {
                     self.target.navigationController?.pushViewController(vc, animated: true)
                 }))
 
-
-
-        sectionModel.addSubItemModel(
-            createItemModel(
-                leftImage: .mineCellAbout,
-                leftTitle: "About us".localized,
-                rightString: appVersion(),
-                rightIsHave: false,
-                tapBlock: { [weak self] _, _, _ in
-                    guard let self = self else { return }
-                    #if DEBUG
-                        let vc = TSPurchaseVC()
-                        vc.hidesBottomBarWhenPushed = true
-                    kPresentModalVC(target: self.target, modelVC: vc)
-                    #endif
-
-                }))
-
+        sectionModel.addSubItemModel(updateItem)
         return dataArray
-
+    }()
+    
+    
+    lazy var updateItem: TSBasicItemModel = {
+        let itemModel = createItemModel(
+            leftImage: .mineCellUpdate,
+            leftTitle: "Update".localized,
+            rightString: appVersion(),
+            rightIsHave: true,
+            tapBlock: { [weak self] _, _, _ in
+                guard let self = self else { return }
+                if let url = URL(string: "https://apps.apple.com/app/id\(appid)"),
+                    UIApplication.shared.canOpenURL(url) {
+                    UIApplication.shared.open(url)
+                }
+            })
+        return itemModel
     }()
 }
 

+ 65 - 17
TSLiveWallpaper/Business/TSTabBarController/TSTabBarController.swift

@@ -32,9 +32,21 @@ class TSTabBarController: UITabBarController {
         delegate = self
         setUpData()
         createUI()
-      
+        monitorEvent()
     }
 
+    let dotSize:CGFloat = 6.0
+    lazy var appUpdateDotView: UIView = {
+        let bgView = UIView(frame: CGRect(x: 0, y: 0, width: dotSize, height: dotSize))
+        let view = UIView()
+        let backgroundColor = "#FF2B2B".uiColor
+        view.backgroundColor = backgroundColor
+        view.cornerRadius = dotSize/2.0
+        view.addShadow(shadowColor: backgroundColor.cgColor, shadowOffset: CGSizeMake(0, 0), shadowRadius: 4, shadowOpacity: 0.4)
+        bgView.addSubview(view)
+        return view
+    }()
+    
     @objc private func setUpData() {
         viewControllerArray = [
             "TSAIListVC",
@@ -94,7 +106,15 @@ class TSTabBarController: UITabBarController {
             make.height.equalTo(2)
         }
     }
-
+    
+    func monitorEvent(){
+        refreshView()
+        NotificationCenter.default.addObserver(self, selector: #selector(refreshView), name: .kAppUpdateNotification, object: nil)
+    }
+    
+    @objc func refreshView() {
+        showRedDotOnLastItem(show: TSAppUpdateManager.tabbarDotShow == 1)
+    }
     deinit {
         debugPrint("TSTabBarController deinit")
         NotificationCenter.default.removeObserver(self)
@@ -102,19 +122,6 @@ class TSTabBarController: UITabBarController {
 
 }
 extension TSTabBarController {
-    
-    func changeSelectedIndex(index:Int){
-        self.selectedIndex = index
-        updateMarkViewFrame()
-    }
-    
-    func updateMarkViewFrame() {
-        markView.snp.updateConstraints { make in
-            make.leading.equalTo(CGFloat(selectedIndex) * markWidth)
-        }
-    }
-    
-    
     private func tabBarItem(title: String, image: UIImage?, selectedImage: UIImage?, tag: Int) -> UITabBarItem {
         let tabBarItem = UITabBarItem()
         tabBarItem.image = image?.withRenderingMode(.alwaysOriginal).mirrored
@@ -122,16 +129,57 @@ extension TSTabBarController {
         tabBarItem.imageInsets = UIEdgeInsets(top: 0, left: 0, bottom: -8, right: 0) // 向下移动图标
         return tabBarItem
     }
-
 }
 extension TSTabBarController: UITabBarControllerDelegate {
     func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
         updateMarkViewFrame()
+        
+        if let viewControllers = viewControllers {
+            if selectedIndex == viewControllers.count-1 {
+                TSAppUpdateManager.tabbarDotShow = 2
+                showRedDotOnLastItem(show: false)
+            }
+        }
     }
 }
 
+extension TSTabBarController {
+    func showRedDotOnLastItem(show: Bool) {
+        guard let items = tabBar.items, !items.isEmpty else { return }
+        if show {
+            addRedDotToLastTab()
+        } else {
+            appUpdateDotView.removeFromSuperview()
+        }
+    }
+    
+    func addRedDotToLastTab() {
+        guard let items = tabBar.items,
+              !items.isEmpty else { return }
+        
+        appUpdateDotView.removeFromSuperview()
+        
+        let lastItemIndex = items.count - 1
+        let itemWidth = tabBar.frame.width / CGFloat(items.count)
+        let xPosition = itemWidth * CGFloat(lastItemIndex) + itemWidth/2 + (dotSize * 2) + 2
+        let yPosition: CGFloat = 10
+        appUpdateDotView.frame = CGRect(x: xPosition, y: yPosition, width: dotSize, height: dotSize)
+        tabBar.addSubview(appUpdateDotView)
+    }
+    
+    func changeSelectedIndex(index:Int){
+        self.selectedIndex = index
+        updateMarkViewFrame()
+    }
+    
+    func updateMarkViewFrame() {
+        markView.snp.updateConstraints { make in
+            make.leading.equalTo(CGFloat(selectedIndex) * markWidth)
+        }
+    }
+    
+}
 
-// MARK: 进到首页后需要做的处理
 
 extension TSTabBarController {
     /// 暂时没用,后续迭代

+ 2 - 2
TSLiveWallpaper/Common/TSNetWork/TSNetWork+Business.swift

@@ -20,8 +20,8 @@ enum TSNeURLType:String {
 //    case imageToImageStyle = "/api/ops/aichat-img2img-config"     //图生图 风格列表
 //    case chatV2 = "/api/text/chat/v2"             //AI 对话接口V2,扩展了 DeepSeek 深度思考
 //    
-//    case config = "/api/ops/aichat-config"       //App配置
-//    
+    case config = "/api/ops/old-photo-config"       //App配置
+//
 //    case changeAge = "/api/image/change-age"       //换年龄
 //    case subscriptionApple = "/api/subscription/apple"       //苹果订阅
 //    case changeEmotion = "/api/image/change-emotion"       //更换表情

+ 44 - 0
TSLiveWallpaper/Data/TSAppUpdateManager/TSAppUpdateManager.swift

@@ -0,0 +1,44 @@
+//
+//  TSAppUpdateManager.swift
+//  TSLiveWallpaper
+//
+//  Created by 100Years on 2025/6/18.
+//
+
+
+public extension Notification.Name {
+    static let kAppUpdateNotification = Notification.Name("kAppUpdateNotification")
+}
+
+class TSAppUpdateManager {
+
+    static var newVerison:String = ""
+    static var isNeedUpdate:Bool = false
+    
+    static var tabbarDotShow:Int = 0 //0,无需显示,1 需要显示,2 显示后隐藏
+    
+    
+    static func checkAppConfig() {
+        _ = TSNetworkShared.get(urlType: .config) { data, _ in
+            if let result = kNetWorkResultSuccess(data: data) {
+                newVerison = result.safeString(forKey: "version")
+                dePrint("checkAppConfig 刷新版本号refreshView = \(newVerison),appShortVersion=\(appShortVersion())")
+                if UIApplication.compareAppVersions(newVersion1: newVerison, oldVersion: appShortVersion()) == .newer {
+                    isNeedUpdate = true
+                }else{
+                    isNeedUpdate = false
+                }
+                
+                if isNeedUpdate,tabbarDotShow != 2 {
+                    tabbarDotShow = 1
+                }
+            }
+            kMainAsync{
+                NotificationCenter.default.post(name: .kAppUpdateNotification, object: nil)
+            }
+            
+        }
+    }
+    
+    
+}