Răsfoiți Sursa

feat:开完完了ai 商量首页和上传照片页面

100Years 2 luni în urmă
părinte
comite
33dc6800ad
40 a modificat fișierele cu 299 adăugiri și 248 ștergeri
  1. 6 6
      Podfile.lock
  2. 4 0
      TSLiveWallpaper/AppDelegate.swift
  3. 22 0
      TSLiveWallpaper/Assets.xcassets/Common/submit_btn_bg.imageset/Contents.json
  4. BIN
      TSLiveWallpaper/Assets.xcassets/Common/submit_btn_bg.imageset/submit_btn_bg@2x.png
  5. BIN
      TSLiveWallpaper/Assets.xcassets/Common/submit_btn_bg.imageset/submit_btn_bg@3x.png
  6. 22 0
      TSLiveWallpaper/Assets.xcassets/Common/submit_btn_dis_bg.imageset/Contents.json
  7. BIN
      TSLiveWallpaper/Assets.xcassets/Common/submit_btn_dis_bg.imageset/submit_btn_dis_bg@2x.png
  8. BIN
      TSLiveWallpaper/Assets.xcassets/Common/submit_btn_dis_bg.imageset/submit_btn_dis_bg@3x.png
  9. 6 0
      TSLiveWallpaper/Assets.xcassets/Hint/Contents.json
  10. 22 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_bad.imageset/Contents.json
  11. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_bad.imageset/hint_Colorize_bad@2x.png
  12. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_bad.imageset/hint_Colorize_bad@3x.png
  13. 22 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_good.imageset/Contents.json
  14. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_good.imageset/hint_Colorize_good 3@2x.png
  15. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_good.imageset/hint_Colorize_good@3x.png
  16. 22 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_bad.imageset/Contents.json
  17. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_bad.imageset/hint_Descratch_bad@2x.png
  18. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_bad.imageset/hint_Descratch_bad@3x.png
  19. 22 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_good.imageset/Contents.json
  20. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_good.imageset/hint_Descratch_good@2x.png
  21. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_good.imageset/hint_Descratch_good@3x.png
  22. 22 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_bad.imageset/Contents.json
  23. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_bad.imageset/hint_Enhance_bad@2x.png
  24. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_bad.imageset/hint_Enhance_bad@3x.png
  25. 22 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_good.imageset/Contents.json
  26. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_good.imageset/hint_Enhance_good@2x.png
  27. BIN
      TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_good.imageset/hint_Enhance_good@3x.png
  28. 0 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_image.imageset/Contents.json
  29. 0 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_image.imageset/hint_image@2x.png
  30. 0 0
      TSLiveWallpaper/Assets.xcassets/Hint/hint_image.imageset/hint_image@3x.png
  31. 1 1
      TSLiveWallpaper/Business/BusinessView/TSView.swift
  32. 34 49
      TSLiveWallpaper/Business/TSAIListVC/TSAIAgeImageHintVC/TSAIListHintBaseVC.swift
  33. 23 101
      TSLiveWallpaper/Business/TSAIListVC/TSAIList+Enmu.swift
  34. 16 39
      TSLiveWallpaper/Business/TSAIListVC/TSAIListVC/TSAIListVC.swift
  35. 25 48
      TSLiveWallpaper/Business/TSAIListVC/TSAIUploadPhotoVC/TSAIUploadPhotoVC.swift
  36. 1 1
      TSLiveWallpaper/Business/TSMusic/OC/IJKPlayer/Core/SJIJKMediaPlayer.m
  37. 1 1
      TSLiveWallpaper/Business/TSMusic/OC/IJKPlayer/SJIJKMediaPlaybackController.m
  38. 4 0
      TSLiveWallpaper/Business/TSTabBarController/TSTabBarController.swift
  39. 1 1
      TSLiveWallpaper/DataManger/Config/TSConfig.swift
  40. 1 1
      TSLiveWallpaper/LaunchVC/TSLaunchVC.swift

+ 6 - 6
Podfile.lock

@@ -22,7 +22,7 @@ PODS:
   - Google-Mobile-Ads-SDK (11.12.0):
     - GoogleUserMessagingPlatform (>= 1.1)
   - GoogleUserMessagingPlatform (2.7.0)
-  - IJKMediaPlayerKit (0.11.8)
+  - IJKMediaFramework (0.8.9)
   - Kingfisher (7.10.0)
   - KLExtension (0.1.0)
   - KLTips (0.1.0)
@@ -130,7 +130,7 @@ DEPENDENCIES:
   - BetterSegmentedControl (~> 2.0)
   - DynamicBlurView
   - Google-Mobile-Ads-SDK
-  - IJKMediaPlayerKit (from `https://github.com/debugly/ijkplayer/releases/download/k0.11.8/IJKMediaPlayerKit.spec.json`)
+  - IJKMediaFramework (from `https://github.com/debugly/ijkplayer/releases/download/k0.8.9/IJKMediaFramework.spec.json`)
   - Kingfisher (= 7.10.0)
   - KLExtension (from `https://gitee.com/WanlanNeel/klextension.git`)
   - KLTips (from `https://gitee.com/WanlanNeel/kltips.git`)
@@ -174,8 +174,8 @@ SPEC REPOS:
 EXTERNAL SOURCES:
   ADManager:
     :path: "../TSCoacopods/ADManager"
-  IJKMediaPlayerKit:
-    :podspec: https://github.com/debugly/ijkplayer/releases/download/k0.11.8/IJKMediaPlayerKit.spec.json
+  IJKMediaFramework:
+    :podspec: https://github.com/debugly/ijkplayer/releases/download/k0.8.9/IJKMediaFramework.spec.json
   KLExtension:
     :git: https://gitee.com/WanlanNeel/klextension.git
   KLTips:
@@ -205,7 +205,7 @@ SPEC CHECKSUMS:
   DynamicBlurView: b57e2f6aa33f85b2bcca272265162a3c7c5cc499
   Google-Mobile-Ads-SDK: 3a76704456669fbed2057efc8bdb99050ad0e3fb
   GoogleUserMessagingPlatform: a8b56893477f67212fbc8411c139e61d463349f5
-  IJKMediaPlayerKit: 3444702ec61bc649e7e81a9c0e19fda661bef1ce
+  IJKMediaFramework: aa80bbca8d5443171b2c4d5cc025cc013b2172e3
   Kingfisher: a18f05d3b6d37d8650ee4a3e61d57a28fc6207f6
   KLExtension: f8b2a92125ad4bbfc8920ed5e7269aefcdcaa0b3
   KLTips: 5cf05efac78b9c813887460bebbf436582b20536
@@ -227,6 +227,6 @@ SPEC CHECKSUMS:
   TZImagePickerController: d084a7b97c82d387e7669dd86dc9a9057500aacf
   YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
 
-PODFILE CHECKSUM: b7c5415af3c54aa76934a2ac2f496e7d2666cd06
+PODFILE CHECKSUM: 7dff27c79ea0729b06502a9fcaa752e3e0e3b159
 
 COCOAPODS: 1.16.2

+ 4 - 0
TSLiveWallpaper/AppDelegate.swift

@@ -22,6 +22,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
         window?.makeKeyAndVisible()
         goToLoadVC()
         initBaseDatas()
+        initPlatform()
         downloadNotifaction()
         return true
     }
@@ -109,4 +110,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 }
 
 extension AppDelegate {
+    func initPlatform() {
+        TSColorConfigShared.naviMianTextColor = .white
+    }
 }

+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Common/submit_btn_bg.imageset/Contents.json

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

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


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


+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Common/submit_btn_dis_bg.imageset/Contents.json

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

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


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


+ 6 - 0
TSLiveWallpaper/Assets.xcassets/Hint/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_bad.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_bad.imageset/hint_Colorize_bad@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_bad.imageset/hint_Colorize_bad@3x.png


+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_good.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_good.imageset/hint_Colorize_good 3@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Colorize_good.imageset/hint_Colorize_good@3x.png


+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_bad.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_bad.imageset/hint_Descratch_bad@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_bad.imageset/hint_Descratch_bad@3x.png


+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_good.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_good.imageset/hint_Descratch_good@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Descratch_good.imageset/hint_Descratch_good@3x.png


+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_bad.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_bad.imageset/hint_Enhance_bad@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_bad.imageset/hint_Enhance_bad@3x.png


+ 22 - 0
TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_good.imageset/Contents.json

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

BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_good.imageset/hint_Enhance_good@2x.png


BIN
TSLiveWallpaper/Assets.xcassets/Hint/hint_Enhance_good.imageset/hint_Enhance_good@3x.png


+ 0 - 0
TSLiveWallpaper/Assets.xcassets/AIList/hint_image.imageset/Contents.json → TSLiveWallpaper/Assets.xcassets/Hint/hint_image.imageset/Contents.json


+ 0 - 0
TSLiveWallpaper/Assets.xcassets/AIList/hint_image.imageset/hint_image@2x.png → TSLiveWallpaper/Assets.xcassets/Hint/hint_image.imageset/hint_image@2x.png


+ 0 - 0
TSLiveWallpaper/Assets.xcassets/AIList/hint_image.imageset/hint_image@3x.png → TSLiveWallpaper/Assets.xcassets/Hint/hint_image.imageset/hint_image@3x.png


+ 1 - 1
TSLiveWallpaper/Business/BusinessView/TSView.swift

@@ -22,7 +22,7 @@ func createBlurEffectView(style:UIBlurEffect.Style,backgroundColor:UIColor? = ni
 
 //常用提交按钮
 func kCreateNormalSubmitBtn(title:String, action: (() -> Void)? = nil) -> UIButton {
-    let btn = UIButton.createButton(title:title,font: UIFont.font(size: 16,weight: .medium),titleColor:.black,corner: 30,action: action)
+    let btn = UIButton.createButton(title:title,font: UIFont.font(name: .ZillaSlabBold,size: 16,weight: .bold),titleColor:.black,corner: 0,action: action)
     
     var buttonBgImage = UIImage(named: "submit_btn_bg")!
     buttonBgImage = buttonBgImage.resizableImage(withCapInsets: UIEdgeInsets(top:24, left: 24, bottom: 24, right: 24), resizingMode: .stretch)

+ 34 - 49
TSLiveWallpaper/Business/TSAIListVC/TSAIAgeImageHintVC/TSAIListHintBaseVC.swift

@@ -36,63 +36,51 @@ class TSAIListHintBaseVC: TSBaseVC {
             self.badInfoText = badInfoText
         }
         
-        static func getDefaultConfig(imageMaxBitSize:Int) -> Config {
-            var config = defaultConfig
-            config.imageMaxBitSize = imageMaxBitSize
-            return config
-        }
-        
-        static var defaultConfig:Config {
-            return Config(imageMaxBitSize: kUploadImageMaxBit10Size,
-                          goodImageNamed: "ptp_goodImage",
-                          badImageNamed: "ptp_badImage",
-                          titleText: "Upload your photos".localized,
-                          titleSubText: "",
-                          goodText: "Good photo examples".localized,
-                          goodInfoText: "Fully clear and visible face, in good lighting".localized,
-                          badText: "Bad photo examples".localized,
-                          badInfoText: "Group photos, covered faces, nudes".localized)
-        }
+//        static func getDefaultConfig(imageMaxBitSize:Int) -> Config {
+//            var config = defaultConfig
+//            config.imageMaxBitSize = imageMaxBitSize
+//            return config
+//        }
         
-        static var changeHairConfig:Config {
+        static var enhanceConfig:Config {
             return Config(imageMaxBitSize: kUploadImageMaxBit5Size,
-                          goodImageNamed: "ptp_hair_goodImage",
-                          badImageNamed: "ptp_hair_badImage",
-                          titleText: "Upload your photos".localized,
+                          goodImageNamed: "hint_Enhance_good",
+                          badImageNamed: "hint_Enhance_bad",
+                          titleText: "Enhance Tips".localized,
                           titleSubText: "",
-                          goodText: "Good photo examples".localized,
-                          goodInfoText: "Obvious hairstyle, Fully clear and visible face".localized,
-                          badText: "Bad photo examples".localized,
-                          badInfoText: "Group photos, covered faces, skinhead".localized)
+                          goodText: "Suitable".localized,
+                          goodInfoText: "Portraits, Low-resolution and photos, faces should be visible".localized,
+                          badText: "Unsuitable".localized,
+                          badInfoText: "High resulotion, Severaly damaged and Difficult to recognize the face".localized)
         }
         
-        static var catTohumanConfig:Config {
+        static var colorizeConfig:Config {
             return Config(imageMaxBitSize: kUploadImageMaxBit10Size,
-                          goodImageNamed: "ptp_catTohuman_goodImage",
-                          badImageNamed: "ptp_catTohuman_badImage",
-                          titleText: "Upload your photos".localized,
+                          goodImageNamed: "hint_Colorize_good",
+                          badImageNamed: "hint_Colorize_bad",
+                          titleText: "Colorize Tips".localized,
                           titleSubText: "",
-                          goodText: "Good photo examples".localized,
-                          goodInfoText: "Select pet photos with clear faces".localized,
-                          badText: "Bad photo examples".localized,
-                          badInfoText: "No clear faces or group shots".localized)
+                          goodText: "Suitable".localized,
+                          goodInfoText: "Clear outline black-and-white photos".localized,
+                          badText: "Unsuitable".localized,
+                          badInfoText: "Colorful or Severely damaged photos".localized)
         }
         
         
-        static var futureBabyConfig:Config {
+        static var descratchConfig:Config {
             return Config(imageMaxBitSize: kUploadImageMaxBit10Size,
-                          goodImageNamed: "ptp_futureBaby_goodImage",
-                          badImageNamed: "ptp_badImage",
-                          titleText: "Upload your photos".localized,
+                          goodImageNamed: "hint_Descratch_good",
+                          badImageNamed: "hint_Descratch_bad",
+                          titleText: "Descratch Tips".localized,
                           titleSubText: "",
-                          goodText: "Good photo examples".localized,
-                          goodInfoText: "Fully clear and visible face, in good lighting".localized,
-                          badText: "Bad photo examples".localized,
-                          badInfoText: "Group photos, covered faces, nudes".localized)
+                          goodText: "Suitable".localized,
+                          goodInfoText: "Scratched and Damaged photos".localized,
+                          badText: "Unsuitable".localized,
+                          badInfoText: "High-resolution, Not damaged, and Clear photos".localized)
         }
     }
     
-    var config:Config = Config.defaultConfig
+    var config:Config = Config.enhanceConfig
     init(config: Config, clickUpImageHandle: ((UIImage?) -> Void)? = nil) {
         self.config = config
         self.clickUpImageHandle = clickUpImageHandle
@@ -120,14 +108,13 @@ class TSAIListHintBaseVC: TSBaseVC {
             guard let self = self else { return }
             pickSinglePhoto()
         }
-        submitBtn.cornerRadius = 24.0
         return submitBtn
     }()
     
     override func createView() {
         addNormalNavBarView()
         _ = setNavigationItem("", imageName: "ic-close", direction: .right, action: #selector(clickView))
-        view.backgroundColor = .black.withAlphaComponent(0.7)
+        view.backgroundColor = .mainBg
      
         contentView.addSubview(popupContentView)
         popupContentView.center = view.center
@@ -150,11 +137,11 @@ class TSAIListHintBaseVC: TSBaseVC {
     func setUpUI(){
 
         let iconImageView:UIImageView = UIImageView.createImageView(image: .hint)
-        iconImageView.addSubview(iconImageView)
+        popupContentView.addSubview(iconImageView)
         iconImageView.snp.makeConstraints { make in
             make.top.equalTo(16)
-            make.leading.equalTo(32)
-            make.trailing.equalTo(-32)
+            make.leading.equalTo(0)
+            make.width.height.equalTo(40)
         }
         
        let fullText = config.titleText+config.titleSubText
@@ -169,7 +156,6 @@ class TSAIListHintBaseVC: TSBaseVC {
         titleLabel.snp.makeConstraints { make in
             make.leading.equalTo(0)
             make.top.equalTo(iconImageView.snp.bottom).offset(24)
-            make.width.height.equalTo(40)
         }
         
         let goodImageView = UIImageView.createImageView(imageName: config.goodImageNamed)
@@ -220,7 +206,6 @@ class TSAIListHintBaseVC: TSBaseVC {
             make.top.equalTo(badLabel.snp.bottom).offset(8)
             make.leading.equalTo(0)
             make.trailing.equalTo(0)
-            make.bottom.equalTo(0)
         }
         
 

+ 23 - 101
TSLiveWallpaper/Business/TSAIListVC/TSAIList+Enmu.swift

@@ -6,133 +6,55 @@
 //
 
 enum TSGeneratorImageStyle {
-    case ageOld      //变老
-    case ageChild   //变年轻
-    case oldPhoto   //旧照片修复
-    case eyeOpen    //开眼
-    case pretty     //变美
-    case photoLive     //把照片变活
-    case photoExpand     //照片扩展
-    case photoQuality    //照片变高清
-    case motherDay    //母亲节
-    case catTohuman    //猫变人
-    case futureBaby    //预测宝宝
-    
-    
+    case enhance    //照片变高清
+    case colorize    //黑白变颜色
+    case descratch    //旧照片修复
+
     var imageMaxKb:Int{
         switch self {
-        case .ageOld:
-            return 10*1024
-        case .ageChild:
-            return 10*1024
-        case .oldPhoto:
-            return 5*1024
-        case .eyeOpen:
+        case .descratch:
             return 5*1024
-        case .pretty:
-            return 5*1024
-        case .photoLive:
-            return 10*1024
-        case .photoExpand:
-            return 10*1024
-        case .photoQuality:
-            return 10*1024
-        case .motherDay:
-            return 10*1024
-        case .catTohuman:
+        case .colorize:
             return 10*1024
-        case .futureBaby:
+        case .enhance:
             return 10*1024
         }
     }
     
     var imageMaxBitSize:Int{
         switch self {
-        case .ageOld:
-            return kUploadImageMaxBit10Size
-        case .ageChild:
-            return kUploadImageMaxBit10Size
-        case .oldPhoto:
-            return kUploadImageMaxBit5Size
-        case .eyeOpen:
+        case .descratch:
             return kUploadImageMaxBit5Size
-        case .pretty:
-            return kUploadImageMaxBit5Size
-        case .photoLive:
-            return kUploadImageMaxBit10Size
-        case .photoExpand:
+        case .colorize:
             return kUploadImageMaxBit10Size
-        case .photoQuality:
-            return kUploadImageMaxBit10Size
-        case .motherDay:
-            return kUploadImageMaxBit10Size
-        case .catTohuman:
-            return kUploadImageMaxBit10Size
-        case .futureBaby:
+        case .enhance:
             return kUploadImageMaxBit10Size
         }
     }
     
     var userDefaultsKey:String{
         switch self {
-        case .ageOld:
-            return "isFirstAIListAgeOldHintVC"
-        case .ageChild:
-            return "isFirstAIListAgeChildHintVC"
-        case .oldPhoto:
-            return "isFirstAIChangeRestOldPhoto"
-        case .eyeOpen:
-            return "isFirstAIEyeOpenPhoto"
-        case .pretty:
-            return "isFirstAIPrettyPhoto"
-        case .photoLive:
-            return "isFirstAILivePhoto"
-        case .photoExpand:
-            return ""
-        case .photoQuality:
-            return ""
-        case .motherDay:
-            return "isFirstAIMotherDay"
-        case .catTohuman:
-            return "isFirstAICatTohuman"
-        case .futureBaby:
-            return "isFirstAIFutureBaby"
+        case .enhance:
+            return "isFirstEnhanceHintVC"
+        case .colorize:
+            return "isFirstColorizeHintVC"
+        case .descratch:
+            return "isFirstDescratchHintVC"
         }
     }
     
     var config:TSAIListHintBaseVC.Config{
         switch self {
-        case .ageOld:
-            return .defaultConfig
-        case .ageChild:
-            return .defaultConfig
-        case .oldPhoto:
-            return .getDefaultConfig(imageMaxBitSize: imageMaxBitSize)
-        case .eyeOpen:
-            return .getDefaultConfig(imageMaxBitSize: imageMaxBitSize)
-        case .pretty:
-            return .getDefaultConfig(imageMaxBitSize:imageMaxBitSize)
-        case .photoLive:
-            return .getDefaultConfig(imageMaxBitSize: imageMaxBitSize)
-        case .photoExpand:
-            return .getDefaultConfig(imageMaxBitSize:imageMaxBitSize)
-        case .photoQuality:
-            return .defaultConfig
-        case .motherDay:
-            return .getDefaultConfig(imageMaxBitSize: imageMaxBitSize)
-        case .catTohuman:
-            return .catTohumanConfig
-        case .futureBaby:
-            return .futureBabyConfig
+        case .descratch:
+            return .descratchConfig
+        case .colorize:
+            return .colorizeConfig
+        case .enhance:
+            return .enhanceConfig
         }
     }
     
     var advance:Bool{
-        switch self {
-        case .catTohuman,.motherDay,.futureBaby:
-            return true
-        default:
-            return false
-        }
+        return false
     }
 }

+ 16 - 39
TSLiveWallpaper/Business/TSAIListVC/TSAIListVC/TSAIListVC.swift

@@ -22,12 +22,8 @@ class TSAIListVC: TSBaseVC {
                 rightViewStyle: 0,
                 tapBlock: { [weak self] model, _, _ in
                    guard let self = self else { return }
-                    enterSelectPhotos(
-                        userDefaultsKey: "kEnhanceTipsHint",
-                        maxBitSize: kUploadImageMaxBit10Size,
-                        config:.defaultConfig
-                    ) { image in
-                    let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: nil,imageMaxBitSize: kUploadImageMaxBit10Size, generatorStyle: .photoQuality)
+                    enterSelectPhotos(style: .enhance) { image in
+                    let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: image, generatorStyle: .enhance)
                         kPushVC(target: self, modelVC: baseVc)
                     }
         }))
@@ -41,12 +37,8 @@ class TSAIListVC: TSBaseVC {
                 rightViewStyle: 0,
                 tapBlock: { [weak self] model, _, _ in
                    guard let self = self else { return }
-                    enterSelectPhotos(
-                        userDefaultsKey: "kColorizeTipsHint",
-                        maxBitSize: kUploadImageMaxBit10Size,
-                        config:.defaultConfig
-                    ) { image in
-                    let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: nil,imageMaxBitSize: kUploadImageMaxBit10Size, generatorStyle: .photoQuality)
+                    enterSelectPhotos(style: .colorize) { image in
+                    let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: image, generatorStyle: .colorize)
                         kPushVC(target: self, modelVC: baseVc)
                     }
         }))
@@ -60,12 +52,8 @@ class TSAIListVC: TSBaseVC {
                 rightViewStyle: 0,
                 tapBlock: { [weak self] model, _, _ in
                    guard let self = self else { return }
-                    enterSelectPhotos(
-                        userDefaultsKey: "kDescratchTipsHint",
-                        maxBitSize: kUploadImageMaxBit5Size,
-                        config: .getDefaultConfig(imageMaxBitSize: kUploadImageMaxBit5Size)
-                    ) { image in
-                        let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: nil,imageMaxBitSize: kUploadImageMaxBit5Size, generatorStyle: .oldPhoto)
+                    enterSelectPhotos(style: .descratch) { image in
+                        let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: image, generatorStyle: .descratch)
                         kPushVC(target: self, modelVC: baseVc)
                     }
         }))
@@ -74,7 +62,7 @@ class TSAIListVC: TSBaseVC {
 
     }()
     
-    var hintBaseVC:TSAIListHintBaseVC = TSAIListHintBaseVC(config: .defaultConfig)
+    var hintBaseVC:TSAIListHintBaseVC = TSAIListHintBaseVC(config: .descratchConfig)
     //###################################### 导航栏 view ######################################
 
     lazy var recordBtn: UIButton = {
@@ -215,18 +203,18 @@ extension TSAIListVC: UICollectionViewDataSource ,UICollectionViewDelegate {
 
 extension TSAIListVC{
     
-    func enterSelectPhotos(userDefaultsKey:String,maxBitSize:Int,config:TSAIListHintBaseVC.Config,complete: @escaping (UIImage)->Void){
-        if userDefaultsKey.count == 0 {
-            self.pickSinglePhoto(maxBitSize:maxBitSize,complete:complete)
-        }else{
-            TSAIListHintBaseVC.userDefaultsKey = userDefaultsKey
+    func enterSelectPhotos(style:TSGeneratorImageStyle,complete: @escaping (UIImage)->Void){
+//        if style.userDefaultsKey.isEmpty{
+//            self.pickSinglePhoto(maxBitSize:style.imageMaxBitSize,complete:complete)
+//        }else{
+            TSAIListHintBaseVC.userDefaultsKey = style.userDefaultsKey
             if TSAIListHintBaseVC.isShowUploadImageHint{
                 TSAIListHintBaseVC.isShowUploadImageHint = false
-                self.presentModalHintVC(config:config,complete:complete)
+                self.presentModalHintVC(config:style.config,complete:complete)
             }else {
-                self.pickSinglePhoto(maxBitSize:maxBitSize,complete:complete)
+                self.pickSinglePhoto(maxBitSize:style.imageMaxBitSize,complete:complete)
             }
-        }
+//        }
     }
     
     
@@ -264,15 +252,4 @@ extension TSAIListVC{
     }
 }
 
-extension TSAIListVC{
-    func openMotherDayVC(titleString:String){
-        enterSelectPhotos(
-            userDefaultsKey: "isFirstAIListMotherDayHintVC",
-            maxBitSize: kUploadImageMaxBit10Size,
-            config:.defaultConfig
-        ) { image in
-            let baseVc = TSAIUploadPhotoVC(titleString: titleString,upLoadImage: image,imageMaxBitSize: kUploadImageMaxBit10Size, generatorStyle: .motherDay)
-            kPushVC(target: self, modelVC: baseVc)
-        }
-    }
-}
+

+ 25 - 48
TSLiveWallpaper/Business/TSAIListVC/TSAIUploadPhotoVC/TSAIUploadPhotoVC.swift

@@ -11,11 +11,9 @@ import BetterSegmentedControl
 class TSAIUploadPhotoVC: TSBaseVC {
     var generatorStyle:TSGeneratorImageStyle
     var titleString:String
-    var imageMaxBitSize:Int
-    init(titleString:String,upLoadImage:UIImage?,imageMaxBitSize:Int,generatorStyle:TSGeneratorImageStyle) {
+    init(titleString:String,upLoadImage:UIImage,generatorStyle:TSGeneratorImageStyle) {
         self.titleString = titleString
         self.upLoadImage = upLoadImage
-        self.imageMaxBitSize = imageMaxBitSize
         self.generatorStyle = generatorStyle
         super.init()
     }
@@ -31,7 +29,7 @@ class TSAIUploadPhotoVC: TSBaseVC {
         return photoPickerManager
     }()
     
-    var hintBaseVC:TSAIListHintBaseVC = TSAIListHintBaseVC(config: .defaultConfig)
+    var hintBaseVC:TSAIListHintBaseVC = TSAIListHintBaseVC(config: .colorizeConfig)
     //#####################################底部基础#####################################
     lazy var cusStackView: TSCustomStackView = {
         let cusStackView = TSCustomStackView(axis: .vertical,spacing: 0)
@@ -44,7 +42,6 @@ class TSAIUploadPhotoVC: TSBaseVC {
             guard let self = self else { return }
             generateImage()
         }
-        submitBtn.cornerRadius = 24.0
         return submitBtn
     }()
 
@@ -106,7 +103,6 @@ class TSAIUploadPhotoVC: TSBaseVC {
     lazy var uploadImageView: UIImageView = {
         let uploadImageView = UIImageView()
         uploadImageView.contentMode = .scaleAspectFit
-        uploadImageView.cornerRadius = 12
         return uploadImageView
     }()
     
@@ -131,8 +127,8 @@ class TSAIUploadPhotoVC: TSBaseVC {
 
         bgView.addSubview(uploadImageView)
         uploadImageView.snp.makeConstraints { make in
-            make.top.leading.equalTo(8)
-            make.bottom.trailing.equalTo(-8)
+            make.top.leading.equalTo(0)
+            make.bottom.trailing.equalTo(0)
         }
         
         return bgView
@@ -190,14 +186,14 @@ class TSAIUploadPhotoVC: TSBaseVC {
             make.centerX.equalToSuperview()
             make.width.equalTo(250*kDesignScale)
             make.height.equalTo(48)
-            make.bottom.equalTo(-10-k_Height_safeAreaInsetsBottom())
+            make.bottom.equalTo(-12-k_Height_safeAreaInsetsBottom())
         }
         
         contentView.addSubview(cusStackView)
         cusStackView.snp.makeConstraints { make in
             make.top.equalTo(0)
             make.leading.trailing.equalToSuperview()
-            make.bottom.equalTo(submitBtn.snp.top).offset(-10)
+            make.bottom.equalTo(submitBtn.snp.top).offset(-16)
         }
         
         setUpStackView()
@@ -205,7 +201,7 @@ class TSAIUploadPhotoVC: TSBaseVC {
         let image = upLoadImage
         upLoadImage = image
         
-        subInfoLabel.isHidden = generatorStyle == .catTohuman ? false : true
+        subInfoLabel.isHidden =  true
     }
 
     
@@ -219,39 +215,26 @@ extension TSAIUploadPhotoVC {
     
     func setUpStackView(){
         //添加上传一大块
-        let bgView = UIView()
-        bgView.addSubview(uploadImageBgView)
-        cusStackView.addSubviewToStack(bgView)
-    
+        cusStackView.addSubviewToStack(uploadImageBgView)
         uploadImageBgView.snp.makeConstraints { make in
-            make.width.equalTo(296*kDesignScale)
-            make.height.equalTo(528*kDesignScale)
-            make.centerX.equalToSuperview()
-            make.top.equalTo(8)
-            make.bottom.equalTo(-16)
-        }
-
-        bgView.addSubview(deleteBtn)
-        deleteBtn.snp.makeConstraints { make in
-            make.top.equalTo(0)
-            make.trailing.equalTo(-32*kDesignScale)
-            make.width.height.equalTo(32)
+            make.width.equalTo(k_ScreenWidth)
+            make.height.equalTo(k_ScreenHeight-76-k_Height_safeAreaInsetsBottom()-k_Nav_Height)
         }
         
-        if generatorStyle == .catTohuman {
-            cusStackView.addSpacing(length: 9)
-            cusStackView.addSubviewToStackWhiteBoard(segmentedView, length: 46)
-            segmentedView.snp.makeConstraints { make in
-                make.width.equalTo(k_ScreenWidth-70)
-                make.height.equalTo(40)
-                make.center.equalToSuperview()
-            }
-        }else{
+//        if generatorStyle == .catTohuman {
+//            cusStackView.addSpacing(length: 9)
+//            cusStackView.addSubviewToStackWhiteBoard(segmentedView, length: 46)
+//            segmentedView.snp.makeConstraints { make in
+//                make.width.equalTo(k_ScreenWidth-70)
+//                make.height.equalTo(40)
+//                make.center.equalToSuperview()
+//            }
+//        }else{
             //文字信息区域
-            cusStackView.addSubviewToStack(getTextInfoCell(text: "Single photo with face fully visible".localized))
-            cusStackView.addSpacing(length: lineSpacing)
-            cusStackView.addSubviewToStack(getTextInfoCell(text: "No group photos, covered faces, nudes".localized))
-        }
+//            cusStackView.addSubviewToStack(getTextInfoCell(text: "Single photo with face fully visible".localized))
+//            cusStackView.addSpacing(length: lineSpacing)
+//            cusStackView.addSubviewToStack(getTextInfoCell(text: "No group photos, covered faces, nudes".localized))
+//        }
 
     }
     
@@ -279,12 +262,6 @@ extension TSAIUploadPhotoVC {
     }
     
     var generatingText:String{
-        if generatorStyle == .oldPhoto {
-            return "Restore".localized
-        }else
-        if generatorStyle == .pretty {
-            return "Change".localized
-        }
         return "Generate".localized
     }
 }
@@ -321,9 +298,9 @@ extension TSAIUploadPhotoVC {
     func generateImage() {
         if kJudgeVip(externalBool: true, vc: self){ return } //判断 vip
         guard let upLoadImage = upLoadImage else { return }
-        if generatorStyle != .catTohuman {
+//        if generatorStyle != .catTohuman {
             additionalPrompt = ""
-        }
+//        }
 //        let gennerateVC = TSAIListPhotoGeneratorBaseVC(generatorModel: TSAIListPhotoGeneratorModel(upLoadImage: upLoadImage, generatorStyle: generatorStyle,additionalPrompt: additionalPrompt)){ [weak self] model in
 //            guard let self = self else { return }
 //            saveModel(model: model)

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/OC/IJKPlayer/Core/SJIJKMediaPlayer.m

@@ -4,7 +4,7 @@
 //
 //  Created by 畅三江 on 2022/8/15.
 //
-
+#import "IJKMediaFramework/IJKMediaFramework.h"
 #import "SJIJKMediaPlayer.h"
 #if __has_include(<IJKMediaPlayerKit/IJKMediaPlayerKit.h>)
 #import <IJKMediaPlayerKit/IJKMediaPlayerKit.h>

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/OC/IJKPlayer/SJIJKMediaPlaybackController.m

@@ -8,7 +8,7 @@
 
 #import "SJIJKMediaPlaybackController.h"
 #import "SJIJKMediaPlayerLayerView.h"
-
+#import "IJKMediaFramework/IJKMediaFramework.h"
 #if __has_include(<SJUIKit/SJRunLoopTaskQueue.h>)
 #import <SJUIKit/SJRunLoopTaskQueue.h>
 #else

+ 4 - 0
TSLiveWallpaper/Business/TSTabBarController/TSTabBarController.swift

@@ -122,6 +122,10 @@ class TSTabBarController: UITabBarController {
         }
 
         addMusicAndMiniBar()
+        kMainAfter(1.0) {
+            self.miniBar.isHidden = true
+        }
+
     }
 
     func updateMarkViewFrame() {

+ 1 - 1
TSLiveWallpaper/DataManger/Config/TSConfig.swift

@@ -7,7 +7,7 @@
 
 extension UIColor {
     /// 背景色
-    static let mainBg = UIColor.black
+    static let mainBg = "#121212".uiColor
     
     /// 主色调
     static let themeColor = UIColor.clear

+ 1 - 1
TSLiveWallpaper/LaunchVC/TSLaunchVC.swift

@@ -19,7 +19,7 @@ class TSLaunchVC: UIViewController {
     private var timer: DispatchSourceTimer?
     // 闪屏页剩余显示时长
     #if DEBUG
-        private var remindTimeInterval: TimeInterval = 3.0
+    private var remindTimeInterval: TimeInterval = 0.5//3.0
     #else
         private var remindTimeInterval: TimeInterval = 3.0
     #endif