KWMVariantsVC.h 1.82 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
//
//  KWMSelectSizeViewController.h
//  iCemarose
//
//  Created by HouWeiBin on 17/6/26.
//  Copyright © 2017年 kollway. All rights reserved.
//
//  原来的有点乱,重新整理一下,逻辑不复杂,还是跟原来一样,选完存好,然后回调到delegate.因为原selectSizeVC的逻辑到时候可能会再次被修改,所以,这个页面的版本时,需要注意下,逻辑是否需要更新。

#import "KWMBaseVC.h"
#import "Buy/Buy.h"
#import "KWMSizeCell.h"
#import "KWMShopCartData.h"
#import "KWMVariants.h"
15
#import "KWMWish.h"
16
#import "KWMColor.h"
17

18
@class KWMVariantsVC;
19 20
@protocol KWMVariantsVCDelegate <NSObject>

houweibin committed
21
@optional
22 23
- (void)kwm_addShopWithVariantId:(NSNumber *) identifier quantity:(NSInteger) quantity variant:(BUYProductVariant *) variant buyNow:(BOOL) buyNow callback:(void(^)(BOOL)) callback;

houweibin committed
24 25
@optional
- (void)kwm_setVariant:(KWMVariantsVC *)variantsVC variant:(BUYProductVariant *)variant color:(KWMColor *)color count:(NSInteger)count;
26

27 28 29
@end
@interface KWMVariantsVC : KWMBaseVC<UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>

30
//required 回调用的delegate
31 32
@property (weak, nonatomic) id<KWMVariantsVCDelegate> delegate;

33
//required 商品模型,必须有
34 35
@property (nonatomic) BUYProduct *product;

houweibin committed
36 37 38
//optional 可以传也可以不传,与product对应,用于填充库存显示
@property (nonatomic) KWMProduct *adminProduct;

39 40 41 42
//optional 有颜色可选时,需要赋值该字段.
@property (nonatomic) NSArray<KWMColor *> *colorArray;

//optional 愿望单页跳转来时,需要赋值该字段。
43
@property (nonatomic) KWMWish *wish;
44

45 46 47
//optional 购物车页跳转来时,需要赋值该字段。
@property (nonatomic) KWMShopCartModel *shopCartModel;

houweibin committed
48 49
-(void)setDefaultSelect:(BUYProductVariant *)variant color:(KWMColor *)color count:(NSInteger)count;

50
@end