瀏覽代碼

Merge branch '3.6.27(2)' into dev-v2-diyVideo

# Conflicts:
#	AIEmoji/Common/Purchase/TSPurchaseManager+Free.swift
#	AIEmoji/Common/Purchase/TSPurchaseManager.swift
#	AIEmoji/de.lproj/Localizable.strings
#	AIEmoji/en.lproj/Localizable.strings
#	AIEmoji/es.lproj/Localizable.strings
#	AIEmoji/ja.lproj/Localizable.strings
#	AIEmoji/ko.lproj/Localizable.strings
#	AIEmoji/pt-BR.lproj/Localizable.strings
#	AIEmoji/pt-PT.lproj/Localizable.strings
#	AIEmoji/zh-Hans.lproj/Localizable.strings
#	AIEmoji/zh-Hant.lproj/Localizable.strings
100Years 6 天之前
父節點
當前提交
54af2a755c

+ 22 - 0
AIEmoji/Assets.xcassets/DiyVideo/ic_photoFilter.imageset/Contents.json

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

二進制
AIEmoji/Assets.xcassets/DiyVideo/ic_photoFilter.imageset/ic_photoFilter@2x.png


二進制
AIEmoji/Assets.xcassets/DiyVideo/ic_photoFilter.imageset/ic_photoFilter@3x.png


+ 7 - 6
AIEmoji/Business/VIewTool/TSGeneratorloadingView/TSGeneratorErrorView.swift

@@ -85,6 +85,7 @@ extension TSGeneratorErrorView {
     
     func setErrorText(errorString:String) {
         textLabel.text = errorString
+        textLabel.setLineSpacing(10)
     }
     
     func sensitiveErrorView() {
@@ -95,8 +96,7 @@ extension TSGeneratorErrorView {
             make.width.height.equalTo(56)
         }
 
-        textLabel.text = "Your photo may contain nudity, gore or violence that does not comply with the health policy, please replace the photo and try again.".localized
-        
+        setErrorText(errorString:"Your photo may contain nudity, gore or violence that does not comply with the health policy, please replace the photo and try again.".localized)
     }
     
     func generalErrorView() {
@@ -107,7 +107,7 @@ extension TSGeneratorErrorView {
             make.width.height.equalTo(120)
         }
         
-        textLabel.text = "Sorry there was a slight problem with the image processing, please try again later.".localized
+        setErrorText(errorString:"Sorry there was a slight problem with the image processing, please try again later.".localized)
     }
     
     
@@ -119,7 +119,7 @@ extension TSGeneratorErrorView {
             make.width.height.equalTo(120)
         }
         
-        textLabel.text = "No network, please check your network and try again.".localized
+        setErrorText(errorString:"No network, please check your network and try again.".localized)
     }
     
     func generateTooMuchView() {
@@ -130,7 +130,7 @@ extension TSGeneratorErrorView {
             make.width.height.equalTo(56)
         }
 
-        textLabel.text = "Your photo may contain nudity, gore or violence that does not comply with the health policy, please replace the photo and try again.".localized
+        setErrorText(errorString:"Your photo may contain nudity, gore or violence that does not comply with the health policy, please replace the photo and try again.".localized)
     }
     
     
@@ -141,7 +141,8 @@ extension TSGeneratorErrorView {
         errorImageView.snp.updateConstraints { make in
             make.width.height.equalTo(56)
         }
-        textLabel.text = "You have used all your video effect generations".localized
+        
+        setErrorText(errorString:"You have used all your video effect generations".localized)
     }
     
 }

+ 1 - 0
AIEmoji/Business2/DIYVideo/TSAIDiyVideoVC.swift

@@ -178,6 +178,7 @@ extension TSAIDiyVideoVC: JXSegmentedListContainerViewDataSource {
 
 extension TSAIDiyVideoVC {
     func generateVideo() {
+        if kJudgeVip(externalBool: true, vc: self) { return }  //判断 vip
         if segmentedView.selectedIndex == 0 {
             guard let img = ptvVc.viewModel.uploadImage else {
                 return

+ 4 - 4
AIEmoji/Business2/DisCover/Data/TSDiscoverViewModel+Data.swift

@@ -12,15 +12,15 @@ class TSDiscoverViewModel {
     
     lazy var bannerItems: [TSDiscoverItemModel] = {
         [
+            TSDiscoverItemModel(style: .ptp,
+                                viewModel: TSDiscoverBaseItemVM(title: "", imageNamed: "discover_0_AnimeBanner"),
+                                generateModel: TSGenerateModel(json: ptp_Anime)),
             TSDiscoverItemModel(style: .videoV2,
                                 viewModel: TSDiscoverAnimationItemVM(title: "", style: .video, imageNameds: ["Animal Diving Show.mp4"]),
                                 generateModel: TSGenerateModel(json: video_AnimalDivingShow)),
             TSDiscoverItemModel(style: .videoV2,
                                 viewModel: TSDiscoverAnimationItemVM(title: "", style: .video, imageNameds: ["Oscar Gala.mp4"]),
                                 generateModel: TSGenerateModel(json: video_OscarGala)),
-            TSDiscoverItemModel(style: .ptp,
-                                viewModel: TSDiscoverBaseItemVM(title: "", imageNamed: "discover_0_AnimeBanner"),
-                                generateModel: TSGenerateModel(json: ptp_Anime)),
         ]
     }()
 
@@ -628,10 +628,10 @@ class TSDiscoverViewModel {
     lazy var discoverDatas: [TSDiscoverSectionModel] = {
         [
             bannerSection,
+            popularStylesSection,
             videoEffectSection,
             aiDanceSection,
             creativeEffectSection,
-            popularStylesSection,
             processPhotoSection,
             figuresToysSection,
             babyCardSection,

+ 1 - 1
AIEmoji/Business2/DisCover/Data/TSDiscoverViewModel+Dic.swift

@@ -1964,7 +1964,7 @@ extension TSDiscoverViewModel {
         [
             imageName: "ptp_style_StickerMe",
            imageText: "StickerMe",
-           prompt:"Create an Apple iOS Memoji-style sticker character inspired by the person in upload photo, sticker's face similar with the exact face. The sticker should look like the real character with similar hairstyle, hair accessories, outfit, and pose. Keep the original person in the photo completely unchanged with their real human face and appearance. Do not modify or stylize their face or body in any way. Place the new Memoji-style sticker character next to the original person in the photo in a natural and balanced position, as if it is an official iOS sticker placed on top of the photo. The final style should be cute, clean, three-dimensional , Bright, brightly colored and identical to official Apple iOS Memoji stickers style, while ensuring the original person remains fully realistic and untouched for clear comparison with the sticker.",
+           prompt:"Transform all recognizable subjects in the uploaded photo into Apple iOS Memoji-style 3D sticker characters. This includes any people, animals, or visible objects. Do not keep or show any part of the original photo — only generate the new version in the official Memoji sticker style.Match the shape, pose, clothing, accessories, and general layout of each subject, but recreate them as cute, expressive, brightly colored, clean, and three-dimensional Apple iOS Memoji-style stickers. The style should match Apple’s official iOS Memoji sticker design. Make sure the scene layout remains similar, but everything appears in sticker form.",
             specialStyle:0,
             isVip: true,
             unionType: 1,

+ 6 - 5
AIEmoji/Business2/DisCover/TSDiscoverVC/Cell/TSDiscoverBannerCell.swift

@@ -72,9 +72,11 @@ class TSDiscoverBannerCell: TSDiscoverBaseCell {
         let view = TSDiscoverBannerItemCell()
         view.cornerRadius = 12
         view.backgroundColor = "#2B2937".uiColor
+        view.titleLabel.text = "Photo Filter".localized
+        view.iconView.image = .icPhotoFilter
         view.addTapAction { [weak self] in
             guard let self = self else { return }
-            clickSpecialBlock?("ptv", nil)
+            clickSpecialBlock?("photoFilter", nil)
         }
         return view
     }()
@@ -83,12 +85,11 @@ class TSDiscoverBannerCell: TSDiscoverBaseCell {
         let view = TSDiscoverBannerItemCell()
         view.cornerRadius = 12
         view.backgroundColor = "#2B2937".uiColor
-        view.titleLabel.text = "Text to Video".localized
-        view.iconView.image = .icText2Video
-
+        view.titleLabel.text = "AI Videos".localized
+        
         view.addTapAction { [weak self] in
             guard let self = self else { return }
-            clickSpecialBlock?("ttv", nil)
+            clickSpecialBlock?("ptv", nil)
         }
         return view
     }()

+ 6 - 1
AIEmoji/Business2/DisCover/TSDiscoverVC/TSDiscoverVC.swift

@@ -283,7 +283,12 @@ extension TSDiscoverVC {
         if TSGenerateBasePhotoOperationQueue.isAvailabilityHandle(view: self.view)
         { return }
         
-        if cmd == "ptv" {
+        if cmd == "photoFilter" {
+            let itemModel = TSDiscoverItemModel(style: .ptp, viewModel: TSDiscoverBaseItemVM(title: "", imageNamed: "discover_0_AnimeBanner"), generateModel: TSGenerateModel(json: viewModel.ptp_Anime))
+            if let generateModel = itemModel.generateModel{
+                kPushVC(target: self, modelVC: TSPTPUploadImageVC(itemModel:itemModel,generateModel: generateModel, sectionModel: TSDiscoverSectionModel()))
+            }
+        }else if cmd == "ptv" {
             kPushVC(target: self, modelVC:TSAIDiyVideoVC(diyVideoType: 0))
         }else if cmd == "ttv" {
             kPushVC(target: self, modelVC:TSAIDiyVideoVC(diyVideoType: 1))

+ 1 - 1
AIEmoji/Business2/DisCover/TSPTPUploadImageVC/TSPTPUploadImageVC+View.swift

@@ -30,7 +30,7 @@ extension TSPTPUploadImageVC {
             viewModel.selectedPTPStyleModel = model
             viewModel.selectedStyleIndex = indexPath.item
             
-            setTitleText(model.imageText.localized)
+            setNavTitle(title: model.imageText.localized)
             selectStyleVideoHandle()
         }
         

+ 18 - 3
AIEmoji/Business2/DisCover/TSPTPUploadImageVC/TSPTPUploadImageVC.swift

@@ -30,8 +30,7 @@ class TSPTPUploadImageVC: TSBaseVC {
     override func createView() {
         addNormalNavBarView()
         setPageTitle(viewModel.selectedPTPStyleModel.imageText.localized)
-//        setPageTitle(sectionModel.title.localized)
-        
+
         contentView.addSubview(uploadView)
         uploadView.snp.makeConstraints { make in
             make.leading.trailing.equalToSuperview()
@@ -57,7 +56,7 @@ class TSPTPUploadImageVC: TSBaseVC {
         addVideoPlayLogic()
 
     }
-    
+
     override func dealThings() {
         NotificationCenter.default.addObserver(self, selector: #selector(updateVipView), name: .kPurchaseDidChanged, object: nil)
         updateVipView()
@@ -109,3 +108,19 @@ extension TSPTPUploadImageVC {
         view.endEditing(true)
     }
 }
+
+
+
+
+extension TSPTPUploadImageVC {
+    func setNavTitle(title:String){
+        let btn = setTitleText(title,image:.ptpHint,space: 8,imageRight: true)
+        btn.addTarget(self, action: #selector(clickNavTitleBtn), for: .touchUpInside)
+    }
+    
+    @objc func clickNavTitleBtn(){
+        dePrint("1111")
+    }
+
+}
+

+ 5 - 3
AIEmoji/Common/NetworkManager/TSNetWork/TSNetWork+Business.swift

@@ -46,7 +46,7 @@ enum TSNeURLType:String {
             return baseChinaURL + self.rawValue
         }else{
             return baseURL + self.rawValue
-        }
+         }
     }
     
     var needValidate : Bool {
@@ -55,7 +55,7 @@ enum TSNeURLType:String {
     
     var isVideo:Bool{
         switch self {
-        case .createVideo,.videoV2,.photoAnimation:
+        case .createVideo,.videoV2,.photoAnimation,.text2Video,.img2video:
             return true
         default:
             return false
@@ -83,7 +83,9 @@ enum TSNeURLType:String {
          .overResolution,
          .changeClothes,
          .createVideo,
-         .videoV2
+         .videoV2,
+         .text2Video,
+         .img2video,
         ]
     }
 }

+ 2 - 2
AIEmoji/Common/Purchase/TSPurchaseManager+Free.swift

@@ -15,7 +15,7 @@ extension PurchaseManager {
             saveForDayGeneratedNum(type: type)
             saveForVipGeneratedNum(type: type)
         }else{
-            saveForFreeNum(type: type) //非会员的免费次数
+            saveForNoVipFreeNum(type: type) //非会员的免费次数
         }
     }
     
@@ -63,7 +63,7 @@ extension PurchaseManager {
 
     }
 
-    func saveForFreeNum(type: VipFreeNumType){
+    func saveForNoVipFreeNum(type: VipFreeNumType){
         var freeDict = getFreeDict()
         var freeNum = freeDict[type.rawValue] ?? 0
         if freeNum > 0 {

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

@@ -610,3 +610,5 @@
 "No effect uses left. Get more to keep creating." = "Keine Effektverwendungen mehr übrig. Holen Sie sich mehr, um weiter kreativ zu sein.";
 "View Usage Rules" = "Nutzungsregeln anzeigen";
 "Video Effects Pack Activated!" = "Videoeffektpaket aktiviert!";
+"Photo Filter" = "Fotofilter";
+"AI Videos" = "KI-Videos";

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

@@ -614,3 +614,5 @@ Small / Medium / Large: Manual amplitude selection ";
 "No effect uses left. Get more to keep creating." = "No effect uses left. Get more to keep creating.";
 "View Usage Rules" = "View Usage Rules";
 "Video Effects Pack Activated!" = "Video Effects Pack Activated!";
+"Photo Filter" = "Photo Filter";
+"AI Videos" = "AI Videos";

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

@@ -608,3 +608,5 @@
 "No effect uses left. Get more to keep creating." = "No quedan usos de efectos. Consigue más para seguir creando.";
 "View Usage Rules" = "Ver reglas de uso";
 "Video Effects Pack Activated!" = "¡Paquete de efectos de vídeo activado!";
+"Photo Filter" = "Filtro de fotos";
+"AI Videos" = "Vídeos de IA";

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

@@ -607,3 +607,5 @@
 "No effect uses left. Get more to keep creating." = "エフェクトの使用回数が残りわずかです。さらに使用して、引き続きエフェクトを作成しましょう。";
 "View Usage Rules" = "利用規則を見る";
 "Video Effects Pack Activated!" = "ビデオエフェクトパックが有効化されました!";
+"Photo Filter" = "写真フィルター";
+"AI Videos" = "AI ビデオ";

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

@@ -611,3 +611,5 @@
 "No effect uses left. Get more to keep creating." = "효과가 더 이상 남지 않았습니다. 더 많은 효과를 얻어 계속 창작하세요.";
 "View Usage Rules" = "사용 규칙 보기";
 "Video Effects Pack Activated!" = "비디오 효과 팩이 활성화되었습니다!";
+"Photo Filter" = "사진 필터";
+"AI Videos" = "AI 비디오";

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

@@ -607,3 +607,5 @@
 "No effect uses left. Get more to keep creating." = "Não há mais efeitos disponíveis. Obtenha mais para continuar criando.";
 "View Usage Rules" = "Ver regras de uso";
 "Video Effects Pack Activated!" = "Pacote de efeitos de vídeo ativado!";
+"Photo Filter" = "Filtro de fotos";
+"AI Videos" = "AI Videos";

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

@@ -606,3 +606,5 @@
 "No effect uses left. Get more to keep creating." = "Não há mais efeitos disponíveis. Obtenha mais para continuar criando.";
 "View Usage Rules" = "Ver regras de uso";
 "Video Effects Pack Activated!" = "Pacote de efeitos de vídeo ativado!";
+"Photo Filter" = "Filtro de fotos";
+"AI Videos" = "AI Videos";

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

@@ -609,3 +609,5 @@
 "No effect uses left. Get more to keep creating." = "视频特效次数已用光,获取更多继续创作。";
 "View Usage Rules" = "查看次数包规则";
 "Video Effects Pack Activated!" = "视频特效次数包已可用";
+"Photo Filter" = "图片滤镜";
+"AI Videos" = "AI 视频";

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

@@ -597,3 +597,5 @@
 "No effect uses left. Get more to keep creating." = "視頻特效次數已用光,獲取更多繼續創作。";
 "View Usage Rules" = "查看次數包規則";
 "Video Effects Pack Activated!" = "視頻特效次數包已可用";
+"Photo Filter" = "圖片濾鏡";
+"AI Videos" = "AI 視頻";