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

#import "ForumViewController.h"
#import "ForumTableViewCell.h"
#import "ForumItemListViewController.h"


@interface ForumViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,strong) ForumCategoryResponse *category;


@end

@implementation ForumViewController

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    [self.tableView.mj_header beginRefreshing];
}

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

#pragma mark - UITableView
- (void)setUpForumTableView
{
    self.tableView.rowHeight = 90;
    [Notification addObserver:self selector:@selector(refreshForumList:) name:REFRESH_FROUMLIST object:nil];
}

#pragma mark -选中时间轴刷新列表
- (void)refreshForumList:(NSNotification *)object
{
    self.typeId = object.object;
    [self.tableView.mj_header beginRefreshing];
}

#pragma mark - 加载数据
- (void)loadWebDataSource
{
    WS(weakSelf);
    [self getForumAllTypeActionCompleted:^(ForumCategoryResponse *result) {
        [weakSelf endRefresh:EndRefreshNotData];
    }];
}

#pragma mark - 获取论坛项Type
- (void)getForumAllTypeActionCompleted:(void(^)(ForumCategoryResponse *result))completed
{
    WS(weakSelf);
    NSString *urlString = [NSString stringWithFormat:SERVERREQUESTURL(FORUMCATEGORYS),self.typeId,[Shoppersmanager manager].shoppers.employee.fid];
    [HTTP networkWithDictionaryRequestWithURL:urlString withRequestType:ONE withParameter:nil withReturnValueBlock:^(id returnValue) {
        if (RESULT(returnValue)) {
            weakSelf.category = [[ForumCategoryResponse alloc] initWithDictionary:RESPONSE(returnValue) error:nil];
            completed(weakSelf.category);
            [weakSelf.tableView reloadData];
        }else{
            [XBLoadingView showHUDViewWithText:MESSAGE(returnValue)];
        }
    } withFailureBlock:^(NSError *error) {
        [weakSelf endRefresh:EndRefreshDefault];
        [XBLoadingView showHUDViewWithText:error.localizedDescription];
    }];
}

#pragma mark - <UITableViewDelegate,UITableViewDataSource>
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    ForumTableViewCell *forumCell = [tableView dequeueReusableCellWithIdentifier:@"ForumTableViewCell" forIndexPath:indexPath];
    forumCell.categoryEntity = self.category.categories[indexPath.row];
    return forumCell;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.category.categories.count;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    ForumItemListViewController  *itemListVc = [ForumItemListViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_LEARNINGCENTER];
    TOForumCategoryEntity *category = self.category.categories[indexPath.row];
    category.typeId = self.typeId;
    itemListVc.category = category;
    itemListVc.isPosting = [category.name isEqualToString:@"欧普问问"]?0:1;
    [self pushViewController:itemListVc animated:YES];
}



@end