瀏覽代碼

加入了动画新的框架

南鑫林 5 年之前
父節點
當前提交
0a9e51483c

+ 3 - 0
RainbowPlanet/Podfile

@@ -23,6 +23,7 @@ target 'RainbowPlanet' do
 #  pod 'Nuke'
 #  pod 'Nuke-WebP-Plugin'
 #  pod 'Gifu'
+  pod 'lottie-ios'
   # 自动布局
   pod 'SnapKit'
   # 键盘
@@ -59,6 +60,8 @@ target 'RainbowPlanet' do
   pod 'YYText'
   # 生成二维码
   pod 'EFQRCode'
+  
+  pod 'ESTabBarController-swift'
 
 
   #======================第三方平台===========

+ 9 - 1
RainbowPlanet/Podfile.lock

@@ -27,6 +27,7 @@ PODS:
   - DPScrollNumberLabel (0.0.2)
   - EFQRCode (5.0.0):
     - swift_qrcodejs (~> 1.1.1)
+  - ESTabBarController-swift (2.7)
   - FlickerNumber (1.1)
   - FMDB (2.7.5):
     - FMDB/standard (= 2.7.5)
@@ -39,6 +40,7 @@ PODS:
   - JXSegmentedView (0.0.19)
   - KeychainAccess (3.2.0)
   - Kingfisher (4.10.1)
+  - lottie-ios (3.1.1)
   - LYEmptyView (1.2.5)
   - MBProgressHUD (1.1.0)
   - MJRefresh (3.2.0)
@@ -101,6 +103,7 @@ DEPENDENCIES:
   - DeviceKit
   - DPScrollNumberLabel
   - EFQRCode
+  - ESTabBarController-swift
   - FlickerNumber
   - FMDB
   - FSPagerView
@@ -110,6 +113,7 @@ DEPENDENCIES:
   - JXSegmentedView
   - KeychainAccess
   - Kingfisher
+  - lottie-ios
   - LYEmptyView
   - MBProgressHUD
   - MJRefresh
@@ -150,6 +154,7 @@ SPEC REPOS:
     - DeviceKit
     - DPScrollNumberLabel
     - EFQRCode
+    - ESTabBarController-swift
     - FlickerNumber
     - FMDB
     - FSPagerView
@@ -159,6 +164,7 @@ SPEC REPOS:
     - JXSegmentedView
     - KeychainAccess
     - Kingfisher
+    - lottie-ios
     - LYEmptyView
     - MBProgressHUD
     - MJRefresh
@@ -197,6 +203,7 @@ SPEC CHECKSUMS:
   DeviceKit: 72d36709552d4b3582abd76a53949148acad9811
   DPScrollNumberLabel: 5124eaccf3029bb84116de391e1273cba676f4f5
   EFQRCode: 07437cfbce3a1e497397a4f3d766c980d8972608
+  ESTabBarController-swift: 4fb52ad03d94d0717ef97bc9eb09a5abfdded0a2
   FlickerNumber: bce41da51904d533393d69e9734df6281ab1c646
   FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
   FSPagerView: 816a18842306973cc7cc6df8a5332272f7815c30
@@ -206,6 +213,7 @@ SPEC CHECKSUMS:
   JXSegmentedView: 6e22381bd1e6f0767fc078bef1947b13b2d337a1
   KeychainAccess: 3b1bf8a77eb4c6ea1ce9404c292e48f948954c6b
   Kingfisher: c148cd7b47ebde9989f6bc7c27dcaa79d81279a0
+  lottie-ios: 43a472d22b2dd2bed292cc4010c0b4d2e66d3ba8
   LYEmptyView: b17adfc2dd9ad2988ecaf7c9606efa916e24c767
   MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9
   MJRefresh: ed450d6eb9d3346a2cb033ab7eb6de090aeef437
@@ -232,6 +240,6 @@ SPEC CHECKSUMS:
   YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
   ZipArchive: e25a4373192673e3229ac8d6e9f64a3e5713c966
 
-PODFILE CHECKSUM: 8e48d2e487f9af2ea1c81a1a83257657a358f8e7
+PODFILE CHECKSUM: a683ae249b5230efda703d124f5b0a2e42caae45
 
 COCOAPODS: 1.7.4

+ 44 - 2
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -202,6 +202,10 @@
 		A75B782A22DEC8B3007B986A /* RedemptionAreaSpecialTwoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75B782922DEC8B3007B986A /* RedemptionAreaSpecialTwoTableViewCell.swift */; };
 		A75B782C22DEC908007B986A /* SpecialTwoTypeCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75B782B22DEC908007B986A /* SpecialTwoTypeCollectionViewCell.swift */; };
 		A75B783022DF2CBF007B986A /* Extension+WKWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75B782F22DF2CBF007B986A /* Extension+WKWebView.swift */; };
+		A75B787A22E07A51007B986A /* messageModuleTabbar.json in Resources */ = {isa = PBXBuildFile; fileRef = A75B787622E07A50007B986A /* messageModuleTabbar.json */; };
+		A75B787B22E07A51007B986A /* communityModuleTabbar.json in Resources */ = {isa = PBXBuildFile; fileRef = A75B787722E07A50007B986A /* communityModuleTabbar.json */; };
+		A75B787C22E07A51007B986A /* shoppingMallModuleTabbar.json in Resources */ = {isa = PBXBuildFile; fileRef = A75B787822E07A50007B986A /* shoppingMallModuleTabbar.json */; };
+		A75B787D22E07A51007B986A /* MineModuleTabbar.json in Resources */ = {isa = PBXBuildFile; fileRef = A75B787922E07A50007B986A /* MineModuleTabbar.json */; };
 		A75C474E22938B3900139C0C /* OrderFreightTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75C474D22938B3900139C0C /* OrderFreightTableViewCell.swift */; };
 		A7636AC52268139C00374F9E /* LocationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7636AC42268139C00374F9E /* LocationViewController.swift */; };
 		A7636AC822682BAF00374F9E /* LocationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7636AC722682BAF00374F9E /* LocationView.swift */; };
@@ -903,6 +907,10 @@
 		A75B782922DEC8B3007B986A /* RedemptionAreaSpecialTwoTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RedemptionAreaSpecialTwoTableViewCell.swift; sourceTree = "<group>"; };
 		A75B782B22DEC908007B986A /* SpecialTwoTypeCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialTwoTypeCollectionViewCell.swift; sourceTree = "<group>"; };
 		A75B782F22DF2CBF007B986A /* Extension+WKWebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Extension+WKWebView.swift"; sourceTree = "<group>"; };
+		A75B787622E07A50007B986A /* messageModuleTabbar.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = messageModuleTabbar.json; sourceTree = "<group>"; };
+		A75B787722E07A50007B986A /* communityModuleTabbar.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = communityModuleTabbar.json; sourceTree = "<group>"; };
+		A75B787822E07A50007B986A /* shoppingMallModuleTabbar.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = shoppingMallModuleTabbar.json; sourceTree = "<group>"; };
+		A75B787922E07A50007B986A /* MineModuleTabbar.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = MineModuleTabbar.json; sourceTree = "<group>"; };
 		A75C474D22938B3900139C0C /* OrderFreightTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderFreightTableViewCell.swift; sourceTree = "<group>"; };
 		A7636AC42268139C00374F9E /* LocationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationViewController.swift; sourceTree = "<group>"; };
 		A7636AC722682BAF00374F9E /* LocationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationView.swift; sourceTree = "<group>"; };
@@ -2306,6 +2314,7 @@
 		A72A725422321B9400B21995 /* Manager */ = {
 			isa = PBXGroup;
 			children = (
+				A75B785A22E02635007B986A /* GifManager */,
 				A743229922B8C1440017C367 /* AppStoreManager */,
 				A73A56DC22DC9CB8004920FE /* UpdateVersionManager */,
 				A797FDE922C5AC570076DCB3 /* CacheManager */,
@@ -2506,8 +2515,8 @@
 		A72C011E227539800065E0C3 /* Src */ = {
 			isa = PBXGroup;
 			children = (
-				A7190166227543DB00104A50 /* baidu_cityid_rel.json */,
-				A72C01212275404A0065E0C3 /* province_city_area.json */,
+				A75B787522E079BC007B986A /* AnimationJSON */,
+				A75B783422DFFDFE007B986A /* json */,
 			);
 			path = Src;
 			sourceTree = "<group>";
@@ -2719,6 +2728,33 @@
 			path = SpecialLayout;
 			sourceTree = "<group>";
 		};
+		A75B783422DFFDFE007B986A /* json */ = {
+			isa = PBXGroup;
+			children = (
+				A7190166227543DB00104A50 /* baidu_cityid_rel.json */,
+				A72C01212275404A0065E0C3 /* province_city_area.json */,
+			);
+			path = json;
+			sourceTree = "<group>";
+		};
+		A75B785A22E02635007B986A /* GifManager */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = GifManager;
+			sourceTree = "<group>";
+		};
+		A75B787522E079BC007B986A /* AnimationJSON */ = {
+			isa = PBXGroup;
+			children = (
+				A75B787722E07A50007B986A /* communityModuleTabbar.json */,
+				A75B787622E07A50007B986A /* messageModuleTabbar.json */,
+				A75B787922E07A50007B986A /* MineModuleTabbar.json */,
+				A75B787822E07A50007B986A /* shoppingMallModuleTabbar.json */,
+			);
+			path = AnimationJSON;
+			sourceTree = "<group>";
+		};
 		A7636ABD2268123B00374F9E /* LocationModule */ = {
 			isa = PBXGroup;
 			children = (
@@ -5804,7 +5840,9 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				A75B787C22E07A51007B986A /* shoppingMallModuleTabbar.json in Resources */,
 				A7D77DE922DDBEF70048D5F6 /* RedemptionAreaModule.xcassets in Resources */,
+				A75B787A22E07A51007B986A /* messageModuleTabbar.json in Resources */,
 				BDD5483422C31752005BBE19 /* AlivcShortVideoImage.bundle in Resources */,
 				A7CC74DE22703B4A003C4F38 /* MineModule.xcassets in Resources */,
 				A7BF202422B392D600396DB3 /* CommunityModule.xcassets in Resources */,
@@ -5814,8 +5852,10 @@
 				BDD54A2722C31D60005BBE19 /* tail.png in Resources */,
 				BD61229B22C3605C00D3F513 /* AliyunEffectFilterCell.xib in Resources */,
 				A7190167227543DB00104A50 /* baidu_cityid_rel.json in Resources */,
+				A75B787D22E07A51007B986A /* MineModuleTabbar.json in Resources */,
 				A77F2C682231FB4A001BD3F6 /* Assets.xcassets in Resources */,
 				BDD54A2822C31D60005BBE19 /* LocalFilter.json in Resources */,
+				A75B787B22E07A51007B986A /* communityModuleTabbar.json in Resources */,
 				A72C01232275404A0065E0C3 /* province_city_area.json in Resources */,
 				BDD54A2622C31D60005BBE19 /* watermark.png in Resources */,
 				BD108C9B22A60C3300837DAB /* HGImage.storyboard in Resources */,
@@ -6711,6 +6751,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/AlipaySDK",
+					"$(PROJECT_DIR)/RainbowPlanet/Lib",
 				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -6959,6 +7000,7 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/RainbowPlanet/Lib/AlipaySDK",
+					"$(PROJECT_DIR)/RainbowPlanet/Lib",
 				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;

+ 0 - 2
RainbowPlanet/RainbowPlanet/Base/BaseTabbarViewController/BaseTabbarViewController.swift

@@ -99,8 +99,6 @@ extension BaseTabbarViewController : UITabBarControllerDelegate {
         }else {
             if item.tag == self.lastClickTag && item.tag == 0  {
                 
-
-                
                 if communityModuleTopType == .communityModuleFollowTop {
                     NotificationCenter.default.post(name: NSNotification.Name("CommunityModuleFollowTop"), object: nil)
 

+ 6 - 6
RainbowPlanet/RainbowPlanet/Service/SwiftMoyaService/SwiftMoyaServiceManger/SwiftMoyaNetWorkManager/ApiMacro.swift

@@ -9,8 +9,8 @@
 import Foundation
 
 let kPersonalService = false
-let kDevelopSever = false
-let kBetaSever = true
+let kDevelopSever = true
+let kBetaSever = false
 let kProductSever = false
 
 // MARK: - 数据服务器
@@ -29,8 +29,8 @@ public func kApiDataPrefix() -> String {
 }
 
 let kVirusPersonalService = false
-let kVirusDevelopSever = false
-let kVirusBetaSever = true
+let kVirusDevelopSever = true
+let kVirusBetaSever = false
 let kVirusProductSever = false
 
 // MARK: - Virus
@@ -49,8 +49,8 @@ public func kApiVirusPrefix() -> String {
 }
 
 let kH5PersonalService = false
-let kH5DevelopSever = false
-let kH5BetaSever = true
+let kH5DevelopSever = true
+let kH5BetaSever = false
 let kH5ProductSever = false
 
 // MARK: - H5

文件差異過大導致無法顯示
+ 1 - 0
RainbowPlanet/RainbowPlanet/Src/AnimationJSON/MineModuleTabbar.json


文件差異過大導致無法顯示
+ 1 - 0
RainbowPlanet/RainbowPlanet/Src/AnimationJSON/communityModuleTabbar.json


文件差異過大導致無法顯示
+ 1 - 0
RainbowPlanet/RainbowPlanet/Src/AnimationJSON/messageModuleTabbar.json


文件差異過大導致無法顯示
+ 1 - 0
RainbowPlanet/RainbowPlanet/Src/AnimationJSON/shoppingMallModuleTabbar.json


RainbowPlanet/RainbowPlanet/Src/baidu_cityid_rel.json → RainbowPlanet/RainbowPlanet/Src/json/baidu_cityid_rel.json


RainbowPlanet/RainbowPlanet/Src/province_city_area.json → RainbowPlanet/RainbowPlanet/Src/json/province_city_area.json


+ 6 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tabbar_massage_pre/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 6 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tabbar_my_pre/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 6 - 0
RainbowPlanet/RainbowPlanet/Supporting Files/Assets.xcassets/TabbarIcons/tabbar_shopping_pre/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 34 - 14
RainbowPlanet/RainbowPlanet/ViewModel/Virus/VirusViewModel.swift

@@ -29,7 +29,7 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityRecommendDataModel.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityRecommendDataModel.uid!)"
         if communityRecommendDataModel.title == nil ||  communityRecommendDataModel.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityRecommendDataModel.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityRecommendDataModel.content!.prefix(20))"
         }else {
             virueRecordAddParameterModel.postDesc = communityRecommendDataModel.title
         }
@@ -89,7 +89,7 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityRecommendDataModel.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityRecommendDataModel.uid!)"
         if communityRecommendDataModel.title == nil ||  communityRecommendDataModel.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityRecommendDataModel.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityRecommendDataModel.content!.prefix(20))"
         }else {
             virueRecordAddParameterModel.postDesc = communityRecommendDataModel.title
         }
@@ -149,7 +149,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityRecommendDataModel.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityRecommendDataModel.uid!)"
         if communityRecommendDataModel.title == nil ||  communityRecommendDataModel.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityRecommendDataModel.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityRecommendDataModel.content!.prefix(20))"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityRecommendDataModel.title
         }
@@ -204,7 +205,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityFollowDataModel.relateData?.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityFollowDataModel.relateData?.uid! ?? 0)"
         if communityFollowDataModel.relateData?.title == nil ||  communityFollowDataModel.relateData?.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityFollowDataModel.relateData?.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityFollowDataModel.relateData?.content!.prefix(20) ?? "")"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityFollowDataModel.relateData?.title
         }
@@ -265,7 +267,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityFollowDataModel.relateData?.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityFollowDataModel.relateData?.uid! ?? 0)"
         if communityFollowDataModel.relateData?.title == nil ||  communityFollowDataModel.relateData?.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityFollowDataModel.relateData?.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityFollowDataModel.relateData?.content!.prefix(20) ?? "")"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityFollowDataModel.relateData?.title
         }
@@ -325,7 +328,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityFollowDataModel.relateData?.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityFollowDataModel.relateData?.uid! ?? 0)"
         if communityFollowDataModel.relateData?.title == nil ||  communityFollowDataModel.relateData?.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityFollowDataModel.relateData?.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityFollowDataModel.relateData?.content!.prefix(20) ?? "")"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityFollowDataModel.relateData?.title
         }
@@ -382,6 +386,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postAuthorUid = "\(communityVideoItemModel.uid!)"
         if communityVideoItemModel.title == nil ||  communityVideoItemModel.title == "" {
             virueRecordAddParameterModel.postDesc = String(describing: communityVideoItemModel.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityVideoItemModel.content!.prefix(20) )"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityVideoItemModel.title
         }
@@ -439,7 +445,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityVideoItemModel.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityVideoItemModel.uid!)"
         if communityVideoItemModel.title == nil ||  communityVideoItemModel.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityVideoItemModel.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityVideoItemModel.content!.prefix(20))"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityVideoItemModel.title
         }
@@ -485,7 +492,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityPostDetailModel.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityPostDetailModel.uid!)"
         if communityPostDetailModel.title == nil ||  communityPostDetailModel.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityPostDetailModel.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityPostDetailModel.content!.prefix(20))"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityPostDetailModel.title
         }
@@ -515,7 +523,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityVideoItemModel.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityVideoItemModel.uid!)"
         if communityVideoItemModel.title == nil ||  communityVideoItemModel.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityVideoItemModel.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityVideoItemModel.content!.prefix(20))"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityVideoItemModel.title
         }
@@ -545,7 +554,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityRecommendDataModel?.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityRecommendDataModel?.uid ?? 0)"
         if communityRecommendDataModel?.title == nil ||  communityRecommendDataModel?.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityRecommendDataModel?.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityRecommendDataModel?.content!.prefix(20) ?? "")"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityRecommendDataModel?.title
         }
@@ -568,7 +578,9 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityFollowDataModel?.relateData?.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityFollowDataModel?.relateData?.uid ?? 0)"
         if communityFollowDataModel?.relateData?.title == nil ||  communityFollowDataModel?.relateData?.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityFollowDataModel?.relateData?.content!.prefix(20))
+            
+            virueRecordAddParameterModel.postDesc = "\(communityFollowDataModel?.relateData?.content!.prefix(20) ?? "")"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityFollowDataModel?.relateData?.title
         }
@@ -607,7 +619,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityPostDetailModel?.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityPostDetailModel?.uid ?? 0)"
         if communityPostDetailModel?.title == nil ||  communityPostDetailModel?.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityPostDetailModel?.content?.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityPostDetailModel?.content!.prefix(20) ?? "")"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityPostDetailModel?.title
         }
@@ -652,7 +665,8 @@ extension VirusViewModel {
         virueRecordAddParameterModel.postId = communityPostDetailModel?.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityPostDetailModel?.uid ?? 0)"
         if communityPostDetailModel?.title == nil ||  communityPostDetailModel?.title == "" {
-            virueRecordAddParameterModel.postDesc = String(describing: communityPostDetailModel?.content!.prefix(20))
+            virueRecordAddParameterModel.postDesc = "\(communityPostDetailModel?.content!.prefix(20) ?? "")"
+
         }else {
             virueRecordAddParameterModel.postDesc = communityPostDetailModel?.title
         }
@@ -697,7 +711,13 @@ extension VirusViewModel {
         }
         virueRecordAddParameterModel.postId = communityPostDataModel.id
         virueRecordAddParameterModel.postAuthorUid = "\(communityPostDataModel.uid!)"
-        virueRecordAddParameterModel.postDesc = communityPostDataModel.title
+        
+        if communityPostDataModel.title == nil ||  communityPostDataModel.title == "" {
+            virueRecordAddParameterModel.postDesc = "\(communityPostDataModel.content!.prefix(20))"
+        }else {
+            virueRecordAddParameterModel.postDesc = communityPostDataModel.title
+        }
+        
         virueRecordAddParameterModel.postCover = communityPostDataModel.img
         virueRecordAddParameterModel.actionId = "\(communityPostDataModel.id!)"
         virueRecordAddParameterModel.postType = communityPostDataModel.type