修复了动态分享的问题

This commit is contained in:
fengshuo
2022-08-26 22:10:34 +08:00
parent 8c8de6841e
commit 58da4adb2f
5 changed files with 30 additions and 10 deletions

View File

@@ -41,6 +41,14 @@ typedef NS_ENUM(NSUInteger, ShareType) {
@property (nonatomic,copy) NSString *dynamicId; @property (nonatomic,copy) NSString *dynamicId;
///话题id ///话题id
@property (nonatomic,copy) NSString *worldId; @property (nonatomic,copy) NSString *worldId;
///封面
@property (nonatomic,copy) NSString *imageUrl;
///名称
@property (nonatomic,copy) NSString *nick;
///发布者的uid
@property (nonatomic,copy) NSString *publishUid;
///内容
@property (nonatomic,copy) NSString *content;
@end @end

View File

@@ -10,10 +10,18 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ContentShareMonentsModel : NSObject @interface ContentShareMonentsModel : NSObject
///动态内容 ///动态分享
@property (nonatomic,copy) NSString *content;
///动态id
@property (nonatomic,copy) NSString *dynamicId; @property (nonatomic,copy) NSString *dynamicId;
///话题id
@property (nonatomic,copy) NSString *worldId;
///封面
@property (nonatomic,copy) NSString *imageUrl;
///名称
@property (nonatomic,copy) NSString *nick;
///发布者的uid
@property (nonatomic,copy) NSString *publishUid;
///内容
@property (nonatomic,copy) NSString *content;
///头像 ///头像
@property (nonatomic,copy) NSString *avatar; @property (nonatomic,copy) NSString *avatar;
///标题 ///标题

View File

@@ -262,10 +262,10 @@
return @"MessageContentMonentsView"; return @"MessageContentMonentsView";
}else if(attachment.first == CustomMessageType_Monents && (attachment.second == Custom_Message_Sub_Monents_Approved | attachment.second == Custom_Message_Sub_Monents_Ban_Delete)) { }else if(attachment.first == CustomMessageType_Monents && (attachment.second == Custom_Message_Sub_Monents_Approved | attachment.second == Custom_Message_Sub_Monents_Ban_Delete)) {
return @"MessageContentMonentsAutoView"; return @"MessageContentMonentsAutoView";
} else if(attachment.first == CustomMessageType_Message_Handle && attachment.second == Custom_Message_Sub_Message_Handle_Content) { } else if(attachment.first == CustomMessageType_Message_Handle && attachment.second == Custom_Message_Sub_Message_Handle_Content) {
return @"MessageContentMonentsAutoView"; return @"MessageContentMonentsAutoView";
}else { }else {
return @"MessageContentOpenLiveView"; return @"MessageContentUnSupportView";
} }
} else { } else {
return @"MessageContentUnSupportView"; return @"MessageContentUnSupportView";

View File

@@ -91,9 +91,10 @@
attachment.first = CustomMessageType_Monents; attachment.first = CustomMessageType_Monents;
attachment.second = Custom_Message_Sub_Monents_Share; attachment.second = Custom_Message_Sub_Monents_Share;
ContentShareMonentsModel * shareInfo = [[ContentShareMonentsModel alloc] init]; ContentShareMonentsModel * shareInfo = [[ContentShareMonentsModel alloc] init];
shareInfo.avatar = self.shareInfo.shareImageUrl; shareInfo.imageUrl = self.shareInfo.imageUrl;
shareInfo.title = self.shareInfo.shareTitle; shareInfo.nick = self.shareInfo.nick;
shareInfo.content = self.shareInfo.shareContent; shareInfo.content = self.shareInfo.content;
shareInfo.dynamicId= self.shareInfo.dynamicId;
shareInfo.routerValue = self.shareInfo.dynamicId; shareInfo.routerValue = self.shareInfo.dynamicId;
shareInfo.routerType = 50; shareInfo.routerType = 50;
attachment.data = shareInfo.model2dictionary; attachment.data = shareInfo.model2dictionary;

View File

@@ -177,6 +177,9 @@
if (self.monentsInfo.nick.length > 6) { if (self.monentsInfo.nick.length > 6) {
title = [title substringToIndex:6]; title = [title substringToIndex:6];
} }
shareInfo.nick = title;
shareInfo.content = self.monentsInfo.content;
shareInfo.imageUrl = self.monentsInfo.avatar;
shareInfo.shareTitle = [NSString stringWithFormat:@"%@发布了一条动态", title]; shareInfo.shareTitle = [NSString stringWithFormat:@"%@发布了一条动态", title];
shareInfo.shareContent = self.monentsInfo.content; shareInfo.shareContent = self.monentsInfo.content;
shareInfo.shareImageUrl = self.monentsInfo.avatar; shareInfo.shareImageUrl = self.monentsInfo.avatar;