YOUPAILZChatRoomApplySeatAttachment.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // YOUPAILZChatRoomApplySeatAttachment.m
  3. // VQU
  4. //
  5. // Created by CY on 2021/11/6.
  6. // Copyright © 2021 MS. All rights reserved.
  7. //
  8. #import "YOUPAILZChatRoomApplySeatAttachment.h"
  9. @implementation YOUPAILZChatRoomApplySeatAttachment
  10. - (NSString *)encodeAttachment{
  11. NSDictionary *dict = @{
  12. CMType : @(CustomOnChatRoomApplySeat),
  13. CMData : @{
  14. CMRoomId: self.roomid?self.roomid:@"",
  15. CMOpUid: self.op_uid ?self.op_uid:@"",
  16. CMNum: self.num ?self.num:@"",
  17. CMStatus: self.status ?self.status:@"",
  18. }
  19. };
  20. NSData *data = [NSJSONSerialization dataWithJSONObject:dict
  21. options:0
  22. error:nil];
  23. NSString *content = nil;
  24. if (data) {
  25. content = [[NSString alloc] initWithData:data
  26. encoding:NSUTF8StringEncoding];
  27. }
  28. return content;
  29. }
  30. @end