暂无描述

FKHomeViewModel.h 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // FKHomeViewModel.h
  3. // FirstLink
  4. //
  5. // Created by ascii on 16/8/12.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "FKPersonOrderBadgeItem.h"
  10. #import "FKPointDataModel.h"
  11. #import "FKHomeCountModel.h"
  12. #import "FKPointSignItem.h"
  13. typedef NS_ENUM(NSUInteger, kHomeSectionType) {
  14. kHomeSectionTypeUnknow,
  15. kHomeSectionTypePerson,
  16. kHomeSectionTypeOrder,
  17. kHomeSectionTypePrivilege,
  18. kHomeSectionTypeHelpBuy,
  19. kHomeSectionTypePushAndConsult
  20. };
  21. typedef NS_ENUM(NSInteger, kHomeCellType) {
  22. kHomeCellTypeNone = - 1,
  23. kHomeCellTypePersonInfo,
  24. kHomeCellTypeFollow,
  25. kHomeCellTypeOrderHeader,
  26. kHomeCellTypeOrder,
  27. kHomeCellTypeVIP,
  28. kHomeCellTypeCoupon,
  29. kHomeCellTypeHelpBuy,
  30. kHomeCellTypePush,
  31. kHomeCellTypeConsult
  32. };
  33. extern NSString * const kVipRedpointGuideKey;
  34. @interface FKHomeViewModel : NSObject
  35. // 是否可以代买
  36. @property (nonatomic, assign) BOOL isHelpBuyable;
  37. @property (nonatomic, strong) NSString *serverTime;
  38. @property (nonatomic, assign) NSInteger couponCount;
  39. @property (nonatomic, strong) FKPersonOrderBadgeItem *badgeItem;
  40. @property (nonatomic, strong) FKPointDataModel *signModel;
  41. @property (nonatomic, strong) FKHomeCountModel *countModel;
  42. - (NSInteger)numberOfSectionsInTableView;
  43. - (NSInteger)numberOfRowsInSection:(NSInteger)section;
  44. - (CGFloat)heightForRowAtIndexPath:(NSIndexPath *)indexPath;
  45. - (kHomeSectionType)sectionTypeForSection:(NSInteger)section;
  46. - (kHomeCellType)cellTypeForIndexPath:(NSIndexPath *)indexPath;
  47. - (BOOL)needShowInvalidCouponMsg;
  48. - (NSAttributedString *)invalidCouponMsg;
  49. - (void)saveLastShowInvalidCouponMsgTime;
  50. - (BOOL)isNeedShowVipRedpointGuide;
  51. - (void)shownVipRedpointGuide;
  52. @end