Browse Source

开发:3.6.16(1)新增 4 种风格

100Years 2 weeks ago
parent
commit
d268d8e811
28 changed files with 225 additions and 40 deletions
  1. 4 4
      AIEmoji.xcodeproj/project.pbxproj
  2. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Bikini.imageset/Contents.json
  3. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Bikini.imageset/ptp_style_Bikini@2x.png
  4. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Bikini.imageset/ptp_style_Bikini@3x.png
  5. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Monet.imageset/Contents.json
  6. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Monet.imageset/ptp_style_Monet@2x.png
  7. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Monet.imageset/ptp_style_Monet@3x.png
  8. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Muscle.imageset/Contents.json
  9. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Muscle.imageset/ptp_style_Muscle@2x.png
  10. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_Muscle.imageset/ptp_style_Muscle@3x.png
  11. 22 0
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_SailorMoon.imageset/Contents.json
  12. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_SailorMoon.imageset/ptp_style_SailorMoon@2x.png
  13. BIN
      AIEmoji/Assets.xcassets/PTP/style/ptp_style_SailorMoon.imageset/ptp_style_SailorMoon@3x.png
  14. 3 1
      AIEmoji/Business/TSGenmojiVC/TSGenmojiVC/Model/TSActionInfoModel.swift
  15. 3 1
      AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/M/TSPTPStyleModel.swift
  16. 20 18
      AIEmoji/Business/TSTabBarController/TSTabBarController.swift
  17. 8 8
      AIEmoji/Common/Purchase/TSPurchaseManager.swift
  18. 14 7
      AIEmoji/Common/Tool/OperationQueue/TSGenerateBaseOperation/TSGeneratePosterOperation.swift
  19. 40 1
      AIEmoji/Res/photo_to_photo_style.json
  20. 5 0
      AIEmoji/de.lproj/Localizable.strings
  21. 5 0
      AIEmoji/en.lproj/Localizable.strings
  22. 5 0
      AIEmoji/es.lproj/Localizable.strings
  23. 5 0
      AIEmoji/ja.lproj/Localizable.strings
  24. 5 0
      AIEmoji/ko.lproj/Localizable.strings
  25. 5 0
      AIEmoji/pt-BR.lproj/Localizable.strings
  26. 5 0
      AIEmoji/pt-PT.lproj/Localizable.strings
  27. 5 0
      AIEmoji/zh-Hans.lproj/Localizable.strings
  28. 5 0
      AIEmoji/zh-Hant.lproj/Localizable.strings

+ 4 - 4
AIEmoji.xcodeproj/project.pbxproj

@@ -2544,7 +2544,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2560,7 +2560,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.6.15;
+				MARKETING_VERSION = 3.6.16;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -2583,7 +2583,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2599,7 +2599,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.6.15;
+				MARKETING_VERSION = 3.6.16;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Bikini.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Bikini.imageset/ptp_style_Bikini@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Bikini.imageset/ptp_style_Bikini@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Monet.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Monet.imageset/ptp_style_Monet@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Monet.imageset/ptp_style_Monet@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Muscle.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Muscle.imageset/ptp_style_Muscle@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_Muscle.imageset/ptp_style_Muscle@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/PTP/style/ptp_style_SailorMoon.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_SailorMoon.imageset/ptp_style_SailorMoon@2x.png


BIN
AIEmoji/Assets.xcassets/PTP/style/ptp_style_SailorMoon.imageset/ptp_style_SailorMoon@3x.png


+ 3 - 1
AIEmoji/Business/TSGenmojiVC/TSGenmojiVC/Model/TSActionInfoModel.swift

@@ -99,7 +99,8 @@ class TSActionRequestModel : TSBaseModel {
     var imageUrl:String = ""
     var imageUrlTimestamp:Int = 0
     var style:String = ""
-    var advance:Bool = false
+    var advance:Bool = false//决定生图的模型
+    var model:String = ""   //决定生图的模型
     
     override func mapping(map: ObjectMapper.Map) {
         prompt              <- map["prompt"]
@@ -111,6 +112,7 @@ class TSActionRequestModel : TSBaseModel {
         imageUrlTimestamp   <- map["imageUrlTimestamp"]
         style               <- map["style"]
         advance             <- map["advance"]
+        model               <- map["model"]
     }
 }
 

+ 3 - 1
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/M/TSPTPStyleModel.swift

@@ -18,7 +18,8 @@ class TSGenerateStyleModel: TSBaseModel {
     var style:String = ""   //风格类型(本地用)
     var styleId:String = ""   //风格类型(网络用)
     var input:Bool = false   //是否输入框
-    var advance:Bool = false    //走新的通道
+    var advance:Bool = false    //走新的通道,chatgpt
+    var model:String = ""       //走新的通道,根据内容确定
     
     override func mapping(map: ObjectMapper.Map) {
         imageName               <- map["imageName"]
@@ -31,6 +32,7 @@ class TSGenerateStyleModel: TSBaseModel {
         styleId                 <- map["styleId"]
         input                   <- map["input"]
         advance                 <- map["advance"]
+        model                   <- map["model"]
     }
     
     var actionInfoModel:TSActionInfoModel? //对应生成的结果

+ 20 - 18
AIEmoji/Business/TSTabBarController/TSTabBarController.swift

@@ -42,41 +42,43 @@ class TSTabBarController: UITabBarController {
     }
 
     @objc private func setUpData() {
-        viewControllerArray = ["TSPTPInputVC","TSAILIstVC","TSChatViewController","TSSetingVC"]
-//        viewControllerArray = ["TSPTPInputVC","TSAILIstVC","TSChatViewController","TSTTPInputVC","TSSetingVC"]
+//        viewControllerArray = ["TSPTPInputVC","TSAILIstVC","TSChatViewController","TSSetingVC"]
+        viewControllerArray = ["TSPTPInputVC","TSAILIstVC","TSChatViewController","TSTTPInputVC","TSSetingVC"]
 //        viewControllerArray = ["TSPTPInputVC","TSAILIstVC","TSChatViewController","TSSetingVC"]
 //        viewControllerArray = ["TSPTPInputVC","TSChatViewController","TSEmojisVC","TSSetingVC"]
 //        viewControllerArray = ["TSPhotoToPhotoVC","TSChatViewController","TSEmojisVC","TSSetingVC"]
 //        viewControllerArray = ["TSTTPInputVC","TSChatViewController","TSEmojisVC","TSSetingVC"]
 
-        titleArray = ["Photo","AI Store","Chat","Setting"]
-        selectedImageArray = [
-            "tabbar_select_pic",
-            "tabbar_select_ailist",
-            "tabbar_select_aichat",
-            "tabbar_select_setting"
-        ]
-        unselectedImageArray = [
-            "tabbar_unSelect_pic",
-            "tabbar_unSelect_ailist",
-            "tabbar_unSelect_aichat",
-            "tabbar_unSelect_setting"
-        ]
-//        titleArray = ["Photo","AI Store","Chat","Text","Setting"]
+//        titleArray = ["Photo","AI Store","Chat","Setting"]
 //        selectedImageArray = [
 //            "tabbar_select_pic",
 //            "tabbar_select_ailist",
 //            "tabbar_select_aichat",
-//            "tabbar_select_text",
 //            "tabbar_select_setting"
 //        ]
 //        unselectedImageArray = [
 //            "tabbar_unSelect_pic",
 //            "tabbar_unSelect_ailist",
 //            "tabbar_unSelect_aichat",
-//            "tabbar_unSelect_text",
 //            "tabbar_unSelect_setting"
 //        ]
+        
+        
+        titleArray = ["Photo","AI Store","Chat","Text","Setting"]
+        selectedImageArray = [
+            "tabbar_select_pic",
+            "tabbar_select_ailist",
+            "tabbar_select_aichat",
+            "tabbar_select_text",
+            "tabbar_select_setting"
+        ]
+        unselectedImageArray = [
+            "tabbar_unSelect_pic",
+            "tabbar_unSelect_ailist",
+            "tabbar_unSelect_aichat",
+            "tabbar_unSelect_text",
+            "tabbar_unSelect_setting"
+        ]
 
         var tabArray: [UINavigationController] = []
 

+ 8 - 8
AIEmoji/Common/Purchase/TSPurchaseManager.swift

@@ -30,8 +30,7 @@ public enum PremiumPeriod: String, CaseIterable {
             return 30
         }
     }
-    
-    /// 对应vip类型,可以免费使用次数
+
     var saveString: String {
         switch self {
         case .none:
@@ -40,6 +39,7 @@ public enum PremiumPeriod: String, CaseIterable {
             return "80%"
         }
     }
+    
     /*
     1. 一年(非闰年)
     ​365 天​ = 365 × 24 × 60 × 60 × 1000 = ​31,536,000,000 毫秒
@@ -200,9 +200,9 @@ public class PurchaseManager: NSObject {
     }
 
     @objc public var isVip: Bool {
-//#if DEBUG
-//        return vipType != .none
-//#endif
+#if DEBUG
+        return vipType != .none
+#endif
         guard let expiresDate = expiredDate else {
             return false
         }
@@ -214,9 +214,9 @@ public class PurchaseManager: NSObject {
     }
 
     public var vipType: PremiumPeriod {
-//#if DEBUG
-//        return PremiumPeriod.none
-//#endif
+#if DEBUG
+        return PremiumPeriod.month
+#endif
         guard isVip, let type = vipInformation["type"] as? String else {
             return .none
         }

+ 14 - 7
AIEmoji/Common/Tool/OperationQueue/TSGenerateBaseOperation/TSGeneratePosterOperation.swift

@@ -118,6 +118,7 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
         infoModel.request.promptSort = generateStyleModel.inputText
         infoModel.request.style = generateStyleModel.style
         infoModel.request.advance = generateStyleModel.advance
+        infoModel.request.model = generateStyleModel.model
         
         return infoModel
     }
@@ -191,13 +192,19 @@ class TSGeneratePTPOperation: TSGenerateBaseOperation , @unchecked Sendable{
             }
         }
         
-        creatRequest = TSNetworkShared.post(urlType: .imageRewrite,parameters:
-                                                ["prompt":prompt,
-                                                 "imageUrl":request.imageUrl,
-                                                 "style":request.style,
-                                                 "device":getUserInfoJsonString(),
-                                                 "advance": request.advance
-                                                ]) { [weak self] data,error in
+        var postDict:[String:Any] = [
+            "prompt":prompt,
+            "imageUrl":request.imageUrl,
+            "style":request.style,
+            "device":getUserInfoJsonString(),
+            "advance": request.advance
+        ]
+        
+        if !request.model.isEmpty {
+            postDict["model"] = request.model
+        }
+        
+        creatRequest = TSNetworkShared.post(urlType: .imageRewrite,parameters: postDict) { [weak self] data,error in
             guard let self = self else { return }
             if stopNetwork == true { return }
             

+ 40 - 1
AIEmoji/Res/photo_to_photo_style.json

@@ -52,6 +52,16 @@
         "styleId": "",
         "advance":true
     },
+    {
+        "imageName": "ptp_style_Muscle",
+        "imageText": "Muscle",
+        "prompt":"Add muscle effects to people in uploaded photos",
+        "specialStyle":0,
+        "styleId": "",
+        "isVip": true,
+        "advance":false,
+        "model":"flux"
+    },
     {
         "imageName": "ptp_style_chibi",
         "imageText": "Chibi Sticker",
@@ -122,6 +132,16 @@
         "styleId": "",
         "advance":true
     },
+    {
+        "imageName": "ptp_style_Bikini",
+        "imageText": "Bikini",
+        "prompt":"Turn clothes into bikinis based on the characters in the pictures.",
+        "specialStyle":0,
+        "isVip": true,
+        "styleId": "",
+        "advance":false,
+        "model":"flux"
+    },
     {
         "imageName": "ptp_style_CibiMarukoChan",
         "imageText": "Cibi",
@@ -158,6 +178,16 @@
         "styleId": "ImageToImage-11",
         "advance":true
     },
+    {
+        "imageName": "ptp_style_Monet",
+        "imageText": "Monet",
+        "prompt":"Please create image in Monet style",
+        "specialStyle":0,
+        "isVip": true,
+        "styleId": "",
+        "advance":false,
+        "model":"flux"
+    },
     {
         "imageName": "ptp_style_ApocalypticWorld",
         "imageText": "Apocalyptic World",
@@ -238,7 +268,16 @@
         "styleId": "",
         "advance":true
     },
-    
+    {
+        "imageName": "ptp_style_SailorMoon",
+        "imageText": "Sailor",
+        "prompt":"Please create image in sailor moon style",
+        "specialStyle":0,
+        "isVip": true,
+        "styleId": "",
+        "advance":false,
+        "model":"flux"
+    },
     {
         "imageName": "ptp_style_WongKarwaiIsfilms",
         "imageText": "Wong Kar-wai films",

+ 5 - 0
AIEmoji/de.lproj/Localizable.strings

@@ -417,3 +417,8 @@
 "Apocalyptic World" = "Apokalyptische Welt";
 "Wong Kar-wai films" = "Wong Kar-wai films";
 "Zhang Yimou films" = "Zhang Yimou films";
+"Game" = "Genshin Impact";
+"Monet" = "Monet";
+"Muscle" = "Muskel";
+"Bikini" = "Bikini";
+"Sailor" = "Sailor Moon";

+ 5 - 0
AIEmoji/en.lproj/Localizable.strings

@@ -414,3 +414,8 @@
 "Apocalyptic World" = "Apocalyptic World";
 "Wong Kar-wai films" = "Wong Kar-wai films";
 "Zhang Yimou films" = "Zhang Yimou films";
+"Game" = "Game";
+"Monet" = "Monet";
+"Muscle" = "Muscle";
+"Bikini" = "Bikini";
+"Sailor" = "Sailor";

+ 5 - 0
AIEmoji/es.lproj/Localizable.strings

@@ -414,3 +414,8 @@
 "Apocalyptic World" = "Mundo apocalíptico";
 "Wong Kar-wai films" = "Wong Kar-wai films";
 "Zhang Yimou films" = "Zhang Yimou films";
+"Game" = "Impacto Genshin";
+"Monet" = "Monet";
+"Muscle" = "Músculo";
+"Bikini" = "Bikini";
+"Sailor" = "Marinero Luna";

+ 5 - 0
AIEmoji/ja.lproj/Localizable.strings

@@ -413,3 +413,8 @@
 "Apocalyptic World" = "終末の世界";
 "Wong Kar-wai films" = "Wong Kar-wai films";
 "Zhang Yimou films" = "Zhang Yimou films";
+"Game" = "Impacto Genshin";
+"Monet" = "モネ";
+"Muscle" = "筋";
+"Bikini" = "ビキニ";
+"Sailor" = "セーラームーン";

+ 5 - 0
AIEmoji/ko.lproj/Localizable.strings

@@ -419,3 +419,8 @@
 "Apocalyptic World" = "종말의 세계";
 "Wong Kar-wai films" = "Wong Kar-wai films";
 "Zhang Yimou films" = "Zhang Yimou films";
+"Game" = "원신";
+"Monet" = "모네";
+"Muscle" = "근";
+"Bikini" = "비키니";
+"Sailor" = "세일러문";

+ 5 - 0
AIEmoji/pt-BR.lproj/Localizable.strings

@@ -413,3 +413,8 @@
 "Apocalyptic World" = "Mundo Apocalíptico";
 "Wong Kar-wai films" = "Wong Kar-wai films";
 "Zhang Yimou films" = "Zhang Yimou films";
+"Game" = "Impacto Genshin";
+"Monet" = "Monet";
+"Muscle" = "Músculo";
+"Bikini" = "Bikini";
+"Sailor" = "Sailor Moon";

+ 5 - 0
AIEmoji/pt-PT.lproj/Localizable.strings

@@ -413,3 +413,8 @@
 "Apocalyptic World" = "Mundo Apocalíptico";
 "Wong Kar-wai films" = "Wong Kar-wai films";
 "Zhang Yimou films" = "Zhang Yimou films";
+"Game" = "Impacto Genshin";
+"Monet" = "Monet";
+"Muscle" = "Músculo";
+"Bikini" = "Bikini";
+"Sailor" = "Sailor Moon";

+ 5 - 0
AIEmoji/zh-Hans.lproj/Localizable.strings

@@ -415,3 +415,8 @@
 "Apocalyptic World" = "末日世界";
 "Wong Kar-wai films" = "王家卫电影";
 "Zhang Yimou films" = "张艺谋电影";
+"Game" = "原神";
+"Monet" = "莫奈";
+"Muscle" = "肌肉";
+"Bikini" = "比基尼";
+"Sailor" = "美少女战士";

+ 5 - 0
AIEmoji/zh-Hant.lproj/Localizable.strings

@@ -405,3 +405,8 @@
 "Apocalyptic World" = "末日世界";
 "Wong Kar-wai films" = "王家衛電影";
 "Zhang Yimou films" = "張藝謀電影";
+"Game" = "原神";
+"Monet" = "莫內";
+"Muscle" = "肌肉";
+"Bikini" = "比基尼";
+"Sailor" = "美少女戰士";