123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- //
- // FKProDetailViewModel.h
- // FirstLink
- //
- // Created by jack on 16/8/15.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "FKProBannerCell.h"
- #import "FKProTitleCell.h"
- #import "FKProAmazonScoreCell.h"
- #import "FKProTagListCell.h"
- #import "FKProPriceDetailCell.h"
- #import "FKProductWeightCell.h"
- #import "FKProWeightErrorCell.h"
- #import "FKProSpecResCell.h"
- #import "FKProBCChannelFeeCell.h"
- #import "FKProActivityCell.h"
- #import "FKProFeatureCell.h"
- #import "FKProSourceCell.h"
- #import "FKProSeekCell.h"
- #import "FKProAskAnswerCell.h"
- #import "FKProRecommendListCell.h"
- #import "FKProBrandCell.h"
- #import "FKProductRecommendCell.h"
- #import "FKProInfoCell.h"
- #import "PdProductShowCell.h"
- #import "FKProductRelativeCell.h"
- #import "FKProWarnTitleCell.h"
- #import "FKProProcessCell.h"
- #import "FKProWarnHeaderCell.h"
- #import "FKProActivityBaseCell.h"
- #import "FKProActivityInProgressCell.h"
- #import "FKProActivityForeshowCell.h"
- #import "FKProActivityThemeCell.h"
- #import "FKProductDetailItem.h"
- #import "FKSubmitUnitItem.h"
- #import "FKProductItem.h"
- #import "FKProductRelativeItem.h"
- #import "FKProBrandRecItem.h"
- #import "FKProAllLookItem.h"
- #import "FKPromotionActivityItem.h"
- #import "FKProThemeActivityItem.h"
- #import "FKProTipsItem.h"
- #import "FKVipDiscountItem.h"
- #import "FKProductPurchaseCache.h"
- #import "FKProDetailRequest.h"
- typedef NS_ENUM(NSUInteger, kProTableType) {
- kProTableTypeUnknow = 0,
- kProTableTypeUp,
- kProTableTypeDown,
- };
- typedef NS_ENUM(NSUInteger, kProCellType) {
- kProCellTypeNone = 0,
- kProCellTypeTopImgList,
- kProCellTypeTitle,
- kProCellTypeAmazonScore,
- kProCellTypeTagList,
- kProCellTypePriceDetail,
- kProCellTypeWeight,
- kProCellTypeWeightError,
- kProCellTypeSelectSpec,
- kProCellTypeBCChannelFee,
- kProCellTypeActivityScroll,
- kProCellTypeFeature,
- kProCellTypeSource,
- kProCellTypeSeek,
- kProCellTypeAskAnswer,
- kProCellTypeBrand,
- kProCellTypeBrandList,
- kProCellTypeAllLook,
- kProCellTypeRecommend,
- kProCellTypeInfo,
- kProCellTypeProudctShow,
- kProCellTypeRelative,
- kProCellTypeWarnTitle,
- kProCellTypeWarnHeader,
- kProCellTypeProcess,
- kProCellTypeActivityBanner,
- };
- @interface FKProDetailViewModel : NSObject
- @property (nonatomic, strong) NSString *productID;
- @property (nonatomic, strong) NSString *refer;
- @property (nonatomic, strong) NSString *selectSpecId;
- @property (nonatomic, assign) BOOL hasSelectedSKU;
- @property (nonatomic, strong) FKProductItem *selectBuyItem; // 默认规格,加入购物车,购买弹框的默认选中
- @property (nonatomic, strong) FKProductItem *selectPriceWarnItem; // 默认降价提醒的选中
- @property (nonatomic, assign) BOOL showWarn;
- @property (nonatomic, assign) BOOL showWeightDetail;
- @property (nonatomic, assign) BOOL isBrandDescClose;
- @property (nonatomic, assign) BOOL showTranslate;
- @property (nonatomic, strong) FKProductDetailItem *dataItem;
- @property (nonatomic, strong) FKProBrandRecItem *brandRecItem;
- @property (nonatomic, strong) FKProAllLookItem *allLookItem;
- @property (nonatomic, strong) FKProTipsItem *tipsItem;
- @property (nonatomic, strong) NSArray *tagArray;
- @property (nonatomic, strong) NSArray *activityArray;
- @property (nonatomic, strong) NSArray *specPicArray;
- @property (nonatomic, strong) NSArray *relativeProArray;
- @property (nonatomic, assign) NSUInteger totalRelativeCount;
- @property (nonatomic, strong) FKVipDiscountItem *discountItem;
- - (NSInteger)numberOfSectionsInTableType:(kProTableType)tableType;
- - (NSInteger)numberOfRowsInSection:(NSInteger)section tableType:(kProTableType)tableType;
- - (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath tableType:(kProTableType)tableType;
- - (kProCellType)cellTypeForIndexPath:(NSIndexPath *)indexPath tableType:(kProTableType)tableType;
- - (NSString *)cellIdentifyForIndexPath:(NSIndexPath *)indexPath tableType:(kProTableType)tableType;
- - (FKSubmitUnitItem *)createSubmitUnitItemWithProductItem:(FKProductItem *)productItem;
- /*
- 请求参数
- */
- - (NSDictionary *)infoForRequestType:(kProductReqType)type;
- - (BOOL)isHasShowIDCardAlert;
- - (void)setHasShowIDCardAlert;
- - (FKProductRelativeItem *)relativeItemAtIndex:(NSUInteger)index;
- - (FKPromotionActivityItem *)activityItemAtIndex:(NSInteger)index;
- - (FKProRecommendItem *)allLookItemAtIndex:(NSInteger)index;
- - (FKProRecommendItem *)brandRecItemAtIndex:(NSInteger)index;
- - (void)appendMoreRelativePro:(NSArray *)array;
- - (void)configWithSizeImgView:(UIImageView *)sizeImgView;
- - (NSString *)warnHeaderTitleForSection:(NSInteger)section;
- - (void)checkSpecImgArray;
- - (NSArray *)specImgArrayForProductArray:(NSArray *)productItemArray;
- - (void)setSelectProductItemWithProductArray:(NSArray *)productItemArray;
- - (BOOL)isNeedShowWeightDetailDefault;
- - (void)setNotShowWeightDetailDefault;
- - (FKProPriceDetailCellType)priceDetailCellType;
- @end
|