Kaynağa Gözat

1.增加周订阅
2.去掉 AI 聊天收费功能
3.1.8(2)打包

100Years 1 ay önce
ebeveyn
işleme
b6111f552e
29 değiştirilmiş dosya ile 208 ekleme ve 104 silme
  1. 20 6
      AIEmoji.xcodeproj/project.pbxproj
  2. 1 1
      AIEmoji.xcodeproj/xcshareddata/xcschemes/AIEmoji.xcscheme
  3. 2 2
      AIEmoji/Assets.xcassets/Common/launch_text.imageset/Contents.json
  4. BIN
      AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@2x.png
  5. BIN
      AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@3x.png
  6. BIN
      AIEmoji/Assets.xcassets/Common/launch_title.imageset/launch_title@2x.png
  7. BIN
      AIEmoji/Assets.xcassets/Common/launch_title.imageset/launch_title@3x.png
  8. BIN
      AIEmoji/Assets.xcassets/VIP/setting_noVip.imageset/setting_noVip@2x.png
  9. BIN
      AIEmoji/Assets.xcassets/VIP/setting_noVip.imageset/setting_noVip@3x.png
  10. BIN
      AIEmoji/Assets.xcassets/VIP/setting_vip.imageset/setting_vip@2x.png
  11. BIN
      AIEmoji/Assets.xcassets/VIP/setting_vip.imageset/setting_vip@3x.png
  12. 22 0
      AIEmoji/Assets.xcassets/VIP/setting_vip_bj.imageset/Contents.json
  13. BIN
      AIEmoji/Assets.xcassets/VIP/setting_vip_bj.imageset/setting_vip_bj@2x.png
  14. BIN
      AIEmoji/Assets.xcassets/VIP/setting_vip_bj.imageset/setting_vip_bj@3x.png
  15. 22 0
      AIEmoji/Assets.xcassets/VIP/upvote_black.imageset/Contents.json
  16. BIN
      AIEmoji/Assets.xcassets/VIP/upvote_black.imageset/upvote_black@2x.png
  17. BIN
      AIEmoji/Assets.xcassets/VIP/upvote_black.imageset/upvote_black@3x.png
  18. BIN
      AIEmoji/Assets.xcassets/VIP/vip_big_icon.imageset/vip_big_icon@2x.png
  19. BIN
      AIEmoji/Assets.xcassets/VIP/vip_big_icon.imageset/vip_big_icon@3x.png
  20. 4 4
      AIEmoji/Base.lproj/LaunchScreen.storyboard
  21. 6 6
      AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController+NaviBar.swift
  22. 9 9
      AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController+SendMsg.swift
  23. 27 27
      AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController+VipView.swift
  24. 10 10
      AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController.swift
  25. 40 15
      AIEmoji/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift
  26. 33 16
      AIEmoji/Business/TSSetingVC/SetingVC/View/SettingPurchaseTopView.swift
  27. 4 4
      AIEmoji/Business/TSTabBarController/TSTabBarController.swift
  28. 1 0
      AIEmoji/Common/NetworkManager/TSNetWork/TSNetworkManager.swift
  29. 7 4
      AIEmoji/Common/Purchase/TSPurchaseManager.swift

+ 20 - 6
AIEmoji.xcodeproj/project.pbxproj

@@ -48,6 +48,7 @@
 		A85E47BE2D68999B0018D62D /* ShareActivityItemProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = A85E47BD2D68999B0018D62D /* ShareActivityItemProvider.swift */; };
 		A85E47C02D6961BB0018D62D /* TSChatMessageUIModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A85E47BF2D6961B90018D62D /* TSChatMessageUIModel.swift */; };
 		A85E47C32D6964A50018D62D /* TSMSGAIDefaultHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A85E47C22D69646D0018D62D /* TSMSGAIDefaultHeaderView.swift */; };
+		A85E47C62D697E750018D62D /* SwiftUIX in Frameworks */ = {isa = PBXBuildFile; productRef = A85E47C52D697E750018D62D /* SwiftUIX */; };
 		A89EA64B2D59A588000EB181 /* MessageKit in Frameworks */ = {isa = PBXBuildFile; productRef = A89EA64A2D59A588000EB181 /* MessageKit */; };
 		A89EA6542D59A9F4000EB181 /* TSTextLayoutSizeCalculator.swift in Sources */ = {isa = PBXBuildFile; fileRef = A89EA64F2D59A9F4000EB181 /* TSTextLayoutSizeCalculator.swift */; };
 		A89EA6552D59A9F4000EB181 /* TSChatMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A89EA6502D59A9F4000EB181 /* TSChatMessage.swift */; };
@@ -268,6 +269,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				A85E47C62D697E750018D62D /* SwiftUIX in Frameworks */,
 				A89EA64B2D59A588000EB181 /* MessageKit in Frameworks */,
 				D34BB2B8FE0DBF83E06A3FC4 /* Pods_AIEmoji.framework in Frameworks */,
 			);
@@ -1067,6 +1069,7 @@
 			minimizedProjectReferenceProxies = 1;
 			packageReferences = (
 				A89EA6492D59A588000EB181 /* XCRemoteSwiftPackageReference "MessageKit" */,
+				A85E47C42D697E750018D62D /* XCLocalSwiftPackageReference "../SwiftUIX-master" */,
 			);
 			preferredProjectObjectVersion = 77;
 			productRefGroup = A8F7746A2D38E8B000AA6E93 /* Products */;
@@ -1281,12 +1284,12 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIEmoji/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = HahaEmoji;
+				INFOPLIST_KEY_CFBundleDisplayName = TalkTalk;
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Allow us to access Photos in order to save emoji to your device.";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
@@ -1297,7 +1300,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.7;
+				MARKETING_VERSION = 1.8;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -1320,12 +1323,12 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIEmoji/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = HahaEmoji;
+				INFOPLIST_KEY_CFBundleDisplayName = TalkTalk;
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Allow us to access Photos in order to save emoji to your device.";
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
@@ -1336,7 +1339,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.7;
+				MARKETING_VERSION = 1.8;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -1492,6 +1495,13 @@
 		};
 /* End XCConfigurationList section */
 
+/* Begin XCLocalSwiftPackageReference section */
+		A85E47C42D697E750018D62D /* XCLocalSwiftPackageReference "../SwiftUIX-master" */ = {
+			isa = XCLocalSwiftPackageReference;
+			relativePath = "../SwiftUIX-master";
+		};
+/* End XCLocalSwiftPackageReference section */
+
 /* Begin XCRemoteSwiftPackageReference section */
 		A89EA6492D59A588000EB181 /* XCRemoteSwiftPackageReference "MessageKit" */ = {
 			isa = XCRemoteSwiftPackageReference;
@@ -1504,6 +1514,10 @@
 /* End XCRemoteSwiftPackageReference section */
 
 /* Begin XCSwiftPackageProductDependency section */
+		A85E47C52D697E750018D62D /* SwiftUIX */ = {
+			isa = XCSwiftPackageProductDependency;
+			productName = SwiftUIX;
+		};
 		A89EA64A2D59A588000EB181 /* MessageKit */ = {
 			isa = XCSwiftPackageProductDependency;
 			package = A89EA6492D59A588000EB181 /* XCRemoteSwiftPackageReference "MessageKit" */;

+ 1 - 1
AIEmoji.xcodeproj/xcshareddata/xcschemes/AIEmoji.xcscheme

@@ -31,7 +31,7 @@
       shouldAutocreateTestPlan = "YES">
    </TestAction>
    <LaunchAction
-      buildConfiguration = "Release"
+      buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"

+ 2 - 2
AIEmoji/Assets.xcassets/Common/launch_title.imageset/Contents.json → AIEmoji/Assets.xcassets/Common/launch_text.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "launch_title@2x.png",
+      "filename" : "launch_text@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "launch_title@3x.png",
+      "filename" : "launch_text@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@2x.png


BIN
AIEmoji/Assets.xcassets/Common/launch_text.imageset/launch_text@3x.png


BIN
AIEmoji/Assets.xcassets/Common/launch_title.imageset/launch_title@2x.png


BIN
AIEmoji/Assets.xcassets/Common/launch_title.imageset/launch_title@3x.png


BIN
AIEmoji/Assets.xcassets/VIP/setting_noVip.imageset/setting_noVip@2x.png


BIN
AIEmoji/Assets.xcassets/VIP/setting_noVip.imageset/setting_noVip@3x.png


BIN
AIEmoji/Assets.xcassets/VIP/setting_vip.imageset/setting_vip@2x.png


BIN
AIEmoji/Assets.xcassets/VIP/setting_vip.imageset/setting_vip@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/VIP/setting_vip_bj.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/VIP/setting_vip_bj.imageset/setting_vip_bj@2x.png


BIN
AIEmoji/Assets.xcassets/VIP/setting_vip_bj.imageset/setting_vip_bj@3x.png


+ 22 - 0
AIEmoji/Assets.xcassets/VIP/upvote_black.imageset/Contents.json

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

BIN
AIEmoji/Assets.xcassets/VIP/upvote_black.imageset/upvote_black@2x.png


BIN
AIEmoji/Assets.xcassets/VIP/upvote_black.imageset/upvote_black@3x.png


BIN
AIEmoji/Assets.xcassets/VIP/vip_big_icon.imageset/vip_big_icon@2x.png


BIN
AIEmoji/Assets.xcassets/VIP/vip_big_icon.imageset/vip_big_icon@3x.png


+ 4 - 4
AIEmoji/Base.lproj/LaunchScreen.storyboard

@@ -16,14 +16,14 @@
                         <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_title" translatesAutoresizingMaskIntoConstraints="NO" id="FfL-7D-71P">
-                                <rect key="frame" x="94.333333333333329" y="298" width="204.66666666666669" height="110.66666666666669"/>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_text" translatesAutoresizingMaskIntoConstraints="NO" id="FfL-7D-71P">
+                                <rect key="frame" x="65" y="325" width="263.33333333333331" height="42"/>
                             </imageView>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
                         <color key="backgroundColor" red="0.027450980392156862" green="0.031372549019607843" blue="0.047058823529411764" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstItem="FfL-7D-71P" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" constant="298" id="2qH-25-nud"/>
+                            <constraint firstItem="FfL-7D-71P" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" constant="325" id="2qH-25-nud"/>
                             <constraint firstItem="FfL-7D-71P" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="9uZ-As-aWB"/>
                         </constraints>
                     </view>
@@ -34,6 +34,6 @@
         </scene>
     </scenes>
     <resources>
-        <image name="launch_title" width="204.66667175292969" height="110.66666412353516"/>
+        <image name="launch_text" width="263.33334350585938" height="42"/>
     </resources>
 </document>

+ 6 - 6
AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController+NaviBar.swift

@@ -64,12 +64,12 @@ extension TSChatViewController {
             make.width.height.equalTo(24)
         }
         
-        navBarView.barView.addSubview(vipBtn)
-        vipBtn.snp.makeConstraints { make in
-            make.centerY.equalToSuperview()
-            make.trailing.equalTo(-60)
-            make.width.height.equalTo(24)
-        }
+//        navBarView.barView.addSubview(vipBtn)
+//        vipBtn.snp.makeConstraints { make in
+//            make.centerY.equalToSuperview()
+//            make.trailing.equalTo(-60)
+//            make.width.height.equalTo(24)
+//        }
         
         return navBarView
     }

+ 9 - 9
AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController+SendMsg.swift

@@ -9,10 +9,10 @@ extension TSChatViewController {
     
     func inputSendMsg(_ data: [Any]) {
         
-        //判断 vip
-        if kJudgeVip(externalBool: kPurchaseDefault.freeNumAvailable(type: .aichat) == false, vc: self, closePageBlock: {[weak self] in
-            guard let self = self else { return }
-        }){ return }
+//        //判断 vip
+//        if kJudgeVip(externalBool: kPurchaseDefault.freeNumAvailable(type: .aichat) == false, vc: self, closePageBlock: {[weak self] in
+//            guard let self = self else { return }
+//        }){ return }
         
         inputBarVC.emptyInput()
         
@@ -81,7 +81,7 @@ extension TSChatViewController {
             guard let self = self else { return }
             if let _ = data {
                 message.sendState = .success("netData")
-                kPurchaseDefault.useOnceForFree(type: .aichat)//消耗一次 AI 次数
+//                kPurchaseDefault.useOnceForFree(type: .aichat)//消耗一次 AI 次数
                 message.kind = .attributedText(kMDAttributedString(text: viewModel.AiMDString))
             }else {
                 message.kind = .attributedText(kMDAttributedString(text: kAIErrorString))
@@ -92,10 +92,10 @@ extension TSChatViewController {
             kExecuteOnMainThread {
                 NotificationCenter.default.post(name: .kAIAnsweringNotification, object: nil, userInfo: [kIsAIAnswering: false])
                 
-                //更新 Vip
-                if kPurchaseDefault.isVip == false{
-                    self.updateVipView()
-                }
+//                //更新 Vip
+//                if kPurchaseDefault.isVip == false{
+//                    self.updateVipView()
+//                }
                 
                 if self.scrollToBottomButton.isHidden == true {
                     self.scrollToBottom()

+ 27 - 27
AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController+VipView.swift

@@ -69,32 +69,32 @@ extension TSChatViewController {
 
 extension TSChatViewController{
     
-    func updateVipView() {
-        inputBarTopView.subviews.forEach { $0.removeFromSuperview()}
-        
-        if viewModel.uiStyle == .chat ,
-           kPurchaseDefault.isVip == false
-        {
-            let freeNum = kPurchaseDefault.freeNum(type: .aichat)
-            if freeNum > 0 {
-                freeText.text = "Remaining \(freeNum) free times"
-                inputBarTopView.addSubview(freeText)
-                freeText.snp.makeConstraints { make in
-                    make.leading.equalTo(20)
-                    make.trailing.equalTo(-20)
-                    make.bottom.equalTo(-8)
-                    make.top.equalTo(8)
-                }
-            }else{
-                inputBarTopView.addSubview(upgradeVipBg)
-                upgradeVipBg.snp.makeConstraints { make in
-                    make.leading.equalTo(16)
-                    make.trailing.equalTo(-16)
-                    make.bottom.equalTo(-2)
-                    make.top.equalTo(14)
-                }
-            }
-        }
-    }
+//    func updateVipView() {
+//        inputBarTopView.subviews.forEach { $0.removeFromSuperview()}
+//        
+//        if viewModel.uiStyle == .chat ,
+//           kPurchaseDefault.isVip == false
+//        {
+//            let freeNum = kPurchaseDefault.freeNum(type: .aichat)
+//            if freeNum > 0 {
+//                freeText.text = "Remaining \(freeNum) free times"
+//                inputBarTopView.addSubview(freeText)
+//                freeText.snp.makeConstraints { make in
+//                    make.leading.equalTo(20)
+//                    make.trailing.equalTo(-20)
+//                    make.bottom.equalTo(-8)
+//                    make.top.equalTo(8)
+//                }
+//            }else{
+//                inputBarTopView.addSubview(upgradeVipBg)
+//                upgradeVipBg.snp.makeConstraints { make in
+//                    make.leading.equalTo(16)
+//                    make.trailing.equalTo(-16)
+//                    make.bottom.equalTo(-2)
+//                    make.top.equalTo(14)
+//                }
+//            }
+//        }
+//    }
 
 }

+ 10 - 10
AIEmoji/Business/AIChat/TSChatViewController/TSChatViewController/TSChatViewController.swift

@@ -32,7 +32,7 @@ class TSChatViewController: MessagesViewController, MessagesDataSource {
     lazy var messageList: [TSChatMessage] = []
     
     //导航栏
-    lazy var vipBtn: UIButton = creatVipBtn
+//    lazy var vipBtn: UIButton = creatVipBtn
     lazy var navBarView: TSBaseNavContentBarView = creatNavBarView
     lazy var navBarContentView: UIView = creatNavBarContentView
     lazy var normalNavBarView: TSNormalNavigationBarView = creatNormalNavBarView
@@ -65,15 +65,15 @@ class TSChatViewController: MessagesViewController, MessagesDataSource {
         configureMessageCollectionView()
         configureMessageInputBar()
         loadFirstMessages()
-        updateVipView()
+//        updateVipView()
         dealThings()
     }
     
     
     func dealThings(){
         
-        vipBtn.isHidden = PurchaseManager.default.isVip
-        NotificationCenter.default.addObserver(self, selector: #selector(vipInfoChanged), name: .kPurchaseDidChanged, object: nil)
+//        vipBtn.isHidden = PurchaseManager.default.isVip
+//        NotificationCenter.default.addObserver(self, selector: #selector(vipInfoChanged), name: .kPurchaseDidChanged, object: nil)
         
         if viewModel.uiStyle == .chat {
             // 注册通知监听,App死的时候,保存本次聊天记录到本地
@@ -81,12 +81,12 @@ class TSChatViewController: MessagesViewController, MessagesDataSource {
         }
     }
     
-    @objc func vipInfoChanged() {
-        kExecuteOnMainThread {
-            self.vipBtn.isHidden = PurchaseManager.default.isVip
-            self.updateVipView()
-        }
-    }
+//    @objc func vipInfoChanged() {
+//        kExecuteOnMainThread {
+//            self.vipBtn.isHidden = PurchaseManager.default.isVip
+//            self.updateVipView()
+//        }
+//    }
 
     @objc func saveChatList() {
         messageList.removeFirst()

+ 40 - 15
AIEmoji/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift

@@ -7,10 +7,10 @@
 
 import Combine
 import SwiftUI
-
+import SwiftUIX
 class PurchaseViewModel : ObservableObject{
     
-    @Published var selectedType: PremiumPeriod = .year
+    @Published var selectedType: PremiumPeriod = .month
     
     /// 订阅publisher
     let buyPublisher  = PassthroughSubject<Bool,Never>()
@@ -222,7 +222,7 @@ struct PurchaseView :View {
             Spacer().frame(height: 44)
             
             VStack {
-                Image("vip_big_icon").resizable().frame(width: 203, height: 108)
+                Image("vip_big_icon").resizable().frame(width: 263, height: 63)
                 Spacer().frame(height: 16)
                 
                 Text("Premium")
@@ -237,19 +237,22 @@ struct PurchaseView :View {
                 
                 ZStack {
                     VStack(alignment: .leading,spacing: 8) {
+                        
                         HStack(spacing: 8) {
                             Image("check").resizable().frame(width: 24, height: 24)
-                            Text("Unlock all Emojis Include AI")
+                            Text("Unlimited Wallpaper")
                         }
+                        
                         HStack(spacing: 8) {
                             Image("check").resizable().frame(width: 24, height: 24)
-                            Text("Unlimited AI Chat")
+                            Text("Unlimited AI Emoji")
                         }
                         
                         HStack(spacing: 8) {
                             Image("check").resizable().frame(width: 24, height: 24)
                             Text("100% No Ads").multilineTextAlignment(.leading)
                         }
+                        
                     }.font(.font(size: 16)).foregroundColor(UIColor.lesserText.color)
                 }
          
@@ -259,20 +262,25 @@ struct PurchaseView :View {
             
             
             VStack(spacing: 12) {
-//                PurchaseItemView(title: "Lifetime", type: .lifetime, selectedType: $viewModel.selectedType).onTapGesture {
-//                    viewModel.selectedType = .lifetime
-//                }
-//                HStack {
-                    PurchaseItemView(title: "Yearly", type: .year, selectedType: $viewModel.selectedType).onTapGesture {
+                
+                ZStack(alignment: .topTrailing) {
+                    PurchaseItemView(title: "One Month", type: .month, selectedType: $viewModel.selectedType).onTapGesture {
+                        viewModel.selectedType = .month
+                    }
+                    TSVipRecView()
+                        .offset(y:-14)
+                }
+          
+                HStack {
+                    PurchaseItemView(title: "One Year", type: .year, selectedType: $viewModel.selectedType).onTapGesture {
                         viewModel.selectedType = .year
                     }
                     
-                    PurchaseItemView(title: "Monthly", type: .month, selectedType: $viewModel.selectedType).onTapGesture {
-                        viewModel.selectedType = .month
+                    PurchaseItemView(title: "One Week", type: .week, selectedType: $viewModel.selectedType).onTapGesture {
+                        viewModel.selectedType = .week
                     }
-//                }
-                
-                
+                }
+
                 Button {
                     viewModel.buyPublisher.send(true)
                 } label: {
@@ -346,3 +354,20 @@ 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"))
+        }
+        .padding(EdgeInsets(top: 6, leading: 6, bottom: 6, trailing: 6))
+        .background(Color.hex("#FECB34"))
+        .frame(height: 28) // 设置高度
+        .cornerRadius([.topLeading, .topTrailing, .bottomLeading], 16.0)
+    }
+}

+ 33 - 16
AIEmoji/Business/TSSetingVC/SetingVC/View/SettingPurchaseTopView.swift

@@ -11,42 +11,59 @@ struct SettingPurchaseTopView: View {
     var body: some View {
         ZStack {
             
-
+            Image(.settingVipBj).resizable().frame(width: 343*kDesignScale, height: 118*kDesignScale)
+            
             if isViper {
-                Image(.settingVip).resizable().frame(width: 343*kDesignScale, height: 117*kDesignScale)
+                
                 VStack {
+                    Spacer().frame(height: 20)
+                    
+                    Image(.settingVip).resizable().frame(width: 210*kDesignScale, height: 50*kDesignScale)
+                    
                     Spacer()
-        
+                    
                     Text("Due Date:".localized + " \(PurchaseManager.default.expiredDateString)")
                         .foregroundColor(.white.opacity(0.6))
                         .font(.font(size: 14,weight: .medium))
                         .frame(height: 14)
 
-                    Spacer().frame(height: 13)
+                    Spacer().frame(height: 22)
                 }
             }else {
-                Image(.settingNoVip).resizable().frame(width: 343*kDesignScale, height: 117*kDesignScale)
+                
                 HStack {
+                    Spacer().frame(width:20)
+                    
+                    VStack(alignment: .leading,spacing: 12) {
+                        Image(.settingNoVip).resizable().frame(width: 186*kDesignScale, height: 44*kDesignScale)
+                        
+                        HStack {
+                            Text("Limited Time Discount")
+                                .font(.font(size: 14))
+                                .frame(height: 14)
+                                .foregroundColor(UIColor.white.withAlphaComponent(0.6).color)
+                            
+                            Spacer()
+                        }
+                    }
+                    
                     Spacer()
                     
                     Text("Upgrade")
                         .font(.font(size: 14,weight: .medium))
                         .padding(EdgeInsets(top: 0, leading: 12, bottom: 0, trailing: 12))
-                        .frame(height: 34)
+                        .frame(height: 26) // 设置高度
                         .foregroundColor("#010101".uiColor.color)
                         .background(UIColor.themeColor.color)
-                        .cornerRadius(14.0)
-                    
-                    .frame(height: 26) // 设置高度
-                    .cornerRadius(14.0) // 圆角
-                    .onTapGesture {
-                        if PurchaseManager.default.isVip {
-                            return
+                        .cornerRadius(13.0) // 圆角
+                        .onTapGesture {
+                            if PurchaseManager.default.isVip {
+                                return
+                            }
+                            eventPublisher.enterPurchasePublisher.send(true)
                         }
-                        eventPublisher.enterPurchasePublisher.send(true)
-                    }
 
-                    Spacer().frame(width: 24)
+                        Spacer().frame(width: 15)
                 }
             }
         }

+ 4 - 4
AIEmoji/Business/TSTabBarController/TSTabBarController.swift

@@ -24,18 +24,18 @@ class TSTabBarController: UITabBarController {
     }
 
     @objc private func setUpData() {
-        viewControllerArray = ["TSEmojisVC","TSChatViewController", "TSTextGeneralPictureVC", "TSSetingVC"]
-        titleArray = ["Emojis","Chat","Wallpaper","Setting"]
+        viewControllerArray = ["TSChatViewController", "TSTextGeneralPictureVC","TSEmojisVC","TSSetingVC"]
+        titleArray = ["Chat","Wallpaper","Emojis","Setting"]
         selectedImageArray = [
-            "tabbar_select_emoji",
             "tabbar_select_aichat",
             "tabbar_select_pic",
+            "tabbar_select_emoji",
             "tabbar_select_setting"
         ]
         unselectedImageArray = [
-            "tabbar_unSelect_emoji",
             "tabbar_unSelect_aichat",
             "tabbar_unSelect_pic",
+            "tabbar_unSelect_emoji",
             "tabbar_unSelect_setting"
         ]
 

+ 1 - 0
AIEmoji/Common/NetworkManager/TSNetWork/TSNetworkManager.swift

@@ -72,6 +72,7 @@ class TSNetworkManager {
                     debugPrint("Stream Request failed with error: \(error)")
                     completion(.failure(error))
                 } else {
+                    debugPrint("Stream success")
                     completion(.success("Stream success"))
                 }
             }

+ 7 - 4
AIEmoji/Common/Purchase/TSPurchaseManager.swift

@@ -10,6 +10,7 @@ import StoreKit
 
 public enum PremiumPeriod: String, CaseIterable {
     case none           = ""
+    case week          = "Week"
     case month          = "Monthly"
     case year           = "Yearly"
     case lifetime       = "Lifetime"
@@ -72,9 +73,11 @@ public class PurchaseManager: NSObject {
     
     //商品信息
     public lazy var purchaseProducts:[PurchaseProduct] = {
-        return [PurchaseProduct(productId: "101", period:.month),
-                PurchaseProduct(productId: "102", period: .year),
-                //PurchaseProduct(productId: "003", period: .lifetime),
+        return [
+            PurchaseProduct(productId: "101", period:.month),
+            PurchaseProduct(productId: "102", period:.year),
+            PurchaseProduct(productId: "103", period:.week),
+            //PurchaseProduct(productId: "003", period: .lifetime),
         ]
     }()
 
@@ -140,7 +143,7 @@ public class PurchaseManager: NSObject {
 
     @objc public var isVip: Bool {
         #if DEBUG
-        return true
+            return true
         #endif
         guard let expiresDate = expiredDate else {
             return false