소스 검색

fix:3.4(2) 修改 bug

100Years 2 달 전
부모
커밋
ec28637b2a
33개의 변경된 파일45개의 추가작업 그리고 79개의 파일을 삭제
  1. 2 2
      TSLiveWallpaper.xcodeproj/project.pbxproj
  2. BIN
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_1.imageset/ailist_example_image_new_1@2x.png
  3. BIN
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_1.imageset/ailist_example_image_new_1@3x.png
  4. 0 22
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_2.imageset/Contents.json
  5. BIN
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_2.imageset/ailist_example_image_new_2@2x.png
  6. BIN
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_2.imageset/ailist_example_image_new_2@3x.png
  7. 1 0
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_1.imageset/Contents.json
  8. 0 0
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_1.imageset/ailist_example_image_old_1@2x.png
  9. 0 22
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_2.imageset/Contents.json
  10. BIN
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_2.imageset/ailist_example_image_old_2@2x.png
  11. BIN
      TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_2.imageset/ailist_example_image_old_2@3x.png
  12. BIN
      TSLiveWallpaper/Assets.xcassets/Common/navi_back_white.imageset/navi_back_white@2x.png
  13. BIN
      TSLiveWallpaper/Assets.xcassets/Common/navi_back_white.imageset/navi_back_white@3x.png
  14. BIN
      TSLiveWallpaper/Assets.xcassets/Music/.DS_Store
  15. 2 2
      TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/Contents.json
  16. BIN
      TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close-24@2x.png
  17. BIN
      TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close-24@3x.png
  18. BIN
      TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close@2x.png
  19. BIN
      TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close@3x.png
  20. 2 1
      TSLiveWallpaper/Assets.xcassets/Tabbar/tabbar_unSelect_allist.imageset/Contents.json
  21. BIN
      TSLiveWallpaper/Assets.xcassets/Tabbar/tabbar_unSelect_allist.imageset/tabbar_unSelect_allist@2x.png
  22. BIN
      TSLiveWallpaper/Assets.xcassets/Tabbar/tabbar_unSelect_allist.imageset/tabbar_unSelect_allist@3x.png
  23. 1 1
      TSLiveWallpaper/Business/BusinessView/TSGeneratorloadingView/TSGeneratorErrorView.swift
  24. 2 2
      TSLiveWallpaper/Business/BusinessView/TSPageNullView.swift
  25. 1 0
      TSLiveWallpaper/Business/TSAIListVC/TSAIAgeImageHintVC/TSAIListHintBaseVC.swift
  26. 1 0
      TSLiveWallpaper/Business/TSAIListVC/TSAIListVC/TSAIListVC.swift
  27. 1 1
      TSLiveWallpaper/Business/TSAIListVC/TSAIPhotoDetailsVC/View/TSImageIPanComparisonView.swift
  28. 19 11
      TSLiveWallpaper/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift
  29. 1 1
      TSLiveWallpaper/Business/TSTabBarController/TSTabBarController.swift
  30. 3 3
      TSLiveWallpaper/Common/Purchase/TSPurchaseBusiness.swift
  31. 6 7
      TSLiveWallpaper/Common/TSNetWork/TSNetworkManager.swift
  32. 3 3
      TSLiveWallpaper/Common/ViewTool/TSPhotoPickerManager/TSPhotoPickerManager.swift
  33. 0 1
      TSLiveWallpaper/Data/TSDBManager/TSDBManager.swift

+ 2 - 2
TSLiveWallpaper.xcodeproj/project.pbxproj

@@ -1644,7 +1644,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -1684,7 +1684,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;

BIN
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_1.imageset/ailist_example_image_new_1@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_1.imageset/ailist_example_image_new_1@3x.png


+ 0 - 22
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_2.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_2.imageset/ailist_example_image_new_2@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_new_2.imageset/ailist_example_image_new_2@3x.png


+ 1 - 0
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_1.imageset/Contents.json

@@ -5,6 +5,7 @@
       "scale" : "1x"
     },
     {
+      "filename" : "ailist_example_image_old_1@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },

+ 0 - 0
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_1png.imageset/ailist_example_image_old_1@2xpng.png → TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_1.imageset/ailist_example_image_old_1@2x.png


+ 0 - 22
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_2.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_2.imageset/ailist_example_image_old_2@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_2.imageset/ailist_example_image_old_2@3x.png


BIN
TSLiveWallpaper/Assets.xcassets/Common/navi_back_white.imageset/navi_back_white@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Common/navi_back_white.imageset/navi_back_white@3x.png


BIN
TSLiveWallpaper/Assets.xcassets/Music/.DS_Store


+ 2 - 2
TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "ic-close-24@2x.png",
+      "filename" : "ic-close@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "ic-close-24@3x.png",
+      "filename" : "ic-close@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close-24@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close-24@3x.png


BIN
TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Music/ic-close.imageset/ic-close@3x.png


+ 2 - 1
TSLiveWallpaper/Assets.xcassets/AIList/example/ailist_example_image_old_1png.imageset/Contents.json → TSLiveWallpaper/Assets.xcassets/Tabbar/tabbar_unSelect_allist.imageset/Contents.json

@@ -5,11 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "ailist_example_image_old_1@2xpng.png",
+      "filename" : "tabbar_unSelect_allist@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
+      "filename" : "tabbar_unSelect_allist@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
TSLiveWallpaper/Assets.xcassets/Tabbar/tabbar_unSelect_allist.imageset/tabbar_unSelect_allist@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Tabbar/tabbar_unSelect_allist.imageset/tabbar_unSelect_allist@3x.png


+ 1 - 1
TSLiveWallpaper/Business/BusinessView/TSGeneratorloadingView/TSGeneratorErrorView.swift

@@ -42,7 +42,7 @@ class TSGeneratorErrorView: TSBaseView {
     }()
     
     lazy var submitBtn: UIButton = {
-        let btn = UIButton.createButton(title: "Generate in the background".localized,backgroundImage: kSubmitBtnNormalbg,font: .font(size: 16),titleColor: "#111111".uiColor,corner: 24)
+        let btn = UIButton.createButton(title: "Generate in the background".localized,backgroundImage: kSubmitBtnNormalbg,font: .font(size: 14,weight: .medium),titleColor: UIColor.themeColor,corner: 24)
         btn.titleLabel?.adjustsFontSizeToFitWidth = true
         btn.layer.borderColor = (UIColor.themeColor).cgColor
         btn.layer.borderWidth = 1.0

+ 2 - 2
TSLiveWallpaper/Business/BusinessView/TSPageNullView.swift

@@ -13,7 +13,7 @@ class TSPageNullView: TSBaseView {
     }()
     
     lazy var titleLabel: UILabel = {
-        let titleLabel = UILabel.createLabel(text:"There's nothing here yet".localized ,font:.font(size: 14.0),textColor: .white,textAlignment: .center,numberOfLines: 0)
+        let titleLabel = UILabel.createLabel(text:"There's nothing here yet".localized ,font:.font(size: 14.0),textColor: .white.withAlphaComponent(0.6),textAlignment: .center,numberOfLines: 0)
         return titleLabel
     }()
     
@@ -32,7 +32,7 @@ class TSPageNullView: TSBaseView {
 
         contentView.addSubview(titleLabel)
         titleLabel.snp.makeConstraints { make in
-            make.top.equalTo(imageView.snp.bottom)
+            make.top.equalTo(imageView.snp.bottom).offset(16.0)
             make.leading.equalTo(16)
             make.trailing.equalTo(-16)
             make.height.equalTo(20)

+ 1 - 0
TSLiveWallpaper/Business/TSAIListVC/TSAIAgeImageHintVC/TSAIListHintBaseVC.swift

@@ -130,6 +130,7 @@ class TSAIListHintBaseVC: TSBaseVC {
     }
     
     @objc func clickView() {
+        PlayerManager.shared.miniBar.isHidden = false
         dismiss(animated: true)
     }
     

+ 1 - 0
TSLiveWallpaper/Business/TSAIListVC/TSAIListVC/TSAIListVC.swift

@@ -240,6 +240,7 @@ extension TSAIListVC{
                 self.hintBaseVC.dismissPageVC()
             }
         }
+        PlayerManager.shared.miniBar.isHidden = true
         kPresentModalVC(target: self, modelVC: hintBaseVC,transitionStyle: .crossDissolve)
     }
     

+ 1 - 1
TSLiveWallpaper/Business/TSAIListVC/TSAIPhotoDetailsVC/View/TSImageIPanComparisonView.swift

@@ -68,7 +68,7 @@ class TSImageIPanComparisonView: UIView {
         let translation = gesture.translation(in: self)
         if translation.x > 0 {
             print("向右移动: \(translation.x) 像素")
-            lineX = min(lineX + translation.x, self.width)
+            lineX = min(lineX + translation.x, self.width-1)
         } else if translation.x < 0 {
             lineX = max(lineX + translation.x, 0)
             print("向左移动: \(translation.x) 像素")

+ 19 - 11
TSLiveWallpaper/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift

@@ -10,7 +10,7 @@ import SwiftUI
 
 class PurchaseViewModel : ObservableObject{
     
-    @Published var selectedType: PremiumPeriod = .lifetime
+    @Published var selectedType: PremiumPeriod = .year//.lifetime
     
     /// 订阅publisher
     let buyPublisher  = PassthroughSubject<Bool,Never>()
@@ -240,17 +240,25 @@ struct PurchaseView :View {
             
             
             VStack(spacing: 12) {
-                PurchaseItemView(title: "Lifetime", type: .lifetime, selectedType: $viewModel.selectedType).onTapGesture {
-                    viewModel.selectedType = .lifetime
+//                PurchaseItemView(title: "Lifetime", type: .lifetime, selectedType: $viewModel.selectedType).onTapGesture {
+//                    viewModel.selectedType = .lifetime
+//                }
+//                HStack {
+//                    PurchaseItemView(title: "Yearly", type: .year, selectedType: $viewModel.selectedType).onTapGesture {
+//                        viewModel.selectedType = .year
+//                    }
+//                    
+//                    PurchaseItemView(title: "Monthly", type: .month, selectedType: $viewModel.selectedType).onTapGesture {
+//                        viewModel.selectedType = .month
+//                    }
+//                }
+                
+                PurchaseItemView(title: "Yearly", type: .year, selectedType: $viewModel.selectedType).onTapGesture {
+                    viewModel.selectedType = .year
                 }
-                HStack {
-                    PurchaseItemView(title: "Yearly", type: .year, selectedType: $viewModel.selectedType).onTapGesture {
-                        viewModel.selectedType = .year
-                    }
-                    
-                    PurchaseItemView(title: "Monthly", type: .month, selectedType: $viewModel.selectedType).onTapGesture {
-                        viewModel.selectedType = .month
-                    }
+                
+                PurchaseItemView(title: "Monthly", type: .month, selectedType: $viewModel.selectedType).onTapGesture {
+                    viewModel.selectedType = .month
                 }
                 
                 Button {

+ 1 - 1
TSLiveWallpaper/Business/TSTabBarController/TSTabBarController.swift

@@ -76,7 +76,7 @@ class TSTabBarController: UITabBarController {
         unselectedImageArray = [
             "tabbar_unSelect_music",
             "tabbar_unSelect_playlist",
-            "tabbar_unSelect_random",
+            "tabbar_unSelect_allist",
             "tabbar_unSelect_mine",
         ]
 

+ 3 - 3
TSLiveWallpaper/Common/Purchase/TSPurchaseBusiness.swift

@@ -26,9 +26,9 @@ class TSPurchaseBusiness {
     }
     
     var isVip:Bool{
-//#if DEBUG
-//        return true
-//#endif
+#if DEBUG
+        return true
+#endif
         return PurchaseManager.default.isVip
     }
     

+ 6 - 7
TSLiveWallpaper/Common/TSNetWork/TSNetworkManager.swift

@@ -26,13 +26,12 @@ class TSNetworkManager {
     }
     
     lazy var afSession: Session = {
-//        let configuration = URLSessionConfiguration.af.default
-//        configuration.timeoutIntervalForRequest = 15  // 请求超时时间(秒)
-//        configuration.timeoutIntervalForResource = 30 // 资源超时时间(秒)
-//        let session = Session(configuration: configuration)
-//        return session
-        
-        return AF
+        let configuration = URLSessionConfiguration.af.default
+        configuration.timeoutIntervalForRequest = 30  // 请求超时时间(秒)
+        configuration.timeoutIntervalForResource = 30 // 资源超时时间(秒)
+        let session = Session(configuration: configuration)
+        return session
+//        return AF
     }()
     lazy var encoder: JSONEncoding = {
         return JSONEncoding(options: .withoutEscapingSlashes)// 关键:禁用斜杠转义

+ 3 - 3
TSLiveWallpaper/Common/ViewTool/TSPhotoPickerManager/TSPhotoPickerManager.swift

@@ -65,7 +65,9 @@ class TSPhotoPickerManager: NSObject {
         if #available(iOS 13.0, *) {
             imagePicker.overrideUserInterfaceStyle = .dark
         }
-        viewController?.present(imagePicker, animated: true, completion: nil)
+        viewController?.present(imagePicker, animated: true){
+            TSToastShared.hideLoading()
+        }
     }
     
     /// 显示权限提示
@@ -92,7 +94,6 @@ class TSPhotoPickerManager: NSObject {
 // MARK: - UIImagePickerControllerDelegate & UINavigationControllerDelegate (iOS 14 以下)
 extension TSPhotoPickerManager: UIImagePickerControllerDelegate, UINavigationControllerDelegate {
     func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
-        TSToastShared.hideLoading()
 //        picker.dismiss(animated: true) {
             if let image = info[.originalImage] as? UIImage {
                 self.completionHandler?(image,info[.phAsset] as? PHAsset )
@@ -108,7 +109,6 @@ extension TSPhotoPickerManager: UIImagePickerControllerDelegate, UINavigationCon
     }
     
     func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
-        TSToastShared.hideLoading()
 //        self.completionHandler?(nil,nil)
 //        if completionSizeHandler == nil {
             picker.dismiss(animated: true, completion: nil)

+ 0 - 1
TSLiveWallpaper/Data/TSDBManager/TSDBManager.swift

@@ -156,7 +156,6 @@ extension TSRealmManager {
         if history.listModels.count == 0,UserDefaults.standard.string(forKey: "insertAIListExampleData") == nil {
             let id = Date.timestampInt
             history.updateDatas([
-                createExampleModel(id:id, oldImageName: "ailist_example_image_old_2", newImageName: "ailist_example_image_new_2"),
                 createExampleModel(id:id+1, oldImageName: "ailist_example_image_old_1", newImageName: "ailist_example_image_new_1"),
                 createExampleModel(id:id+2, oldImageName: "ailist_example_image_old_0", newImageName: "ailist_example_image_new_0")
             ])