123456789101112131415161718192021222324252627282930313233343536 |
- //
- // YOUPAILZLiveVipBarrageAttachment.m
- // VQU
- //
- // Created by CY on 2021/8/30.
- // Copyright © 2021 MS. All rights reserved.
- //
- #import "YOUPAILZLiveVipBarrageAttachment.h"
- @implementation YOUPAILZLiveVipBarrageAttachment
- - (NSString *)encodeAttachment
- {
- NSDictionary *dict = @{
- CMType : @(CustomOnLiveVipBarrage),
- CMData : @{
- CMBBox: self.b_box?self.b_box:@"",
- CMAvatarFrame: self.avatar_frame?self.avatar_frame:@"",
- CMName: self.name?self.name:@"",
- CMAvatar: self.avatar?self.avatar:@"",
- CMNobleName: self.noble_name?self.noble_name:@"",
- }
- };
- NSData *data = [NSJSONSerialization dataWithJSONObject:dict
- options:0
- error:nil];
- NSString *content = nil;
- if (data) {
- content = [[NSString alloc] initWithData:data
- encoding:NSUTF8StringEncoding];
- }
- return content;
- }
- @end
|