فهرست منبع

1.0(3)修改问题

kln 1 هفته پیش
والد
کامیت
45f0b00c0c
72فایلهای تغییر یافته به همراه293 افزوده شده و 141 حذف شده
  1. 25 15
      AIPlayRingtones.xcodeproj/project.pbxproj
  2. 1 0
      AIPlayRingtones/AppDelegate.swift
  3. 2 1
      AIPlayRingtones/AppPage/APAudioToRingVC/APAudioToRingVC+StackView.swift
  4. 1 17
      AIPlayRingtones/AppPage/APAudioToRingVC/APAudioToRingVC+Upload.swift
  5. 13 9
      AIPlayRingtones/AppPage/APAudioToRingVC/APAudioToRingVC.swift
  6. 4 3
      AIPlayRingtones/AppPage/APAudioToRingVC/VM/APAudioToRingVM.swift
  7. 18 16
      AIPlayRingtones/AppPage/APAudioToRingVC/View/ASRTRFileView.swift
  8. 7 1
      AIPlayRingtones/AppPage/APAudioToRingVC/View/ASRTRStyleView.swift
  9. 9 4
      AIPlayRingtones/AppPage/APMyRingVC/ASMyRingCell.swift
  10. 8 0
      AIPlayRingtones/AppPage/APMyRingVC/ASMyRingVC.swift
  11. 1 0
      AIPlayRingtones/AppPage/APRingTonesVC/APRingStyleVC/APRingStyleVC.swift
  12. 1 0
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/APRingTonesVC+StackView.swift
  13. 6 3
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/APRingTonesVC.swift
  14. 1 1
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/VM/APRingTonesVM.swift
  15. 1 1
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASDurationColView.swift
  16. 8 8
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASPromptTextView.swift
  17. 5 3
      AIPlayRingtones/AppPage/APSettingVC/APSettingVC+Col.swift
  18. 1 1
      AIPlayRingtones/AppPage/APSettingVC/APSettingVC.swift
  19. 39 0
      AIPlayRingtones/AppPage/APSettingVC/ASTutorialsVC/ASTutorialsVC.swift
  20. 24 18
      AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorBaseVC.swift
  21. 6 5
      AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorVC+load.swift
  22. 2 2
      AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorVC.swift
  23. 0 8
      AIPlayRingtones/AppPage/Common/Common.swift
  24. 22 0
      AIPlayRingtones/Assets.xcassets/Common/success_icon.imageset/Contents.json
  25. BIN
      AIPlayRingtones/Assets.xcassets/Common/success_icon.imageset/icon_已下载@2x.png
  26. BIN
      AIPlayRingtones/Assets.xcassets/Common/success_icon.imageset/icon_已下载@3x.png
  27. 21 0
      AIPlayRingtones/Assets.xcassets/Common/tutorials.imageset/Contents.json
  28. BIN
      AIPlayRingtones/Assets.xcassets/Common/tutorials.imageset/tutorials.png
  29. 0 0
      AIPlayRingtones/Common/ Notification+Ex.swift
  30. 0 0
      AIPlayRingtones/Common/AIEnums.swift
  31. 0 0
      AIPlayRingtones/Common/ASBusinessFileManager.swift
  32. 0 0
      AIPlayRingtones/Common/ASDownloadManager/ASDownloadManager.swift
  33. 15 0
      AIPlayRingtones/Common/Common.swift
  34. 0 0
      AIPlayRingtones/Common/CpuMapManager.swift
  35. 0 0
      AIPlayRingtones/Common/Ex/UIFont+TSEx.swift
  36. 0 0
      AIPlayRingtones/Common/TSAudioPlayer/TSAudioPlayer.swift
  37. 0 0
      AIPlayRingtones/Common/TSAudioPlayer/TSBusinessAudioPlayer.swift
  38. 0 0
      AIPlayRingtones/Common/TSBandRingTool/AudioConverter.h
  39. 0 0
      AIPlayRingtones/Common/TSBandRingTool/AudioConverter.m
  40. 0 0
      AIPlayRingtones/Common/TSBandRingTool/AudioTool.swift
  41. 0 0
      AIPlayRingtones/Common/TSBandRingTool/TSBandRingTool.swift
  42. 0 0
      AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHAudioProcessing.swift
  43. 0 0
      AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHCroppedDelegate.swift
  44. 0 0
      AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHTrackProcessing.swift
  45. 0 0
      AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHWaveformView.swift
  46. 0 0
      AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHWaveformViewDelegate.swift
  47. 0 0
      AIPlayRingtones/Common/TSBandRingTool/libmp3/ExtAudioConverter.h
  48. 0 0
      AIPlayRingtones/Common/TSBandRingTool/libmp3/ExtAudioConverter.m
  49. 0 0
      AIPlayRingtones/Common/TSBandRingTool/libmp3/lame.h
  50. 0 0
      AIPlayRingtones/Common/TSBandRingTool/libmp3/libmp3lame.a
  51. 0 0
      AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Contents/PkgInfo
  52. 0 0
      AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Media/kong.txt
  53. 0 0
      AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/assetsmetadata.plist
  54. 0 0
      AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/metadata.plist
  55. 0 0
      AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/output.plist
  56. 0 0
      AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/output.xyz
  57. 0 0
      AIPlayRingtones/Common/TSBandRingTool/placeholder.band/projectData
  58. 0 0
      AIPlayRingtones/Common/TSBandRingTool/tutorial-ring.mp4
  59. 0 0
      AIPlayRingtones/Common/TSNetWork/TSNetWork+Business.swift
  60. 2 2
      AIPlayRingtones/Common/TSNetWork/TSNetWork+Error.swift
  61. 0 0
      AIPlayRingtones/Common/TSNetWork/TSNetworkManager+Loading.swift
  62. 0 0
      AIPlayRingtones/Common/TSNetWork/TSNetworkManager.swift
  63. 0 0
      AIPlayRingtones/Common/TSPurchaseTool/TSPurchaseTool.swift
  64. 3 2
      AIPlayRingtones/CommonView/ASGeneratorView/ASGeneratorErrorView.swift
  65. 3 2
      AIPlayRingtones/CommonView/ASGeneratorView/ASGeneratorLoadingView.swift
  66. 4 4
      AIPlayRingtones/CommonView/ASGeneratorView/ASGeneratorView.swift
  67. 25 8
      AIPlayRingtones/CommonView/ASRingToneCellView.swift
  68. 0 0
      AIPlayRingtones/CommonView/Untitled.swift
  69. 3 1
      AIPlayRingtones/OperationQueue/Generate/ASGenerateBaseOperation.swift
  70. 12 6
      AIPlayRingtones/OperationQueue/Generate/ASGenerateTextToRingOperation.swift
  71. 0 0
      AIPlayRingtones/Resources/Dance.mp3
  72. 0 0
      AIPlayRingtones/Resources/Gentle.mp3

+ 25 - 15
AIPlayRingtones.xcodeproj/project.pbxproj

@@ -20,6 +20,7 @@
 		3DB4D4AA2DDDCEA50082596A /* Poppins-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3DB4D4A92DDDCEA50082596A /* Poppins-BoldItalic.otf */; };
 		3DB4D4AE2DDDCED00082596A /* UIFont+TSEx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4AB2DDDCED00082596A /* UIFont+TSEx.swift */; };
 		3DB4D4B22DDF0B960082596A /* FakeBlurView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4B12DDF0B940082596A /* FakeBlurView.swift */; };
+		3DB4D4B52DE025920082596A /* ASTutorialsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4B42DE025910082596A /* ASTutorialsVC.swift */; };
 		3DCD56F32DDAE3E3004AAB5B /* ASRingToneCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD56F22DDAE3DF004AAB5B /* ASRingToneCellView.swift */; };
 		3DCD56F52DDAE42A004AAB5B /* ASViewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD56F42DDAE421004AAB5B /* ASViewTool.swift */; };
 		3DCD56F92DDAE481004AAB5B /* TSBusinessAudioPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD56F62DDAE481004AAB5B /* TSBusinessAudioPlayer.swift */; };
@@ -44,8 +45,8 @@
 		3DCD57312DDB2A66004AAB5B /* ASGenerateRingToRingOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD57302DDB2A5D004AAB5B /* ASGenerateRingToRingOperation.swift */; };
 		3DCD57342DDB38E7004AAB5B /* ringAnimation.gif in Resources */ = {isa = PBXBuildFile; fileRef = 3DCD57322DDB38E7004AAB5B /* ringAnimation.gif */; };
 		3DCD57352DDB38E7004AAB5B /* rotatingAnimation.gif in Resources */ = {isa = PBXBuildFile; fileRef = 3DCD57332DDB38E7004AAB5B /* rotatingAnimation.gif */; };
-		3DCD57382DDB3FFA004AAB5B /* DanceRingtoneExample.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 3DCD57362DDB3FFA004AAB5B /* DanceRingtoneExample.mp3 */; };
-		3DCD57392DDB3FFA004AAB5B /* GentleRingtoneExample.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 3DCD57372DDB3FFA004AAB5B /* GentleRingtoneExample.mp3 */; };
+		3DCD57382DDB3FFA004AAB5B /* Dance.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 3DCD57362DDB3FFA004AAB5B /* Dance.mp3 */; };
+		3DCD57392DDB3FFA004AAB5B /* Gentle.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 3DCD57372DDB3FFA004AAB5B /* Gentle.mp3 */; };
 		3DCD573B2DDB4E61004AAB5B /* ASPageNullView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD573A2DDB4E5E004AAB5B /* ASPageNullView.swift */; };
 		3DCD573D2DDB5A3C004AAB5B /* ASMyRingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD573C2DDB5A2E004AAB5B /* ASMyRingCell.swift */; };
 		A800FEB22DDAC100009DABDC /* ASGeneratorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A800FEB12DDAC0FC009DABDC /* ASGeneratorView.swift */; };
@@ -111,8 +112,8 @@
 		3DB4D4A72DDC92530082596A /* ASBusinessWebVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASBusinessWebVC.swift; sourceTree = "<group>"; };
 		3DB4D4A92DDDCEA50082596A /* Poppins-BoldItalic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Poppins-BoldItalic.otf"; sourceTree = "<group>"; };
 		3DB4D4AB2DDDCED00082596A /* UIFont+TSEx.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+TSEx.swift"; sourceTree = "<group>"; };
-		3DB4D4B02DDF0B880082596A /* Untitled.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Untitled.swift; sourceTree = "<group>"; };
 		3DB4D4B12DDF0B940082596A /* FakeBlurView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeBlurView.swift; sourceTree = "<group>"; };
+		3DB4D4B42DE025910082596A /* ASTutorialsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASTutorialsVC.swift; sourceTree = "<group>"; };
 		3DCD56F22DDAE3DF004AAB5B /* ASRingToneCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASRingToneCellView.swift; sourceTree = "<group>"; };
 		3DCD56F42DDAE421004AAB5B /* ASViewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASViewTool.swift; sourceTree = "<group>"; };
 		3DCD56F62DDAE481004AAB5B /* TSBusinessAudioPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBusinessAudioPlayer.swift; sourceTree = "<group>"; };
@@ -141,8 +142,8 @@
 		3DCD57302DDB2A5D004AAB5B /* ASGenerateRingToRingOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASGenerateRingToRingOperation.swift; sourceTree = "<group>"; };
 		3DCD57322DDB38E7004AAB5B /* ringAnimation.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = ringAnimation.gif; sourceTree = "<group>"; };
 		3DCD57332DDB38E7004AAB5B /* rotatingAnimation.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = rotatingAnimation.gif; sourceTree = "<group>"; };
-		3DCD57362DDB3FFA004AAB5B /* DanceRingtoneExample.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = DanceRingtoneExample.mp3; sourceTree = "<group>"; };
-		3DCD57372DDB3FFA004AAB5B /* GentleRingtoneExample.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = GentleRingtoneExample.mp3; sourceTree = "<group>"; };
+		3DCD57362DDB3FFA004AAB5B /* Dance.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Dance.mp3; sourceTree = "<group>"; };
+		3DCD57372DDB3FFA004AAB5B /* Gentle.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = Gentle.mp3; sourceTree = "<group>"; };
 		3DCD573A2DDB4E5E004AAB5B /* ASPageNullView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASPageNullView.swift; sourceTree = "<group>"; };
 		3DCD573C2DDB5A2E004AAB5B /* ASMyRingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASMyRingCell.swift; sourceTree = "<group>"; };
 		6EFB792FA59CD8536D0BD11F /* Pods_AIPlayRingtones.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AIPlayRingtones.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -245,6 +246,14 @@
 			path = Ex;
 			sourceTree = "<group>";
 		};
+		3DB4D4B32DE0257A0082596A /* ASTutorialsVC */ = {
+			isa = PBXGroup;
+			children = (
+				3DB4D4B42DE025910082596A /* ASTutorialsVC.swift */,
+			);
+			path = ASTutorialsVC;
+			sourceTree = "<group>";
+		};
 		3DCD56F82DDAE481004AAB5B /* TSAudioPlayer */ = {
 			isa = PBXGroup;
 			children = (
@@ -319,7 +328,6 @@
 		A800FEAF2DDAC0E9009DABDC /* CommonView */ = {
 			isa = PBXGroup;
 			children = (
-				3DB4D4B02DDF0B880082596A /* Untitled.swift */,
 				3DB4D4B12DDF0B940082596A /* FakeBlurView.swift */,
 				3DCD573A2DDB4E5E004AAB5B /* ASPageNullView.swift */,
 				3DCD572E2DDB1D87004AAB5B /* ASRingLoadingView.swift */,
@@ -371,6 +379,7 @@
 		A848F8812DD6D1AF00B746EC /* AIPlayRingtones */ = {
 			isa = PBXGroup;
 			children = (
+				A848F88F2DD6D4E800B746EC /* Common */,
 				A800FEAF2DDAC0E9009DABDC /* CommonView */,
 				A848F8EF2DD7526600B746EC /* OperationQueue */,
 				A848F8E62DD74DF300B746EC /* Data */,
@@ -398,7 +407,6 @@
 				A848F8A22DD6D65900B746EC /* APRingTonesVC */,
 				A848F88C2DD6D2F700B746EC /* APLaunchVC */,
 				A800FEB92DDACAE7009DABDC /* ASRingGeneratorVC */,
-				A848F88F2DD6D4E800B746EC /* Common */,
 			);
 			path = AppPage;
 			sourceTree = "<group>";
@@ -474,6 +482,7 @@
 		A848F8A72DD6D74300B746EC /* APSettingVC */ = {
 			isa = PBXGroup;
 			children = (
+				3DB4D4B32DE0257A0082596A /* ASTutorialsVC */,
 				A848F8AC2DD6D75800B746EC /* APSettingVC.swift */,
 				3DB4D4A42DDC8E7B0082596A /* APSettingVC+Col.swift */,
 			);
@@ -550,8 +559,8 @@
 		A848F8D32DD7198100B746EC /* Resources */ = {
 			isa = PBXGroup;
 			children = (
-				3DCD57362DDB3FFA004AAB5B /* DanceRingtoneExample.mp3 */,
-				3DCD57372DDB3FFA004AAB5B /* GentleRingtoneExample.mp3 */,
+				3DCD57362DDB3FFA004AAB5B /* Dance.mp3 */,
+				3DCD57372DDB3FFA004AAB5B /* Gentle.mp3 */,
 				3DB4D4A92DDDCEA50082596A /* Poppins-BoldItalic.otf */,
 				3DCD57322DDB38E7004AAB5B /* ringAnimation.gif */,
 				3DCD57332DDB38E7004AAB5B /* rotatingAnimation.gif */,
@@ -689,8 +698,8 @@
 				A848F8D52DD719B600B746EC /* ring_duration.json in Resources */,
 				3DCD57222DDB1158004AAB5B /* tutorial-ring.mp4 in Resources */,
 				3DCD57232DDB1158004AAB5B /* placeholder.band in Resources */,
-				3DCD57382DDB3FFA004AAB5B /* DanceRingtoneExample.mp3 in Resources */,
-				3DCD57392DDB3FFA004AAB5B /* GentleRingtoneExample.mp3 in Resources */,
+				3DCD57382DDB3FFA004AAB5B /* Dance.mp3 in Resources */,
+				3DCD57392DDB3FFA004AAB5B /* Gentle.mp3 in Resources */,
 				A848F8842DD6D1AF00B746EC /* LaunchScreen.storyboard in Resources */,
 				3DB4D4A12DDC2CCE0082596A /* ring_rtr_style.json in Resources */,
 				A848F8E12DD7271900B746EC /* ring_ttr_style.json in Resources */,
@@ -760,6 +769,7 @@
 				3DB4D4A32DDC34100082596A /* ASRTRFileView.swift in Sources */,
 				A848F8E82DD74DFD00B746EC /* ASDBHistoryManager.swift in Sources */,
 				A848F89E2DD6D59C00B746EC /* TSNetWork+Business.swift in Sources */,
+				3DB4D4B52DE025920082596A /* ASTutorialsVC.swift in Sources */,
 				A848F8AB2DD6D75300B746EC /* ASMyRingVC.swift in Sources */,
 				A848F89F2DD6D59C00B746EC /* TSNetworkManager.swift in Sources */,
 				A848F8E32DD7286A00B746EC /* ASGenerateStyleModel.swift in Sources */,
@@ -849,7 +859,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = HR2R5NZ2MG;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIPlayRingtones/Info.plist;
@@ -863,7 +873,7 @@
 				);
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
-					"$(PROJECT_DIR)/AIPlayRingtones/AppPage/Common/TSBandRingTool/libmp3",
+					"$(PROJECT_DIR)/AIPlayRingtones/Common/TSBandRingTool/libmp3",
 				);
 				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.musicdownloader.ringtones;
@@ -886,7 +896,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 3;
 				DEVELOPMENT_TEAM = HR2R5NZ2MG;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = AIPlayRingtones/Info.plist;
@@ -900,7 +910,7 @@
 				);
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
-					"$(PROJECT_DIR)/AIPlayRingtones/AppPage/Common/TSBandRingTool/libmp3",
+					"$(PROJECT_DIR)/AIPlayRingtones/Common/TSBandRingTool/libmp3",
 				);
 				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.musicdownloader.ringtones;

+ 1 - 0
AIPlayRingtones/AppDelegate.swift

@@ -52,6 +52,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
 
     func initPlatform() {
         TSColorConfigShared.naviMianTextColor = .white
+        TSColorConfigShared.mainBg = .mainBg
     }
 }
 

+ 2 - 1
AIPlayRingtones/AppPage/APAudioToRingVC/APAudioToRingVC+StackView.swift

@@ -18,8 +18,9 @@ extension APAudioToRingVC {
         cusStackView.addSubviewToStack(fileView)
         cusStackView.addSubviewToStack(ASLeftHeaderView.creatTitleView(title: "Ringtone Genre".localized),length: kSectionTitleViewH)
         cusStackView.addSubviewToStack(customTextView)
-        cusStackView.addSpacing(length: 16.0)
+        cusStackView.addSpacing(length: 24.0)
         cusStackView.addSubviewToStack(ringStyleView)
+        cusStackView.addSpacing(length: 84)
     }
 
 }

+ 1 - 17
AIPlayRingtones/AppPage/APAudioToRingVC/APAudioToRingVC+Upload.swift

@@ -10,6 +10,7 @@ extension APAudioToRingVC {
     func creatFileView() -> ASRTRFileView {
         let fileView = ASRTRFileView { [weak self] in
             guard let self = self else { return }
+            TSBusinessAudioPlayer.shared.stop()
             selectAudioFile()
         } clickPlayComplete: { [weak self] in
             guard let self = self else { return }
@@ -74,23 +75,6 @@ extension APAudioToRingVC : UIDocumentPickerDelegate {
         TSFileManagerTool.copyFileWithOverwrite(from: selectedFileURL, to: cacheDirectory)
         viewModel.ringFilePath = cacheDirectory
         fileView.filePath = cacheDirectory
-        // 示例:读取文件数据(需处理权限)
-//        if selectedFileURL.startAccessingSecurityScopedResource() {
-//            defer { selectedFileURL.stopAccessingSecurityScopedResource() }
-//            
-//            do {
-//                dePrint("selectedFileURL=\(selectedFileURL)")
-//                let fileData = try Data(contentsOf: selectedFileURL)
-//                print("文件大小:", fileData.count, "字节")
-//                let cacheDirectory = TSFileManagerTool.cacheDirectory.appendingPathComponent(selectedFileURL.lastPathComponent)
-//                TSFileManagerTool.copyFileWithOverwrite(from: selectedFileURL, to: cacheDirectory)
-//                
-//                viewModel.ringFilePath = cacheDirectory
-//                fileView.filePath = cacheDirectory
-//            } catch {
-//                print("读取文件失败:", error.localizedDescription)
-//            }
-//        }
     }
 
     // 用户取消选择时回调

+ 13 - 9
AIPlayRingtones/AppPage/APAudioToRingVC/APAudioToRingVC.swift

@@ -10,7 +10,7 @@ import MobileCoreServices // 用于定义文件类型
 class APAudioToRingVC: TSBaseVC {
     lazy var navBarView: TSBaseNavContentBarView = {
         let navBarView = TSBaseNavContentBarView()
-
+        
         let titleImageView = UIImageView.createImageView(imageName: "nav_title_audioRingtone", contentMode: .scaleToFill)
         navBarView.barView.addSubview(titleImageView)
         titleImageView.snp.makeConstraints { make in
@@ -24,7 +24,7 @@ class APAudioToRingVC: TSBaseVC {
         return viewModel
     }()
     
-
+    
     //    lazy var vipBtn: UIButton = creatVipBtn()
     lazy var cusStackView: TSCustomStackView = creatCusStackView()
     lazy var fileView: ASRTRFileView = creatFileView()
@@ -37,24 +37,24 @@ class APAudioToRingVC: TSBaseVC {
         let tapGesture = UITapGestureRecognizer(target: self, action: #selector(clickView))
         tapGesture.cancelsTouchesInView = false
         view.addGestureRecognizer(tapGesture)
-
+        
         navBarContentView.addSubview(navBarView)
         navBarView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
-
+        
         contentView.addSubview(cusStackView)
         cusStackView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
-
+        
         contentView.addSubview(creatBtnView)
         creatBtnView.snp.makeConstraints { make in
             make.centerX.equalToSuperview()
             make.bottom.equalTo(-16)
             make.size.equalTo(creatBtnView.btnSize)
         }
-
+        
         setUpCusStackView()
         
     }
@@ -62,7 +62,7 @@ class APAudioToRingVC: TSBaseVC {
     override func dealThings() {
         viewModel.$isCanGennerate.receive(on: DispatchQueue.main).sink { [weak self] enble in
             guard let self = self else { return }
-            creatBtnView.setBtnEnabled(isEnabled: enble)
+            setCreatBtnEnabled()
         }.store(in: &cancellable)
         
         NotificationCenter.default.addObserver(forName: .kBaseOperationQueueCountChanged, object: nil, queue: .main) { [weak self] notification in
@@ -75,12 +75,17 @@ class APAudioToRingVC: TSBaseVC {
         NotificationCenter.default.addObserver(forName: .kGenerateRTROperationChanged, object: nil, queue: .main) { [weak self] notification in
             guard let self = self else { return }
             if let userInfo = notification.userInfo as? [String: Any], let state = userInfo["state"] as? ASProgressState {
-                if case let .progress(progress,progressString) = state {
+                if case let .progress(_,progressString) = state {
                     creatBtnView.setLoadingText(text: progressString)
                 }
             }
         }
     }
+    
+    override func viewWillDisappear(_ animated: Bool) {
+        super.viewWillDisappear(animated)
+        TSBusinessAudioPlayer.shared.stop()
+    }
 }
 
 extension APAudioToRingVC {
@@ -97,7 +102,6 @@ extension APAudioToRingVC {
             creatBtnView.setBtnEnabled(isEnabled: false)
             creatBtnView.loading = !isAvailability
         }
-
     }
     
     func generateAI() {

+ 4 - 3
AIPlayRingtones/AppPage/APAudioToRingVC/VM/APAudioToRingVM.swift

@@ -36,10 +36,11 @@ class APAudioToRingVM {
     init(){
         
        
-        Publishers.CombineLatest3($promptText, $ringFilePath,$selectedGenerateModel)
-              .map { promptText, ringFilePath,generateStyleModel in
+//        Publishers.CombineLatest3($promptText, $ringFilePath,$selectedGenerateModel)
+        Publishers.CombineLatest($ringFilePath,$selectedGenerateModel)
+              .map { ringFilePath,generateStyleModel in
                   // 当两者长度都 > 0 时返回 true
-                  return !promptText.isEmpty && ringFilePath != nil && generateStyleModel != nil
+                  return ringFilePath != nil && generateStyleModel != nil
               }
               .assign(to: \.isCanGennerate, on: self)
               .store(in: &cancellables)

+ 18 - 16
AIPlayRingtones/AppPage/APAudioToRingVC/View/ASRTRFileView.swift

@@ -23,15 +23,17 @@ class ASRTRFileUploadView: TSBaseView {
     }()
     
     lazy var btn: UIButton = {
-        let imageView = UIButton.createButton(image: .uploadFileAdd){ [weak self]  in
-            guard let self = self else { return }
-            clickComplete?()
-        }
+        let imageView = UIButton.createButton(image: .uploadFileAdd)
+//        { [weak self]  in
+//            guard let self = self else { return }
+//            clickComplete?()
+//        }
         return imageView
     }()
     
     override func creatUI() {
   
+        contentView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(clickView)))
         contentView.addSubview(imageView)
         imageView.snp.makeConstraints { make in
             make.leading.equalTo(12)
@@ -55,6 +57,10 @@ class ASRTRFileUploadView: TSBaseView {
             make.centerY.equalToSuperview()
         }
     }
+    
+    @objc func clickView(){
+        clickComplete?()
+    }
 }
 
 
@@ -70,11 +76,12 @@ class ASRTRFileplayView: TSBaseView {
         ringToneView.editBtn.isHidden = true
         ringToneView.clickPlayHandel = { [weak self] isplay in
             guard let self = self else { return }
+            ringView.monitorPlayStateDefaultHandle()
             clickPlayComplete?()
         }
         ringToneView.rightShade.isHidden = true
         ringToneView.bgImageView.isHidden = true
-        ringToneView.selectedBoardImageView.isHidden = true
+//        ringToneView.selectedBoardImageView.isHidden = true
         ringToneView.timeLab.textColor = .white.withAlphaComponent(0.8)
         ringToneView.nameLab.snp.updateConstraints { make in
             make.top.equalTo(20)
@@ -114,7 +121,7 @@ class ASRTRFileplayView: TSBaseView {
     }
     
     override func dealThings() {
-        ringView.monitorPlayStateDefaultHandle()
+        
     }
 
 }
@@ -150,11 +157,7 @@ class ASRTRFileView: TSBaseView {
             }
         }
     }
-    lazy var bgImageView: UIImageView = {
-        let bgImageView = UIImageView.createImageView(image: .textViewBg,contentMode: .scaleToFill)
-        return bgImageView
-    }()
-    
+
     lazy var uploadView: ASRTRFileUploadView = {
         let uploadView = ASRTRFileUploadView()
         uploadView.clickComplete = clickUpFileComplete
@@ -174,14 +177,11 @@ class ASRTRFileView: TSBaseView {
             make.height.equalTo(84)
             make.edges.equalTo(UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16))
         }
-        contentView.addSubview(bgImageView)
+        contentView.cornerRadius = 16.0
+        kAddCommonGradientBg(view: contentView)
         contentView.addSubview(playView)
         contentView.addSubview(uploadView)
         
-        bgImageView.snp.makeConstraints { make in
-            make.edges.equalToSuperview()
-        }
-        
         playView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
@@ -191,3 +191,5 @@ class ASRTRFileView: TSBaseView {
         }
     }
 }
+
+

+ 7 - 1
AIPlayRingtones/AppPage/APAudioToRingVC/View/ASRTRStyleView.swift

@@ -40,6 +40,7 @@ class ASRTRStyleView: TSBaseView {
 
         let layout = UICollectionViewFlowLayout()
         let cp = TSSimpleCollectionView()
+        cp.collectionView.isScrollEnabled = false
         cp.layout.minimumLineSpacing = 16
         cp.layout.minimumInteritemSpacing = 8
         cp.layout.scrollDirection = .vertical
@@ -116,8 +117,13 @@ class ASRTRStyleViewCell: TSBaseCollectionCell ,TSSimpleConfigurableView {
     }
 
     lazy var boardImageView: UIImageView = {
-        let boardImageView = UIImageView.createImageView(image: .ringTextSelectedBoard)
+        let boardImageView = UIImageView()//.createImageView(image: .ringTextSelectedBoard)
         boardImageView.isHidden = true
+        
+        DispatchQueue.main.async {
+            boardImageView.addGradientBorder(colors: ["#FF96F5".uiColor,"#F4F1EA".uiColor,"#5F7CFF".uiColor],width: 1.5,radius:16*kDesignScale,startPoint: CGPoint(x: 0.5, y: 0),endPoint: CGPoint(x: 0.5, y: 1))
+        }
+
         return boardImageView
     }()
 

+ 9 - 4
AIPlayRingtones/AppPage/APMyRingVC/ASMyRingCell.swift

@@ -317,10 +317,15 @@ extension ASMyRingCell {
         let needVip = infoModel.response.vip
         let urlString = infoModel.response.musicUrl
         let fileName = infoModel.response.title
-
-        ASDownloadManager.getDownLoadRing(urlString: urlString){ url,downLoad in
-            if let path = url {
-                _ = kshareBand(needVip: needVip, vc: targetVC, fileURL: path, fileName: fileName)
+        
+        
+        if let fileURL = infoModel.localURL {
+            _ = kshareBand(needVip: needVip, vc: targetVC, fileURL: fileURL, fileName: fileName)
+        }else{
+            ASDownloadManager.getDownLoadRing(urlString: urlString){ url,downLoad in
+                if let path = url {
+                    _ = kshareBand(needVip: needVip, vc: targetVC, fileURL: path, fileName: fileName)
+                }
             }
         }
     }

+ 8 - 0
AIPlayRingtones/AppPage/APMyRingVC/ASMyRingVC.swift

@@ -79,6 +79,11 @@ class APMyRingVC: TSBaseVC {
             make.edges.equalToSuperview()
         }
         
+        contentView.addSubview(pageNullView)
+        pageNullView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+        
         contentView.addSubview(collectionView)
         collectionView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
@@ -115,8 +120,11 @@ class APMyRingVC: TSBaseVC {
     }
     
     @objc func updateListView(){
+        dePrint("dbHistory.getModelList拿数据前,\(dbHistory.listModels.count))")
+        
         dbHistory.getModelList { [weak self] array in
             guard let self = self else { return }
+            dePrint("dbHistory.getModelList拿数据后,\(dbHistory.listModels.count))")
             listModelArray = array
             updateView()
         }

+ 1 - 0
AIPlayRingtones/AppPage/APRingTonesVC/APRingStyleVC/APRingStyleVC.swift

@@ -45,6 +45,7 @@ class APRingStyleVC: TSBaseVC {
 
         let layout = UICollectionViewFlowLayout()
         let cp = TSSimpleCollectionView()
+        cp.collectionView.isScrollEnabled = false
         cp.layout.minimumLineSpacing = 16
         cp.layout.minimumInteritemSpacing = 16
         cp.layout.scrollDirection = .vertical

+ 1 - 0
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/APRingTonesVC+StackView.swift

@@ -24,6 +24,7 @@ extension APRingTonesVC {
         cusStackView.addSubviewToStack(secStyleView, length: 36.0)
         cusStackView.addSubviewToStack(ASLeftHeaderView.creatTitleView(title: "Ringtone Genre".localized),length: kSectionTitleViewH)
         cusStackView.addSubviewToStack(ringStyleVC.view)
+        cusStackView.addSpacing(length: 84)
     }
 
 }

+ 6 - 3
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/APRingTonesVC.swift

@@ -51,7 +51,7 @@ class APRingTonesVC: TSBaseVC {
     override func dealThings() {
         viewModel.$isCanGennerate.receive(on: DispatchQueue.main).sink { [weak self] enble in
             guard let self = self else { return }
-            creatBtnView.setBtnEnabled(isEnabled: enble)
+            setCreatBtnEnabled()
         }.store(in: &cancellable)
         
         NotificationCenter.default.addObserver(forName: .kBaseOperationQueueCountChanged, object: nil, queue: .main) { [weak self] notification in
@@ -85,9 +85,12 @@ extension APRingTonesVC {
             creatBtnView.loading = false
         } else {
             creatBtnView.setBtnEnabled(isEnabled: false)
-            creatBtnView.loading = !isAvailability
+            
+            let loading = !isAvailability
+            if creatBtnView.loading != loading {
+                creatBtnView.loading = loading
+            }
         }
-
     }
     
     

+ 1 - 1
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/VM/APRingTonesVM.swift

@@ -53,7 +53,7 @@ class APRingTonesVM {
         Publishers.CombineLatest3($promptText, $generateSecModel,$selectedGenerateModel)
               .map { promptText, generateSecModel,generateStyleModel in
                   // 当两者长度都 > 0 时返回 true
-                  return !promptText.isEmpty && generateSecModel != nil && generateStyleModel != nil
+                  return !(promptText.replacingOccurrences(of: " ", with: "").isEmpty) && generateSecModel != nil && generateStyleModel != nil
               }
               .assign(to: \.isCanGennerate, on: self)
               .store(in: &cancellables)

+ 1 - 1
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASDurationColView.swift

@@ -30,7 +30,7 @@ class ASGenerateDurationColView: TSBaseView {
         let layout = UICollectionViewFlowLayout()
         let cp = TSSimpleCollectionView()
         cp.layout.itemSize = CGSize(width: 88, height: 36)
-        cp.layout.minimumLineSpacing = 8
+        cp.layout.minimumLineSpacing = 16
         cp.layout.minimumInteritemSpacing = 0
         cp.layout.scrollDirection = .horizontal
         cp.delegate = self

+ 8 - 8
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASPromptTextView.swift

@@ -35,13 +35,13 @@ class ASPromptTextView : TSBaseView{
     
     lazy var textBgView: UIView = {
         let textBgView = UIView()
-        
-        let bgImageView = UIImageView.createImageView(imageName: "textView_bg",contentMode: .scaleToFill)
-        textBgView.addSubview(bgImageView)
-        bgImageView.snp.makeConstraints { make in
-            make.edges.equalToSuperview()
-        }
-        
+        textBgView.cornerRadius = 16.0
+//        let bgImageView = UIImageView.createImageView(imageName: "textView_bg",contentMode: .scaleToFill)
+//        textBgView.addSubview(bgImageView)
+//        bgImageView.snp.makeConstraints { make in
+//            make.edges.equalToSuperview()
+//        }
+        kAddCommonGradientBg(view: textBgView)
         textBgView.addSubview(boardImageView)
         boardImageView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
@@ -105,7 +105,7 @@ class ASPromptTextView : TSBaseView{
         }
     }
     lazy var currenMunLab: UILabel = {
-        let numLab = UILabel.createLabel(text: "\(currenMun)",font: .font(name: .PingFangSC,size: 12),textColor: .white)
+        let numLab = UILabel.createLabel(text: "\(currenMun)",font: .font(name: .PingFangSC,size: 12),textColor: .white.withAlphaComponent(0.8))
         return numLab
     }()
     

+ 5 - 3
AIPlayRingtones/AppPage/APSettingVC/APSettingVC+Col.swift

@@ -102,15 +102,17 @@ class APSettingCell: TSBaseCollectionCell {
     }()
     
     lazy var infoLab: UILabel = {
-        let infoLab = UILabel.createLabel(text: appVersion(),font: .font(size: 14,weight: .regular),textColor: .white.withAlphaComponent(0.8),numberOfLines: 0)
+        let infoLab = UILabel.createLabel(text: appVersion(),font: .font(size: 16,weight: .regular),textColor: .white.withAlphaComponent(0.8),numberOfLines: 0)
         return infoLab
     }()
     
     override func creatUI() {
         bgContentView.clipsToBounds = true
         bgContentView.cornerRadius = 16.0
-        bgContentView.layer.borderWidth = 1
-        bgContentView.layer.borderColor = UIColor.white.withAlphaComponent(0.2).cgColor
+//        bgContentView.layer.borderWidth = 1
+//        bgContentView.layer.borderColor = UIColor.white.withAlphaComponent(0.2).cgColor
+        bgContentView.backgroundColor = "#202030".uiColor
+        
         
         bgContentView.addSubview(titleLab)
         titleLab.snp.makeConstraints { make in

+ 1 - 1
AIPlayRingtones/AppPage/APSettingVC/APSettingVC.swift

@@ -42,7 +42,7 @@ class APSettingVC: TSBaseVC {
                 rightIsHave: true,
                 tapBlock: { [weak self] model, _, _ in
                    guard let self = self else { return }
-                    TSToastShared.showToast(text: "教程")
+                    kPushVC(target: self, modelVC: ASTutorialsVC())
         }))
         
         //评价

+ 39 - 0
AIPlayRingtones/AppPage/APSettingVC/ASTutorialsVC/ASTutorialsVC.swift

@@ -0,0 +1,39 @@
+//
+//  ASTutorialsVC.swift
+//  AIPlayRingtones
+//
+//  Created by mini on 2025/5/22.
+//
+
+class ASTutorialsVC: TSBaseVC {
+
+    lazy var scrollView: UIScrollView = {
+        let scrollView = UIScrollView()
+        scrollView.backgroundColor = .clear
+        scrollView.translatesAutoresizingMaskIntoConstraints = false
+        scrollView.backgroundColor = .clear
+        scrollView.frame = self.contentView.bounds
+        scrollView.contentSize = imageView.size
+        return scrollView
+    }()
+    
+    lazy var imageView: UIImageView = {
+        let imageView = UIImageView.createImageView(imageName: "tutorials",contentMode: .scaleToFill)
+        
+        let imageWidth = imageView.image?.size.width ?? k_ScreenWidth
+        let imageHeight = imageView.image?.size.height ?? k_ScreenHeight
+    
+        let w = k_ScreenWidth-32
+        let scale = w / imageWidth
+        let scaledHeight = imageHeight * scale
+        imageView.frame = CGRectMake(16, 8, w, scaledHeight)
+        return imageView
+    }()
+    
+    override func createView() {
+        addNormalNavBarView()
+        setPageTitle("How to use?".localized)
+        contentView.addSubview(scrollView)
+        scrollView.addSubview(imageView)
+    }
+}

+ 24 - 18
AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorBaseVC.swift

@@ -7,7 +7,13 @@
 
 class ASRingGeneratorBaseVC: TSBaseVC {
     
-
+    lazy var topBgView: UIView = {
+        let topBgView = UIView(frame: CGRectMake(0, 0, k_ScreenWidth, k_ScreenHeight))
+        topBgView.backgroundColor = .black.withAlphaComponent(0.5)
+        topBgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(closePage)))
+        return topBgView
+    }()
+    
     var bottomViewH:CGFloat = 304{
         didSet{
             bottomView.frame = CGRectMake(0, k_ScreenHeight-bottomViewH, k_ScreenWidth, bottomViewH)
@@ -25,13 +31,13 @@ class ASRingGeneratorBaseVC: TSBaseVC {
         return titleLabel
     }()
     
-    lazy var closePageBtn: UIButton = {
-        let xBtn = UIButton.createButton(image: .pageX) { [weak self]  in
-            guard let self = self else { return }
-            closePage()
-        }
-        return xBtn
-    }()
+//    lazy var closePageBtn: UIButton = {
+//        let xBtn = UIButton.createButton(image: .pageX) { [weak self]  in
+//            guard let self = self else { return }
+//            closePage()
+//        }
+//        return xBtn
+//    }()
     
     lazy var xBtn: UIButton = {
         let xBtn = TSUIExpandedTouchButton()
@@ -44,7 +50,7 @@ class ASRingGeneratorBaseVC: TSBaseVC {
     
 
     lazy var saveBtn: UIButton = {
-        let saveBtn = UIButton.createButton(title:"Save".localized,backgroundImage:.setAsBg,font: UIFont.font(size: 14,weight: .medium),titleColor:.white)
+        let saveBtn = UIButton.createButton(title:"Set as Ringtone".localized,backgroundImage:.setAsBg,font: UIFont.font(size: 14,weight: .medium),titleColor:.white)
         { [weak self]  in
             guard let self = self else { return }
             clickSubmitBtn()
@@ -57,7 +63,7 @@ class ASRingGeneratorBaseVC: TSBaseVC {
 
         view.backgroundColor = TSColorConfigShared.mainBg.withAlphaComponent(0.6)
         setNavBarViewHidden(true)
-
+        contentView.addSubview(topBgView)
         contentView.addSubview(bottomView)
     
         let safeBottom = k_Height_safeAreaInsetsBottom()
@@ -85,16 +91,16 @@ class ASRingGeneratorBaseVC: TSBaseVC {
             make.width.equalTo(20)
             make.height.equalTo(20)
         }
-    
-        contentView.addSubview(closePageBtn)
-        closePageBtn.snp.makeConstraints { make in
-            make.top.equalTo(4.0+k_Height_StatusBar)
-            make.leading.equalTo(16.0)
-            make.width.height.equalTo(36)
-        }
+ 
+//        contentView.addSubview(closePageBtn)
+//        closePageBtn.snp.makeConstraints { make in
+//            make.top.equalTo(4.0+k_Height_StatusBar)
+//            make.leading.equalTo(16.0)
+//            make.width.height.equalTo(36)
+//        }
     }
     
-    func closePage() {
+    @objc func closePage() {
         self.dismiss(animated: true, completion: nil)
     }
 

+ 6 - 5
AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorVC+load.swift

@@ -11,7 +11,10 @@ extension ASRingGeneratorVC {
         let generateInView = ASGeneratorView()
         generateInView.animationView.setText(time: String(format: "~ %d min".localized, 2), info: "Lots of people are creating images right now, so this might take a bit.".localized)
 
-        
+        generateInView.clickClosePage = { [weak self] in
+            guard let self = self else { return }
+            closePage()
+        }
         generateInView.clickBackstageBlock = { [weak self]  in
             guard let self = self else { return }
             clickBackstageBtn()
@@ -22,10 +25,8 @@ extension ASRingGeneratorVC {
             
             switch style {
             case .netWorkError:
-//                clickTryAgainBtn()
-                self.dismiss(animated: true, completion: nil)
+                creatRintone()
             case .sensitiveError:
-//                pickSinglePhoto()
                 self.dismiss(animated: true, completion: nil)
             case .generalError:
                 self.dismiss(animated: true, completion: nil)
@@ -62,7 +63,7 @@ extension ASRingGeneratorVC {
     }
     
     func showLoading(){
-        generateInView.updateShowLoading(progress: 0.0,text: "Generating".localized + " ...")
+        generateInView.updateShowLoading(progress: 0.0,text: "Generating".localized + " 0%")
         bottomView.isHidden = true
     }
     

+ 2 - 2
AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorVC.swift

@@ -57,7 +57,7 @@ class ASRingGeneratorVC: ASRingGeneratorBaseVC {
     }
     
     @objc func clickBackstageBtn() {
-        self.operation?.isSaveProcessToDB = true
+        self.operation?.backstageGeneration()
         NotificationCenter.default.post(name: .kRingDataChanged, object: nil)
         self.dismiss(animated: true, completion: nil)
     }
@@ -136,12 +136,12 @@ class ASRingGeneratorVC: ASRingGeneratorBaseVC {
     }
     
     override func dealThings() {
+        self.uuidString = UUID().uuidString
         creatRintone()
     }
 
  
     func creatRintone() {
-        self.uuidString = UUID().uuidString
         if let model = self.infoModel{
             if model.actionStatus == .failed{
                 generatorCreatRing(oldModel: model)

+ 0 - 8
AIPlayRingtones/AppPage/Common/Common.swift

@@ -1,8 +0,0 @@
-//
-//  Common.swift
-//  AIPlayRingtones
-//
-//  Created by 100Years on 2025/5/15.
-//
-
-@_exported import TSSmalCoacopods

+ 22 - 0
AIPlayRingtones/Assets.xcassets/Common/success_icon.imageset/Contents.json

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

BIN
AIPlayRingtones/Assets.xcassets/Common/success_icon.imageset/icon_已下载@2x.png


BIN
AIPlayRingtones/Assets.xcassets/Common/success_icon.imageset/icon_已下载@3x.png


+ 21 - 0
AIPlayRingtones/Assets.xcassets/Common/tutorials.imageset/Contents.json

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

BIN
AIPlayRingtones/Assets.xcassets/Common/tutorials.imageset/tutorials.png


+ 0 - 0
AIPlayRingtones/AppPage/Common/ Notification+Ex.swift → AIPlayRingtones/Common/ Notification+Ex.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/AIEnums.swift → AIPlayRingtones/Common/AIEnums.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/ASBusinessFileManager.swift → AIPlayRingtones/Common/ASBusinessFileManager.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/ASDownloadManager/ASDownloadManager.swift → AIPlayRingtones/Common/ASDownloadManager/ASDownloadManager.swift


+ 15 - 0
AIPlayRingtones/Common/Common.swift

@@ -0,0 +1,15 @@
+//
+//  Common.swift
+//  AIPlayRingtones
+//
+//  Created by 100Years on 2025/5/15.
+//
+
+@_exported import TSSmalCoacopods
+
+func kAddCommonGradientBg(view:UIView){
+    view.setNeedsLayout()
+    DispatchQueue.main.async {
+        view.addGradientBg(colors: ["#202030".uiCGColor,"#343352".uiCGColor],startPoint: CGPoint(x: 0, y: 0),endPoint: CGPoint(x: 1, y: 0))
+    }
+}

+ 0 - 0
AIPlayRingtones/AppPage/Common/CpuMapManager.swift → AIPlayRingtones/Common/CpuMapManager.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/Ex/UIFont+TSEx.swift → AIPlayRingtones/Common/Ex/UIFont+TSEx.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSAudioPlayer/TSAudioPlayer.swift → AIPlayRingtones/Common/TSAudioPlayer/TSAudioPlayer.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSAudioPlayer/TSBusinessAudioPlayer.swift → AIPlayRingtones/Common/TSAudioPlayer/TSBusinessAudioPlayer.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/AudioConverter.h → AIPlayRingtones/Common/TSBandRingTool/AudioConverter.h


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/AudioConverter.m → AIPlayRingtones/Common/TSBandRingTool/AudioConverter.m


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/AudioTool.swift → AIPlayRingtones/Common/TSBandRingTool/AudioTool.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/TSBandRingTool.swift → AIPlayRingtones/Common/TSBandRingTool/TSBandRingTool.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/ZHWaveform/ZHAudioProcessing.swift → AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHAudioProcessing.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/ZHWaveform/ZHCroppedDelegate.swift → AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHCroppedDelegate.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/ZHWaveform/ZHTrackProcessing.swift → AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHTrackProcessing.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/ZHWaveform/ZHWaveformView.swift → AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHWaveformView.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/ZHWaveform/ZHWaveformViewDelegate.swift → AIPlayRingtones/Common/TSBandRingTool/ZHWaveform/ZHWaveformViewDelegate.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/libmp3/ExtAudioConverter.h → AIPlayRingtones/Common/TSBandRingTool/libmp3/ExtAudioConverter.h


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/libmp3/ExtAudioConverter.m → AIPlayRingtones/Common/TSBandRingTool/libmp3/ExtAudioConverter.m


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/libmp3/lame.h → AIPlayRingtones/Common/TSBandRingTool/libmp3/lame.h


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/libmp3/libmp3lame.a → AIPlayRingtones/Common/TSBandRingTool/libmp3/libmp3lame.a


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/placeholder.band/Contents/PkgInfo → AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Contents/PkgInfo


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/placeholder.band/Media/kong.txt → AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Media/kong.txt


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/placeholder.band/Output/assetsmetadata.plist → AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/assetsmetadata.plist


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/placeholder.band/Output/metadata.plist → AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/metadata.plist


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/placeholder.band/Output/output.plist → AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/output.plist


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/placeholder.band/Output/output.xyz → AIPlayRingtones/Common/TSBandRingTool/placeholder.band/Output/output.xyz


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/placeholder.band/projectData → AIPlayRingtones/Common/TSBandRingTool/placeholder.band/projectData


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSBandRingTool/tutorial-ring.mp4 → AIPlayRingtones/Common/TSBandRingTool/tutorial-ring.mp4


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSNetWork/TSNetWork+Business.swift → AIPlayRingtones/Common/TSNetWork/TSNetWork+Business.swift


+ 2 - 2
AIPlayRingtones/AppPage/Common/TSNetWork/TSNetWork+Error.swift → AIPlayRingtones/Common/TSNetWork/TSNetWork+Error.swift

@@ -20,11 +20,11 @@ enum TSNetWorkCode : Int {
     var errorMsg:String {
         switch self {
         case .textSensitive,.imageSensitive:
-            return "Your photo may contain copyright infringement, nudity, gore or violence that does not comply with the Health Policy, please replace the photo and try again.".localized
+            return "Your ringtone or text may contain copyright infringement, nudity, gore or violence that does not comply with the Health Policy, please replace the photo and try again.".localized
         case .networkError:
             return "No network, please check your network and try again.".localized
         default:
-            return "Sorry there was a slight problem with the image processing, please try again later.".localized
+            return "Sorry there was a slight problem with the ringtone processing, please try again later.".localized
         }
         
     }

+ 0 - 0
AIPlayRingtones/AppPage/Common/TSNetWork/TSNetworkManager+Loading.swift → AIPlayRingtones/Common/TSNetWork/TSNetworkManager+Loading.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSNetWork/TSNetworkManager.swift → AIPlayRingtones/Common/TSNetWork/TSNetworkManager.swift


+ 0 - 0
AIPlayRingtones/AppPage/Common/TSPurchaseTool/TSPurchaseTool.swift → AIPlayRingtones/Common/TSPurchaseTool/TSPurchaseTool.swift


+ 3 - 2
AIPlayRingtones/CommonView/ASGeneratorView/ASGeneratorErrorView.swift

@@ -40,8 +40,9 @@ class ASGeneratorErrorView: TSBaseView {
     }()
     
     lazy var submitBtn: UIButton = {
-        let btn = UIButton.createButton(title: "",font: .font(size: 16),titleColor: .themeColor,corner: 24)
-        btn.layer.borderColor = UIColor.themeColor.cgColor
+        let textColor = "#B48EFF".uiColor
+        let btn = UIButton.createButton(title: "Generate in the background".localized,font: .font(size: 16),titleColor: textColor,corner: 24)
+        btn.layer.borderColor = textColor.cgColor
         btn.layer.borderWidth = 1.0
         btn.titleLabel?.adjustsFontSizeToFitWidth = true
         return btn

+ 3 - 2
AIPlayRingtones/CommonView/ASGeneratorView/ASGeneratorLoadingView.swift

@@ -65,8 +65,9 @@ class ASGeneratorLoadingView : TSBaseView {
     }()
     
     lazy var backgroundGenerateBtn: UIButton = {
-        let btn = UIButton.createButton(title: "Generate in the background".localized,font: .font(size: 16),titleColor: .themeColor,corner: 24)
-        btn.layer.borderColor = UIColor.themeColor.cgColor
+        let textColor = "#B48EFF".uiColor
+        let btn = UIButton.createButton(title: "Generate in the background".localized,font: .font(size: 16),titleColor: textColor,corner: 24)
+        btn.layer.borderColor = textColor.cgColor
         btn.layer.borderWidth = 1.0
         btn.titleLabel?.adjustsFontSizeToFitWidth = true
         btn.isHidden = true

+ 4 - 4
AIPlayRingtones/CommonView/ASGeneratorView/ASGeneratorView.swift

@@ -21,7 +21,7 @@ class ASGeneratorView: TSBaseView {
     var style:Style = .generalError
     var clickBackstageBlock:(()->Void)?
     var clickErrorBlock:((Style)->Void)?
-    
+    var clickClosePage:(()->Void)?
     var isUploadImage:Bool = true{
         didSet {
             errorView.isUploadImage = isUploadImage
@@ -50,11 +50,11 @@ class ASGeneratorView: TSBaseView {
     }()
     
     lazy var xBtn: UIButton = {
-        let xBtn = UIButton.createButton(image: UIImage(named: "close_gray")) { [weak self]  in
+        let xBtn = UIButton.createButton(image: UIImage(named: "page_x")) { [weak self]  in
             guard let self = self else { return }
-            self.isHidden = true
+//            self.isHidden = true
+            clickClosePage?()
         }
-        xBtn.isHidden = true
         return xBtn
     }()
     

+ 25 - 8
AIPlayRingtones/CommonView/ASRingToneCellView.swift

@@ -38,7 +38,7 @@ class ASRingToneCellView: TSBaseView {
     }()
     
     let playBtn = UIButton.createButton(image: UIImage(named: "cell_ring_play"))
-    let nameLab = UILabel.createLabel(text: "--",font: .font(size: 14),textColor: .white)
+    let nameLab = UILabel.createLabel(text: "--",font: .font(size: 14),textColor: .white,numberOfLines: 1)
     let timeLab = UILabel.createLabel(text:"--:--",font: .font(size: 12),textColor: .white.withAlphaComponent(0.6))
     
  
@@ -190,7 +190,6 @@ class ASRingToneCellView: TSBaseView {
 extension ASRingToneCellView {
     
     func monitorPlayStateDefaultHandle(){
-        TSBusinessAudioPlayer.shared.stop()
         TSBusinessAudioPlayer.shared.stateChangedHandle = { [weak self] state  in
             guard let self = self else { return }
             DispatchQueue.main.async {
@@ -364,19 +363,37 @@ class TSRingProgressView:TSBaseView {
             make.height.equalTo(2)
         }
         
+//        generateProgressView.snp.makeConstraints { make in
+//            make.leading.top.bottom.equalTo(0)
+//            make.width.equalToSuperview().multipliedBy(0.0)
+//        }
+        
         generateProgressView.snp.makeConstraints { make in
-            make.leading.top.bottom.equalTo(0)
-            make.width.equalToSuperview().multipliedBy(0.0)
+            make.edges.equalToSuperview()
         }
-    
         
+        
+        let maskLayer = CAShapeLayer()
+        maskLayer.path = UIBezierPath(
+            roundedRect: CGRect(x: 0, y: 0, width: self.width * CGFloat(progress) , height: self.height),
+            cornerRadius: 1
+        ).cgPath
+        generateProgressView.layer.mask = maskLayer
     }
 
     func setProgress(progress:Float) {
-        generateProgressView.snp.remakeConstraints{ make in
-            make.leading.top.bottom.equalTo(0)
-            make.width.equalToSuperview().multipliedBy(progress)
+//        generateProgressView.snp.remakeConstraints{ make in
+//            make.leading.top.bottom.equalTo(0)
+//            make.width.equalToSuperview().multipliedBy(progress)
+//        }
+        
+        if let maskLayer = generateProgressView.layer.mask as? CAShapeLayer {
+            maskLayer.path = UIBezierPath(
+                roundedRect: CGRect(x: 0, y: 0, width: self.width * CGFloat(progress) , height: self.height),
+                cornerRadius: 1
+            ).cgPath
         }
+
     }
     
     

+ 0 - 0
AIPlayRingtones/CommonView/Untitled.swift


+ 3 - 1
AIPlayRingtones/OperationQueue/Generate/ASGenerateBaseOperation.swift

@@ -87,6 +87,7 @@ class ASGenerateBaseOperation: ASBaseOperation , @unchecked Sendable{
             }
         }
     }
+    
     var currentActionInfoModelChanged:((ASActionInfoModel)->Void)?
     var stateDataPblishedChanged:((ASProgressState,ASActionInfoModel?)->Void)?
     @Published var currentActionInfoModel: ASActionInfoModel = ASActionInfoModel()
@@ -101,7 +102,8 @@ class ASGenerateBaseOperation: ASBaseOperation , @unchecked Sendable{
     
     func handleGenerateSuccess(){}
     func saveDataDB(){}
-
+    func backstageGeneration(){}
+    
     func handleFailInfoModel(errorString:String?,code:Int = 0){
         self.currentActionInfoModel.actionStatus = .failed
         self.currentActionInfoModel.status = "failed"

+ 12 - 6
AIPlayRingtones/OperationQueue/Generate/ASGenerateTextToRingOperation.swift

@@ -61,6 +61,11 @@ class ASGenerateTextToRingOperation: ASGenerateBaseOperation , @unchecked Sendab
         currentActionInfoModelChanged?(currentActionInfoModel)
     }
 
+    override func backstageGeneration(){
+        isSaveProcessToDB = true
+        isShowSuccessView = true
+    }
+    
     override func saveDataDB() {
         if currentActionInfoModel.id == 0 {
             return
@@ -92,7 +97,8 @@ class ASGenerateTextToRingOperation: ASGenerateBaseOperation , @unchecked Sendab
         let copyModel = self.currentActionInfoModel.copy()
         if let cyModel = copyModel as? ASActionInfoModel {
             let topY = k_Nav_Height+10
-            debugPrint("topY=\(topY)")
+//            debugPrint("topY=\(topY)")
+            playVibration()
             kSaveSuccesswShared.show(atView: window,text: "Successfully generated".localized,deadline: 5.0,bottom: kSaveSuccesswShared.getBottom(topY: topY)) {
                 let gennerateVC = ASRingGeneratorVC(generateStyleModel: ASGenerateStyleModel(),infoModel: cyModel) { model in }
                 gennerateVC.modalPresentationStyle = .overFullScreen
@@ -130,7 +136,7 @@ class ASGenerateTextToRingOperation: ASGenerateBaseOperation , @unchecked Sendab
         return infoModel
     }
     
-//    //测试接口
+    //测试接口
 //    func creatRing(oldModel:ASActionInfoModel,complete:@escaping (Bool)->Void) {
 //        
 //        initializeActionInfoModel(oldModel: oldModel)
@@ -143,9 +149,9 @@ class ASGenerateTextToRingOperation: ASGenerateBaseOperation , @unchecked Sendab
 //        currentActionInfoModel.percent = 0
 //        replaceSaveInfoModel(model: currentActionInfoModel)
 //        
-//        stateDatauPblished = (.progress(0.0,generating(progress: 0.0)),currentActionInfoModel)
+////        stateDatauPblished = (.progress(0.0,generating(progress: 0.0)),currentActionInfoModel)
 // 
-//        let infoModel = ASActionInfoModel(JSONString: "{\"id\":54914,\"actionType\":\"music_create\",\"request\":\"{\\\"prompt\\\": \\\"Dynamic ringtone, memorable hook, balanced highs and lows, versatile for any phone, Generate a Folk ringtone with a fingerpicked acoustic guitar melody and light percussion. Use a BPM of 80-90 for a warm, earthy feel.\\\", \\\"duration\\\": 5, \\\"audioUrl\\\": null, \\\"countryCode\\\": \\\"CN\\\"}\",\"response\":\"{\\\"title\\\": \\\"Whispering Pines Melody\\\", \\\"musicUrl\\\": \\\"https://be-aigc.s3-accelerate.amazonaws.com/b6651963-c501-4c91-a424-fc2bec0e60ad.wav\\\"}\",\"createdTimestamp\":1747660794,\"status\":\"success\",\"costTime\":7,\"estimateCost\":60,\"percent\":1.0}")
+//        let infoModel = ASActionInfoModel(JSONString: "{\"id\":54914,\"actionType\":\"music_create\",\"request\":\"{\\\"prompt\\\": \\\"Dynamic ringtone, memorable hook, balanced highs and lows, versatile for any phone, Generate a Folk ringtone with a fingerpicked acoustic guitar melody and light percussion. Use a BPM of 80-90 for a warm, earthy feel.\\\", \\\"duration\\\": 5, \\\"audioUrl\\\": null, \\\"countryCode\\\": \\\"CN\\\"}\",\"response\":\"{\\\"title\\\": \\\"Whispering Pines Melody Whispering Pines Melody Whispering Pines Melody Whispering Pines Melody\\\", \\\"musicUrl\\\": \\\"https://be-aigc.s3-accelerate.amazonaws.com/b6651963-c501-4c91-a424-fc2bec0e60ad.wav\\\"}\",\"createdTimestamp\":1747660794,\"status\":\"success\",\"costTime\":7,\"estimateCost\":60,\"percent\":1.0}")
 //        
 //        let sendProgress:(Float,ASActionInfoModel)->Void = { [weak self] progress,infoModel in
 //            guard let self = self else { return }
@@ -200,8 +206,8 @@ class ASGenerateTextToRingOperation: ASGenerateBaseOperation , @unchecked Sendab
         currentActionInfoModel.percent = 0
         replaceSaveInfoModel(model: currentActionInfoModel)
         
-        stateDatauPblished = (.progress(0.0,generating(progress: 0.0)),currentActionInfoModel)
- 
+        //stateDatauPblished = (.progress(0.0,generating(progress: 0.0)),currentActionInfoModel)
+
         
         let request = currentActionInfoModel.request
         var prompt = request.prompt

+ 0 - 0
AIPlayRingtones/Resources/DanceRingtoneExample.mp3 → AIPlayRingtones/Resources/Dance.mp3


+ 0 - 0
AIPlayRingtones/Resources/GentleRingtoneExample.mp3 → AIPlayRingtones/Resources/Gentle.mp3