• 曹云霄's avatar
    1、把按照类型筛选放到第一个位置,更风格对掉下。 · 653bf2df
    曹云霄 authored
    2、 红包促销拒绝的原因未能显示(在红包展示信息的时候要包含客户姓名及订单总金额)
    3、在客户界面的搜索框里,输入客户的手机号或则姓名 要支持模糊查询
    4、Ipad端我的红包—更多 点进去之后 显示订单号、时间;增加显示2个字段,客户姓名和订单总额
    5、Ipad闯关区—进入之后显示里去掉 结束时间显示
    6、邀请人显示 可以点击筛选本门店的设计师,弹框出来可以按照设计师的姓名或则电话号码进行模糊查询,选中后显示在界面上的是设计师的手机号码,ipad客户模块UI重新排版,具体参考邮件psd文件,后台会新建一个接口,获取当前门店下的设计师,根据选择的客户,获取到客户所关联的设计师
    653bf2df
FullScreenViewController.m 6.66 KB
//
//  FullScreenViewController.m
//  Lighting
//
//  Created by 曹云霄 on 16/5/20.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "FullScreenViewController.h"
#import "FullScreenViewCell.h"
#import "ExperienceCentreViewController.h"

@interface FullScreenViewController ()


/**
 *  返回View
 */
@property (nonatomic,strong) UIView *backView;

/**
 *  返回按钮
 */
@property (nonatomic,strong) UIButton *backButton;


@end

@implementation FullScreenViewController

static NSString * const reuseIdentifier = @"Cell";


#pragma mark -初始化
- (instancetype)init
{
    // 创建一个流水布局
    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
    // 设置cell的尺寸
    layout.itemSize = [UIScreen mainScreen].bounds.size;
    // 设置滚动的方向
    layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    // 行间距
    layout.minimumLineSpacing = 0;
    // 设置cell之间的间距
    layout.minimumInteritemSpacing = 0;
    return [super initWithCollectionViewLayout:layout];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self uiConfigAction];
    [self CreateBackView];
}

#pragma amrk 返回View
- (void)CreateBackView
{
    //产品列表调用
    if (self.isProductLibrary) {
        self.backButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.backButton.frame = CGRectMake(30, 10, 100, 64);
        [self.backButton setImage:TCImage(@"2-副本") forState:UIControlStateNormal];
        [self.backButton addTarget:self action:@selector(backButtonClick) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:self.backButton];
        
    }else//场景列表调用
    {
        self.backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 64)];
        self.backView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
        [self.view addSubview:self.backView];
        //返回按钮
        UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
        backButton.frame = CGRectMake(30, 0, 100, 64);
        [backButton setImage:TCImage(@"quanping") forState:UIControlStateNormal];
        [backButton addTarget:self action:@selector(backButtonClick) forControlEvents:UIControlEventTouchUpInside];
        [self.backView addSubview:backButton];
        
        //体验中心
        UIButton *tiYanCenterButton = [UIButton buttonWithType:UIButtonTypeCustom];
        tiYanCenterButton.frame = CGRectMake(ScreenWidth-150, 10, 100, 44);
        tiYanCenterButton.layer.masksToBounds = YES;
        tiYanCenterButton.layer.cornerRadius = kCornerRadius;
        tiYanCenterButton.layer.borderWidth = 1;
        tiYanCenterButton.layer.borderColor = [UIColor whiteColor].CGColor;
        [tiYanCenterButton setTitle:@"体验中心" forState:UIControlStateNormal];
        [tiYanCenterButton addTarget:self action:@selector(gotoTiYanCenterButtonClick) forControlEvents:UIControlEventTouchUpInside];
        [self.backView addSubview:tiYanCenterButton];
    }
    [self.collectionView setContentOffset:CGPointMake(ScreenWidth*self.currentIndex, 0)];
}

#pragma mark -返回
- (void)backButtonClick
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark -体验中心
- (void)gotoTiYanCenterButtonClick
{
    ExperienceCentreViewController *ExperienceCenter = [ExperienceCentreViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_MAIN];
    TOSceneEntity *sceneModel = [self.datasArray objectAtIndex_opple:self.currentIndex];
    SceneListModel *model = [[SceneListModel alloc] initWithDictionary:[sceneModel toDictionary] error:nil];
    model.isSelectedSate = YES;
    [ExperienceCenter.sceneDatasArray addObject:model];
    ExperienceCenter.boolValue = YES;
    ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
    UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
    popover.sourceView = ExperienceCenter.view;
    [self presentViewController:ExperienceCenter animated:YES completion:nil];
}

#pragma mark -获取当前下标
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
    CGPoint offset = scrollView.contentOffset;
    int index = offset.x/self.view.frame.size.width;
    self.currentIndex = index;
}

#pragma mark -UI
- (void)uiConfigAction
{
    self.collectionView.pagingEnabled = YES;
    self.collectionView.backgroundColor = [UIColor whiteColor];
    [self.collectionView registerClass:[FullScreenViewCell class] forCellWithReuseIdentifier:reuseIdentifier];
}


#pragma mark <UICollectionViewDataSource>

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.datasArray.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    
    FullScreenViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath];
    cell.backgroundColor = RGB(251, 248, 241,1);
    if (self.isProductLibrary) {
        [cell.imageView sd_setImageWithURL:[NSURL URLWithString:[self.datasArray objectAtIndex_opple:indexPath.item]] placeholderImage:REPLACEIMAGE];
        return cell;
    }
    TOSceneEntity *model = [self.datasArray objectAtIndex_opple:indexPath.item];
    [cell.imageView sd_setImageWithURL:[NSURL URLWithString:model.pricure] placeholderImage:REPLACEIMAGE];
    return cell;
}

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
    if (self.isProductLibrary) {
        if (self.backButton.frame.origin.y == 10) {
            [UIView animateWithDuration:0.3 animations:^{
                CGRect frame = self.backButton.frame;
                frame.origin.y = -64;
                self.backButton.frame = frame;
            }];
            
        }else if (self.backButton.frame.origin.y == -64)
        {
            [UIView animateWithDuration:0.3 animations:^{
                CGRect frame = self.backButton.frame;
                frame.origin.y = 10;
                self.backButton.frame = frame;
            }];
        }
    }else{
        if (self.backView.frame.origin.y == 0) {
            [UIView animateWithDuration:0.3 animations:^{
                CGRect frame = self.backView.frame;
                frame.origin.y = -64;
                self.backView.frame = frame;
            }];
        }else if (self.backView.frame.origin.y == -64)
        {
            [UIView animateWithDuration:0.3 animations:^{
                CGRect frame = self.backView.frame;
                frame.origin.y = 0;
                self.backView.frame = frame;
            }];
        }
    }
}


@end