12345678910111213141516171819202122232425262728293031323334 |
- //
- // YOUPAILZLiveCarAttachment.m
- // VQU
- //
- // Created by CY on 2021/8/30.
- // Copyright © 2021 MS. All rights reserved.
- //
- #import "YOUPAILZLiveCarAttachment.h"
- @implementation YOUPAILZLiveCarAttachment
- - (NSString *)encodeAttachment
- {
- NSDictionary *dict = @{
- CMType : @(CustomOnLiveCar),
- CMData : @{
- CMCar: self.car?self.car:@"",
- CMCarPreviewSvga: self.car_preview_svga?self.car_preview_svga:@"",
- CMCarBigPreviewImgSvga: self.car_big_preview_img_svga?self.car_big_preview_img_svga:@"",
- }
- };
- NSData *data = [NSJSONSerialization dataWithJSONObject:dict
- options:0
- error:nil];
- NSString *content = nil;
- if (data) {
- content = [[NSString alloc] initWithData:data
- encoding:NSUTF8StringEncoding];
- }
- return content;
- }
- @end
|