Sfoglia il codice sorgente

遴选了
1.vip 年费放第一位,加上save 60%
2.增加风格收费机制

100Years 2 settimane fa
parent
commit
9057ad94c2

+ 6 - 1
AIEmoji/Business/TSPTPGeneratorVC/TSPhotoToPhotoVC/TSPhotoToPhotoVC.swift

@@ -216,8 +216,13 @@ extension TSPhotoToPhotoVC {
     
     func generateImage() {
         
+        var isVip = kPurchaseDefault.freeNumAvailable(type: .picToPic) == false
+        if viewModel.selectedPTPStyleModel?.isVip == true {
+            isVip = true
+        }
+        
         //判断 vip
-        if kJudgeVip(externalBool: kPurchaseDefault.freeNumAvailable(type: .picToPic) == false, vc: self) { [weak self] in
+        if kJudgeVip(externalBool: isVip, vc: self) { [weak self] in
             guard let self = self else { return }
         }{ return }
         

+ 6 - 9
AIEmoji/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift

@@ -264,18 +264,17 @@ struct PurchaseView :View {
             VStack(spacing: 12) {
                 
                 ZStack(alignment: .topTrailing) {
-                    PurchaseItemView(title: "One Month", type: .month, selectedType: $viewModel.selectedType).onTapGesture {
-                        viewModel.selectedType = .month
+                    PurchaseItemView(title: "One Year", type: .year, selectedType: $viewModel.selectedType).onTapGesture {
+                        viewModel.selectedType = .year
                     }
                     TSVipRecView()
                         .offset(y:-14)
                 }
           
                 HStack {
-                    PurchaseItemView(title: "One Year", type: .year, selectedType: $viewModel.selectedType).onTapGesture {
-                        viewModel.selectedType = .year
+                    PurchaseItemView(title: "One Month", type: .month, selectedType: $viewModel.selectedType).onTapGesture {
+                        viewModel.selectedType = .month
                     }
-                    
                     PurchaseItemView(title: "One Week", type: .week, selectedType: $viewModel.selectedType).onTapGesture {
                         viewModel.selectedType = .week
                     }
@@ -358,12 +357,10 @@ struct PurchaseItemView: View {
 //推荐选择view
 struct TSVipRecView: View {
     var body: some View {
-        
-        let corner = 16.0
-        
+    
         HStack(spacing: 4) {
             Image("upvote_black").resizable().frame(width: 16, height: 16)
-            Text("80% Choose").font(.font(size: 12,weight: .medium)).foregroundColor(.hex("#111111"))
+            Text("Save 60%").font(.font(size: 12,weight: .medium)).foregroundColor(.hex("#111111"))
         }
         .padding(EdgeInsets(top: 6, leading: 6, bottom: 6, trailing: 6))
         .background(Color.hex("#FECB34"))

+ 5 - 1
AIEmoji/Business/TSTextGeneralPictureVC/TSTTPInputVC/TSTTPInputVC.swift

@@ -126,9 +126,13 @@ class TSTTPInputVC: TSBaseVC {
 
 extension TSTTPInputVC {
     func generateImage() {
+        var isVip = kPurchaseDefault.freeNumAvailable(type: .textGeneratePic) == false
+        if viewModel.selectPromptModel?.isVip == true {
+            isVip = true
+        }
         
         //判断 vip
-        if kJudgeVip(externalBool: kPurchaseDefault.freeNumAvailable(type: .textGeneratePic) == false, vc: self) {[weak self] in
+        if kJudgeVip(externalBool: isVip, vc: self) { [weak self] in
             guard let self = self else { return }
         }{ return }
         

+ 5 - 2
AIEmoji/Business/VIewTool/TSCommonloadingView.swift

@@ -33,7 +33,8 @@ class TSCommonloadingView: TSBaseView {
     }()
     
     lazy var textLabel: UILabel = {
-        let textLabel = UILabel.createLabel(font: .font(size: 12),textColor: .fromHex("#FFFFFF",alpha: 0.6))
+//        let textLabel = UILabel.createLabel(font: .font(size: 12),textColor: .fromHex("#FFFFFF",alpha: 0.6))
+        let textLabel = UILabel.createLabel(font: .font(size: 18),textColor: .white)
         return textLabel
     }()
     
@@ -94,7 +95,9 @@ class TSCommonloadingView: TSBaseView {
     
     /// 开始旋转
     func startRotating(view:UIView,duration: Double = 2.0) {
-        animatedImageView.startAnimating()
+        kDelayMainShort {
+            self.animatedImageView.startAnimating()
+        }
     }
 
     /// 停止旋转

+ 1 - 1
AIEmoji/Res/photo_to_photo_style.json

@@ -4,7 +4,7 @@
         "imageText": "Ghibli",
         "prompt":"ghibli style",
         "style":1,
-        "isVip": false
+        "isVip": true
     },
     {
         "imageName": "ptp_style_0",

+ 1 - 1
AIEmoji/Res/text_to_photo_style.json

@@ -4,7 +4,7 @@
         "imageText": "Ghibli",
         "prompt":"ghibli ${user_input}, Studio Ghibli-styled masterpiece,(Miyazaki's pastel palette:teal|ochre|coral), dynamic cloud shadows, (hand-drawn line imperfections:1.2), 3/4 perspective view,  (nature reclaiming civilization motif), (Kiki's Delivery Service lighting:1.1),  --no 3D,octane,hyperrealistic,digital art --style_boost 80",
         "style":1,
-        "isVip": false
+        "isVip": true
     },
     {
         "imageName": "ttp_style_0",