Commit 3300ef06 authored by admin's avatar admin

修改首页商场名称

parent 500f8825
......@@ -357,14 +357,17 @@
#pragma mark - Private Methods
- (void)setupNav
{
UIEdgeInsets insets = UIEdgeInsetsMake( 0, 199, 0, 175);
UIImage *image = [[UIImage imageNamed:@"home_title"] resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch];
self.bgImageView.image = image;
self.searchTextField.backgroundColor = [UIColor clearColor];
self.nameLabel.backgroundColor = [UIColor clearColor];
_nameLabel.text = @"超级管理员,你好!";
_nameLabel.text = [NSString stringWithFormat:@"%@,你好!", [[NSUserDefaults standardUserDefaults] objectForKey:@"user_name"]];
self.shopnameLabel.backgroundColor = [UIColor clearColor];
_shopnameLabel.text = @"上海真北店";
_shopnameLabel.text = [NSString stringWithFormat:@"%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"enterprise_name"]];
}
......@@ -617,12 +620,12 @@
} else if (indexPath.section == 1) {
HomeTitleTableCell *cell=[tableView dequeueReusableCellWithIdentifier:kHomeTitleTableCell];
if (!cell) {
cell = [[HomeTitleTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeTitleTableCell];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
HomeTitleTableCell *cell=[tableView dequeueReusableCellWithIdentifier:kHomeTitleTableCell];
if (!cell) {
cell = [[HomeTitleTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kHomeTitleTableCell];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
} else if (indexPath.section == 2 + _rankData.count) {
// 问题与知识
QuestionListTableCell *cell = [tableView dequeueReusableCellWithIdentifier:kHomeQuestionListTableCell];
......@@ -633,7 +636,7 @@
QuestionModel *question = _allQuestionArray[indexPath.row];
cell.question = question;
return cell;
} else if (indexPath.section == 3 + _rankData.count) {
InspectListCell *cell=[tableView dequeueReusableCellWithIdentifier:kHomeInspectListCell];
if (!cell) {
......@@ -676,9 +679,9 @@
questionDetailVC.questionUuid = question.uuid;
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:questionDetailVC animated:YES];
} else if (indexPath.section == 3 + _rankData.count) {
InspectTaskViewController *inspectTaskVC = [[InspectTaskViewController alloc] init];
TaskListModel *taskList = self.taskListDataArray[indexPath.row];
inspectTaskVC.uuid = taskList.uuid;
......@@ -751,7 +754,7 @@
// 自定义section
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
if (section == 0 || section == 1 || section == 2 + _rankData.count || section == 3 + _rankData.count) {
// 创建sectionView
UIView *sectionView = [[UIView alloc] init];
......@@ -782,21 +785,21 @@
titleLabel.font = [UIFont systemFontOfSize:17.0];
if (section == 0) {
titleLabel.text = @"测试";
titleLabel.text = @"问题知识";
// titleLabel.text = _titleArray[section];
//titleLabel.text = _titleArray[section];
} else if (section == 1) {
titleLabel.text = @"测试";
titleLabel.text = @"问题知识";
//titleLabel.text = _titleArray[section];
// titleLabel.text = _titleArray[section];
} else if (section == 2 + _rankData.count) {
titleLabel.text = @"测试";
titleLabel.text = @"问题知识";
// titleLabel.text = _titleArray[section - _rankData.count];
} else {
titleLabel.text = @"测试";
titleLabel.text = @"问题知识";
//titleLabel.text = _titleArray[section - _rankData.count];
// titleLabel.text = _titleArray[section - _rankData.count];
}
[sectionView addSubview:titleLabel];
......@@ -871,6 +874,7 @@
}
- (void)pushclick:(UIButton *)sender
{
NSInteger section = sender.tag - kPushTag;
......@@ -1044,9 +1048,6 @@
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"请输入关键字!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
}
}
//- (void)searchClick:(UIButton *)sender
//{
......
......@@ -144,11 +144,17 @@
NSString *user_code = dict[@"user_code"];
NSString *user_name = dict[@"user_name"];
NSString *user_uuid = dict[@"user_uuid"];
NSString *enterprise_name = dict[@"enterprise_name"];
NSString *org_name = dict[@"org_name"];
NSArray *permissions = dict[@"permissions"];
[userDefault setObject:user_code forKey:@"user_code"];
[userDefault setObject:user_name forKey:@"user_name"];
[userDefault setObject:user_uuid forKey:@"user_uuid"];
[userDefault setObject:enterprise_name forKey:@"enterprise_name"];
[userDefault setObject:org_name forKey:@"org_name"];
[userDefault setObject:permissions forKey:@"permissions"];
self.rootTBC = [[RootTabBarController alloc] init];
......@@ -202,10 +208,18 @@
NSString *user_name = dict[@"user_name"];
NSString *user_uuid = dict[@"user_uuid"];
NSArray *permissions = dict[@"permissions"];
NSString *enterprise_name = dict[@"enterprise_name"];
NSString *org_name = dict[@"org_name"];
[[NSUserDefaults standardUserDefaults] setObject:enterprise_name forKey:@"enterprise_name"];
[[NSUserDefaults standardUserDefaults] setObject:org_name forKey:@"org_name"];
[[NSUserDefaults standardUserDefaults] setObject:permissions forKey:@"permissions"];
[[NSUserDefaults standardUserDefaults] setObject:user_code forKey:@"user_code"];
[[NSUserDefaults standardUserDefaults] setObject:user_name forKey:@"user_name"];
[[NSUserDefaults standardUserDefaults] setObject:user_uuid forKey:@"user_uuid"];
[[NSUserDefaults standardUserDefaults] setObject:permissions forKey:@"permissions"];
// 进入RootTabBar
self.rootTBC = [[RootTabBarController alloc] init];
[MBProgressHUD hideHUDForView:window animated:YES];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment