12345678910111213141516171819202122232425262728293031323334 |
- //
- // YOUPAILZLiveBarrageAttachment.m
- // VQU
- //
- // Created by CY on 2021/7/24.
- // Copyright © 2021 leo. All rights reserved.
- //
- #import "YOUPAILZLiveBarrageAttachment.h"
- @implementation YOUPAILZLiveBarrageAttachment
- - (NSString *)encodeAttachment
- {
- NSDictionary *dict = @{
- CMType : @(CustomOnLiveBarrage),
- CMData : @{
- CMRankInfo: self.rankInfo?self.rankInfo:@{},
- CMGradeInfo: self.gradeInfo?self.gradeInfo:@{},
- CMUserInfo: self.userInfo?self.userInfo:@{},
- }
- };
- NSData *data = [NSJSONSerialization dataWithJSONObject:dict
- options:0
- error:nil];
- NSString *content = nil;
- if (data) {
- content = [[NSString alloc] initWithData:data
- encoding:NSUTF8StringEncoding];
- }
- return content;
- }
- @end
|