1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // YMPersonalPageGiftWallCellViewModel.m
- // MSYOUPAI
- //
- // Created by YoMi on 2024/3/14.
- // Copyright © 2024 MS. All rights reserved.
- //
- #import "YMPersonalPageGiftWallCellViewModel.h"
- #import "YMPersonalInfoModel.h"
- @interface YMPersonalPageGiftWallCellViewModel ()
- /// 礼物Id
- @property (nonatomic, assign, readwrite) NSInteger giftId;
- /// 礼物名
- @property (nonatomic, copy, readwrite) NSString *giftName;
- /// 礼物图标
- @property (nonatomic, copy, readwrite) NSString *giftIcon;
- /// 礼物数量
- @property (nonatomic, copy, readwrite) NSString *giftNumber;
- @end
- @implementation YMPersonalPageGiftWallCellViewModel
- - (void)ym_initialize{
- [super ym_initialize];
- if ([self.params[ParamsModel] isKindOfClass:[YMGiftModel class]]) {
- YMGiftModel *model = self.params[ParamsModel];
-
- self.giftId = model.gift_id;
-
- self.giftName = model.name;
-
- self.giftIcon = model.img;
-
- self.giftNumber = stringFormat(@"x%@",model.total);
- }
-
- }
- @end
|