Nav apraksta

FKProDetailViewModel.h 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. //
  2. // FKProDetailViewModel.h
  3. // FirstLink
  4. //
  5. // Created by jack on 16/8/15.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "FKProBannerCell.h"
  10. #import "FKProTitleCell.h"
  11. #import "FKProAmazonScoreCell.h"
  12. #import "FKProTagListCell.h"
  13. #import "FKProPriceDetailCell.h"
  14. #import "FKProductWeightCell.h"
  15. #import "FKProWeightErrorCell.h"
  16. #import "FKProSpecResCell.h"
  17. #import "FKProBCChannelFeeCell.h"
  18. #import "FKProActivityCell.h"
  19. #import "FKProFeatureCell.h"
  20. #import "FKProSourceCell.h"
  21. #import "FKProSeekCell.h"
  22. #import "FKProAskAnswerCell.h"
  23. #import "FKProRecommendListCell.h"
  24. #import "FKProBrandCell.h"
  25. #import "FKProductRecommendCell.h"
  26. #import "FKProInfoCell.h"
  27. #import "PdProductShowCell.h"
  28. #import "FKProductRelativeCell.h"
  29. #import "FKProWarnTitleCell.h"
  30. #import "FKProProcessCell.h"
  31. #import "FKProWarnHeaderCell.h"
  32. #import "FKProActivityBaseCell.h"
  33. #import "FKProActivityInProgressCell.h"
  34. #import "FKProActivityForeshowCell.h"
  35. #import "FKProActivityThemeCell.h"
  36. #import "FKProductDetailItem.h"
  37. #import "FKSubmitUnitItem.h"
  38. #import "FKProductItem.h"
  39. #import "FKProductRelativeItem.h"
  40. #import "FKProBrandRecItem.h"
  41. #import "FKProAllLookItem.h"
  42. #import "FKPromotionActivityItem.h"
  43. #import "FKProThemeActivityItem.h"
  44. #import "FKProTipsItem.h"
  45. #import "FKVipDiscountItem.h"
  46. #import "FKProductPurchaseCache.h"
  47. #import "FKProDetailRequest.h"
  48. typedef NS_ENUM(NSUInteger, kProTableType) {
  49. kProTableTypeUnknow = 0,
  50. kProTableTypeUp,
  51. kProTableTypeDown,
  52. };
  53. typedef NS_ENUM(NSUInteger, kProCellType) {
  54. kProCellTypeNone = 0,
  55. kProCellTypeTopImgList,
  56. kProCellTypeTitle,
  57. kProCellTypeAmazonScore,
  58. kProCellTypeTagList,
  59. kProCellTypePriceDetail,
  60. kProCellTypeWeight,
  61. kProCellTypeWeightError,
  62. kProCellTypeSelectSpec,
  63. kProCellTypeBCChannelFee,
  64. kProCellTypeActivityScroll,
  65. kProCellTypeFeature,
  66. kProCellTypeSource,
  67. kProCellTypeSeek,
  68. kProCellTypeAskAnswer,
  69. kProCellTypeBrand,
  70. kProCellTypeBrandList,
  71. kProCellTypeAllLook,
  72. kProCellTypeRecommend,
  73. kProCellTypeInfo,
  74. kProCellTypeProudctShow,
  75. kProCellTypeRelative,
  76. kProCellTypeWarnTitle,
  77. kProCellTypeWarnHeader,
  78. kProCellTypeProcess,
  79. kProCellTypeActivityBanner,
  80. };
  81. @interface FKProDetailViewModel : NSObject
  82. @property (nonatomic, strong) NSString *productID;
  83. @property (nonatomic, strong) NSString *refer;
  84. @property (nonatomic, strong) NSString *selectSpecId;
  85. @property (nonatomic, assign) BOOL hasSelectedSKU;
  86. @property (nonatomic, strong) FKProductItem *selectBuyItem; // 默认规格,加入购物车,购买弹框的默认选中
  87. @property (nonatomic, strong) FKProductItem *selectPriceWarnItem; // 默认降价提醒的选中
  88. @property (nonatomic, assign) BOOL showWarn;
  89. @property (nonatomic, assign) BOOL showWeightDetail;
  90. @property (nonatomic, assign) BOOL isBrandDescClose;
  91. @property (nonatomic, assign) BOOL showTranslate;
  92. @property (nonatomic, strong) FKProductDetailItem *dataItem;
  93. @property (nonatomic, strong) FKProBrandRecItem *brandRecItem;
  94. @property (nonatomic, strong) FKProAllLookItem *allLookItem;
  95. @property (nonatomic, strong) FKProTipsItem *tipsItem;
  96. @property (nonatomic, strong) NSArray *tagArray;
  97. @property (nonatomic, strong) NSArray *activityArray;
  98. @property (nonatomic, strong) NSArray *specPicArray;
  99. @property (nonatomic, strong) NSArray *relativeProArray;
  100. @property (nonatomic, assign) NSUInteger totalRelativeCount;
  101. @property (nonatomic, strong) FKVipDiscountItem *discountItem;
  102. - (NSInteger)numberOfSectionsInTableType:(kProTableType)tableType;
  103. - (NSInteger)numberOfRowsInSection:(NSInteger)section tableType:(kProTableType)tableType;
  104. - (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath tableType:(kProTableType)tableType;
  105. - (kProCellType)cellTypeForIndexPath:(NSIndexPath *)indexPath tableType:(kProTableType)tableType;
  106. - (NSString *)cellIdentifyForIndexPath:(NSIndexPath *)indexPath tableType:(kProTableType)tableType;
  107. - (FKSubmitUnitItem *)createSubmitUnitItemWithProductItem:(FKProductItem *)productItem;
  108. /*
  109. 请求参数
  110. */
  111. - (NSDictionary *)infoForRequestType:(kProductReqType)type;
  112. - (BOOL)isHasShowIDCardAlert;
  113. - (void)setHasShowIDCardAlert;
  114. - (FKProductRelativeItem *)relativeItemAtIndex:(NSUInteger)index;
  115. - (FKPromotionActivityItem *)activityItemAtIndex:(NSInteger)index;
  116. - (FKProRecommendItem *)allLookItemAtIndex:(NSInteger)index;
  117. - (FKProRecommendItem *)brandRecItemAtIndex:(NSInteger)index;
  118. - (void)appendMoreRelativePro:(NSArray *)array;
  119. - (void)configWithSizeImgView:(UIImageView *)sizeImgView;
  120. - (NSString *)warnHeaderTitleForSection:(NSInteger)section;
  121. - (void)checkSpecImgArray;
  122. - (NSArray *)specImgArrayForProductArray:(NSArray *)productItemArray;
  123. - (void)setSelectProductItemWithProductArray:(NSArray *)productItemArray;
  124. - (BOOL)isNeedShowWeightDetailDefault;
  125. - (void)setNotShowWeightDetailDefault;
  126. - (FKProPriceDetailCellType)priceDetailCellType;
  127. @end