YMPayMethodCellViewModel.m 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // YMPayMethodCellViewModel.m
  3. // MSYOUPAI
  4. //
  5. // Created by YoMi on 2024/3/21.
  6. // Copyright © 2024 MS. All rights reserved.
  7. //
  8. #import "YMPayMethodCellViewModel.h"
  9. @interface YMPayMethodCellViewModel ()
  10. /// 支付Id
  11. @property (nonatomic, strong, readwrite) NSString *payId;
  12. /// 支付图标
  13. @property (nonatomic, strong, readwrite) NSString *payIcon;
  14. /// 支付标题
  15. @property (nonatomic, strong, readwrite) NSString *payTitle;
  16. /// 支付代码
  17. @property (nonatomic, strong, readwrite) NSString *payCode;
  18. @end
  19. @implementation YMPayMethodCellViewModel
  20. - (void)ym_initialize{
  21. [super ym_initialize];
  22. if ([self.params[ParamsModel] isKindOfClass:[NSDictionary class]]) {
  23. NSDictionary *dic = self.params[ParamsModel];
  24. self.payId = [dic stringValueForKey:@"id" defaultValue:@""];
  25. self.payIcon = [dic stringValueForKey:@"icon" defaultValue:@""];
  26. self.payTitle = [dic stringValueForKey:@"title" defaultValue:@""];
  27. self.payCode = [dic stringValueForKey:@"code" defaultValue:@""];
  28. }
  29. }
  30. @end