100Years il y a 5 jours
Parent
commit
5bc4fd7400

+ 2 - 2
AIEmoji.xcodeproj/project.pbxproj

@@ -2250,7 +2250,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2;
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2289,7 +2289,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2;
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;

+ 0 - 1
AIEmoji/AppDelegate.swift

@@ -75,7 +75,6 @@ extension AppDelegate {
     
     func applicationDidEnterBackground(_ application: UIApplication) {
         beginBackgroundTask()
-        
 //        ///添加测试数据
 //        let userDefaults = UserDefaults.standard
 //        let lastGreetingDateString = userDefaults.string(forKey: "kEveryDayPopPurchase")

+ 3 - 3
AIEmoji/Business/LaunchVC/TSBootPageVC.swift

@@ -100,8 +100,8 @@ class TSBootPageVC: TSBaseVC {
         overlayImageView.frame = CGRectMake(0, k_ScreenHeight-407*kDesignScale, k_ScreenWidth, 407*kDesignScale)
         view.addSubview(overlayImageView)
 
-        deepseek.frame = CGRectMake((k_ScreenWidth-220)/2 , k_ScreenHeight-183-48, 220, 48)
-        view.addSubview(deepseek)
+//        deepseek.frame = CGRectMake((k_ScreenWidth-220)/2 , k_ScreenHeight-183-48, 220, 48)
+//        view.addSubview(deepseek)
         
         view.addSubview(titleLabel)
         view.addSubview(continueBtn)
@@ -126,7 +126,7 @@ class TSBootPageVC: TSBaseVC {
         dePrint("clickContinue index=\(index)")
         titleLabel.text = titleStrings.safeString(At: index)
         
-        deepseek.isHidden = !(index == pageIndex)//第二页
+//        deepseek.isHidden = !(index == pageIndex)//第二页
         
         if index <= pageIndex{
             scrollView.contentOffset = CGPointMake(k_ScreenWidth*CGFloat(index), 0)

+ 6 - 0
AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/TSPTPGeneratorVC.swift

@@ -174,6 +174,8 @@ extension TSPTPGeneratorVC {
         generateInView.isHidden = false
         generateInView.showLoading(text: text)
         generateInView.isRotating = true
+        generateInView.timeLabel.isHidden = false
+        generateInView.infoLabel.isHidden = false
         
         isClickTheBlankClosePage = false
         bottomView.isHidden = true
@@ -185,6 +187,8 @@ extension TSPTPGeneratorVC {
         generateInView.isHidden = false
         generateInView.showLoading(text: "Generating".localized + " ...")
         generateInView.isRotating = true
+        generateInView.timeLabel.isHidden = false
+        generateInView.infoLabel.isHidden = false
 
         isClickTheBlankClosePage = false
         bottomView.isHidden = true
@@ -197,6 +201,8 @@ extension TSPTPGeneratorVC {
         generateInView.isHidden = false
         generateInView.showError(text: msg)
         generateInView.isRotating = false
+        generateInView.timeLabel.isHidden = true
+        generateInView.infoLabel.isHidden = true
 
         isClickTheBlankClosePage = true
         

+ 1 - 1
AIEmoji/Business/TSPTPGeneratorVC/TSPTPGeneratorVC/VM/TSPTPGeneratorVM.swift

@@ -146,7 +146,7 @@ class TSPTPGeneratorVM {
                     default:
                         stateDatauPblished = (.progressString(generating(progress: genmojiModel.percent)),nil)
                         if stopNetwork == false {
-                            kDelayOnMainThread(1.0) {
+                            kDelayOnMainThread(2.0) {
                                 self.getActionInfo(action_id: action_id)
                             }
                         }

+ 38 - 12
AIEmoji/Business/TSPTPGeneratorVC/TSPTPInputVC/TSPTPInputVC.swift

@@ -260,15 +260,20 @@ class TSPTPInputVC: TSBaseVC {
         }
         
         setUpCusStackView()
-
+        
+        setHeaderCusStackView()
         kDelayMainShort {
-            self.collectionComponent.collectionView.parallaxHeader.view = self.cusStackView
-            self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
-            self.collectionComponent.collectionView.parallaxHeader.mode = .bottom
-            self.collectionComponent.collectionView.parallaxHeader.minimumHeight = 0
+            self.setHeaderCusStackView()
         }
     }
     
+    func setHeaderCusStackView(){
+        self.collectionComponent.collectionView.parallaxHeader.view = self.cusStackView
+        self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
+        self.collectionComponent.collectionView.parallaxHeader.mode = .bottom
+        self.collectionComponent.collectionView.parallaxHeader.minimumHeight = 0
+    }
+    
     override func dealThings() {
         NotificationCenter.default.addObserver(self, selector: #selector(vipInfoChanged), name: .kPurchaseDidChanged, object: nil)
         updateVipView()
@@ -315,7 +320,7 @@ extension TSPTPInputVC {
                 dePrint("collectionViewObserver cusStackView.viewH == \(cusStackView.viewH)")
                 return cusStackView.viewH
             }
-            return 454 //promptTextViewH
+            return 454
         }
     }
     
@@ -440,6 +445,7 @@ extension TSPTPInputVC {
         if kJudgeVip(externalBool: isVip, vc: self) { return }  //判断 vip
         
         viewModel.selectedPTPStyleModel.upLoadImage = viewModel.upLoadImage
+        viewModel.selectedPTPStyleModel.upLoadImageUrl = nil
         let gennerateVC = TSPTPGeneratorVC(generateStyleModel: viewModel.selectedPTPStyleModel) { [weak self] model in
             guard let self = self else { return }
             if viewModel.saveModel(model:model) {
@@ -499,22 +505,42 @@ extension TSPTPInputVC {
 
         kDelayMainShort {
             self.updateViewCusStackViewH()
+            
+            
         }
     }
     
     func updateViewCusStackViewH() {
-        self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
-   
-        let newHeight = self.cusStackViewH
-        let headerView = self.collectionComponent.collectionView.parallaxHeader.view!
+        
+        self.collectionComponent.collectionView.parallaxHeader.updateHeaderHeight(height: self.cusStackViewH)
+        
+//        self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
+//   
+//        let newHeight = self.cusStackViewH
+//        let headerView = self.collectionComponent.collectionView.parallaxHeader.view!
+//        for constraint in headerView.constraints {
+//            if constraint.firstAttribute == .height &&
+//               constraint.firstItem as? UIView == headerView &&
+//               constraint.secondItem == nil {
+//                constraint.constant = newHeight
+//                break
+//            }
+//        }
+    }
+
+}
+
+extension MXParallaxHeader {
+    func updateHeaderHeight(height:CGFloat){
+        self.height = height
+        let headerView = view!
         for constraint in headerView.constraints {
             if constraint.firstAttribute == .height &&
                constraint.firstItem as? UIView == headerView &&
                constraint.secondItem == nil {
-                constraint.constant = newHeight
+                constraint.constant = height
                 break
             }
         }
     }
-
 }

+ 1 - 1
AIEmoji/Business/TSPTPGeneratorVC/TSPTPInputVC/VM/TSPTPInputVM.swift

@@ -68,7 +68,7 @@ class TSPTPInputVM {
 
     var isCanGennerate:Bool {
         if upLoadImage != nil {
-            if selectedPTPStyleModel.input,selectedPTPStyleModel.inputText.count <= 0 {
+            if selectedPTPStyleModel.input,selectedPTPStyleModel.inputText.replacingOccurrences(of: " ", with: "").count <= 0 {
                 return false
             }
             return true

+ 1 - 1
AIEmoji/Business/VIewTool/TSGeneratorloadingView.swift

@@ -43,7 +43,7 @@ class TSGeneratorloadingView: TSBaseView {
     }()
     
     lazy var infoLabel: UILabel = {
-        let textLabel = UILabel.createLabel(font: .font(size: 12),textColor: .white.withAlphaComponent(0.6),textAlignment: .center)
+        let textLabel = UILabel.createLabel(font: .font(size: 14),textColor: .white.withAlphaComponent(0.6),textAlignment: .center)
         return textLabel
     }()
     

+ 0 - 1
AIEmoji/Common/GlobalImports/GlobalImports.swift

@@ -139,7 +139,6 @@ func kPresentModalVC(target:UIViewController,
 func kPushVC(target:UIViewController,modelVC:UIViewController){
     modelVC.hidesBottomBarWhenPushed = true
     target.navigationController?.pushViewController(modelVC, animated: true)
-    target.navigationController?.pushViewController(modelVC, animated: true)
 }