|
|
@@ -13,6 +13,9 @@
|
|
|
#import "ModelHonorViewController.h"
|
|
|
#import "InfoEditViewController.h"
|
|
|
#import <BRPickerView.h>
|
|
|
+#import "MySkillsController.h"
|
|
|
+#import "ShareCardController.h"
|
|
|
+
|
|
|
@interface ModelCardController ()<UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate> {
|
|
|
ModelUser *tempUser;
|
|
|
}
|
|
|
@@ -56,13 +59,15 @@
|
|
|
UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
|
|
|
self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem];
|
|
|
|
|
|
- self.titlesArr = @[@[@"姓名"],
|
|
|
+ self.titlesArr = @[@[@"照片"],
|
|
|
+ @[@"姓名"],
|
|
|
@[@"个性签名"],
|
|
|
@[@"视频单价"],
|
|
|
@[@"身高",@"体重",@"三围",@"地区",@"年龄",@"职业",@"星座",@"毕业院校",@"兴趣爱好"],
|
|
|
@[@"我的标签"],
|
|
|
@[@"我的荣誉"]];
|
|
|
self.conentArr = @[@[@""],
|
|
|
+ @[@""],
|
|
|
@[@""],
|
|
|
@[@""],
|
|
|
@[@"",@"",@"",@"",@"",@"",@"",@"",@""],
|
|
|
@@ -86,7 +91,11 @@
|
|
|
bindingBtn.layer.shadowOffset = CGSizeMake(0,8);
|
|
|
bindingBtn.layer.shadowOpacity = 1;
|
|
|
bindingBtn.layer.shadowRadius = 10;
|
|
|
- [bindingBtn setTitle:@"保存" forState:UIControlStateNormal];
|
|
|
+ if ([@"init" isEqualToString:self.type]) {
|
|
|
+ [bindingBtn setTitle:@"下一步" forState:UIControlStateNormal];
|
|
|
+ } else {
|
|
|
+ [bindingBtn setTitle:@"查看我的模卡" forState:UIControlStateNormal];
|
|
|
+ }
|
|
|
bindingBtn.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
|
|
[bindingBtn setTitleColor:RGBValueColor(0xffffff, 1.0) forState:UIControlStateNormal];
|
|
|
[bindingBtn addTarget:self action:@selector(bindingBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
|
|
@@ -171,7 +180,10 @@
|
|
|
modelCell.textLabel.text = self.titlesArr[indexPath.section][indexPath.row];
|
|
|
|
|
|
NSString *rowTitle = self.titlesArr[indexPath.section][indexPath.row];
|
|
|
- if ([@"姓名" isEqualToString:rowTitle]) {
|
|
|
+ if ([@"照片" isEqualToString:rowTitle]) {
|
|
|
+ self.photoCell = modelCell;
|
|
|
+ modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@张照片",tempUser.photocount];
|
|
|
+ } else if ([@"姓名" isEqualToString:rowTitle]) {
|
|
|
self.nameCell = modelCell;
|
|
|
modelCell.detailTextLabel.text = tempUser.pet;
|
|
|
} else if ([@"个性签名" isEqualToString:rowTitle]) {
|
|
|
@@ -191,6 +203,7 @@
|
|
|
modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@/%@/%@",tempUser.bust,tempUser.wai,tempUser.hip];
|
|
|
} else if ([@"地区" isEqualToString:rowTitle]) {
|
|
|
self.areaCell = modelCell;
|
|
|
+ modelCell.detailTextLabel.text = @"";
|
|
|
for (NSDictionary *dic in self.areaArray) {
|
|
|
if ([dic[@"pk"] isEqual:tempUser.area]) {
|
|
|
modelCell.detailTextLabel.text = dic[@"name"];
|
|
|
@@ -214,7 +227,7 @@
|
|
|
} else if ([@"我的标签" isEqualToString:rowTitle]) {
|
|
|
self.fgbqCell = modelCell;
|
|
|
modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@个标签", tempUser.stylecount];
|
|
|
- } else if ([@"我的荣耀" isEqualToString:rowTitle]) {
|
|
|
+ } else if ([@"我的荣誉" isEqualToString:rowTitle]) {
|
|
|
self.wdryCell = modelCell;
|
|
|
modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@个荣誉", tempUser.honorcount];
|
|
|
}
|
|
|
@@ -228,7 +241,10 @@
|
|
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
|
|
|
NSString *rowTitle = self.titlesArr[indexPath.section][indexPath.row];
|
|
|
- if ([@"姓名" isEqualToString:rowTitle]) {
|
|
|
+ if ([@"照片" isEqualToString:rowTitle]) {
|
|
|
+ ModelPhotoViewController *photovc = [ModelPhotoViewController new];
|
|
|
+ [self.navigationController pushViewController:photovc animated:YES];
|
|
|
+ } else if ([@"姓名" isEqualToString:rowTitle]) {
|
|
|
InfoEditViewController *infoVc = [InfoEditViewController new];
|
|
|
infoVc.editType = InfoEditTypeName;
|
|
|
[self.navigationController pushViewController:infoVc animated:YES];
|
|
|
@@ -243,6 +259,7 @@
|
|
|
} else if ([@"身高" isEqualToString:rowTitle]) {
|
|
|
InfoEditViewController *infoVc = [InfoEditViewController new];
|
|
|
infoVc.editType = InfoEditTypeHeight;
|
|
|
+ [self.navigationController pushViewController:infoVc animated:YES];
|
|
|
} else if ([@"体重" isEqualToString:rowTitle]) {
|
|
|
InfoEditViewController *infoVc = [InfoEditViewController new];
|
|
|
infoVc.editType = InfoEditTypeWeight;
|
|
|
@@ -296,9 +313,8 @@
|
|
|
infoVc.editType = InfoEditTypeHobby;
|
|
|
[self.navigationController pushViewController:infoVc animated:YES];
|
|
|
} else if ([@"我的标签" isEqualToString:rowTitle]) {
|
|
|
- InfoEditViewController *infoVc = [InfoEditViewController new];
|
|
|
- infoVc.editType = InfoEditTypeSigature;
|
|
|
- [self.navigationController pushViewController:infoVc animated:YES];
|
|
|
+ ModelTagViewController *tagVC = [ModelTagViewController new];
|
|
|
+ [self.navigationController pushViewController:tagVC animated:YES];
|
|
|
} else if ([@"我的荣誉" isEqualToString:rowTitle]) {
|
|
|
ModelHonorViewController *honorVc = [ModelHonorViewController new];
|
|
|
[self.navigationController pushViewController:honorVc animated:YES];
|
|
|
@@ -307,7 +323,6 @@
|
|
|
|
|
|
#pragma mark -- 保存按钮
|
|
|
- (void)bindingBtnAction {
|
|
|
-
|
|
|
NSLog(@"name %@", self.nameCell.textLabel.text);
|
|
|
if (self.nameCell.textLabel.text.length == 0) {
|
|
|
[MBProgressHUD showOnlyText:@"请选择填写姓名" controller:self];
|
|
|
@@ -355,8 +370,16 @@
|
|
|
[MBProgressHUD showOnlyText:@"请选择填写签名" controller:self];
|
|
|
return;
|
|
|
}
|
|
|
- [MBProgressHUD showSuccess:@"保存成功"];
|
|
|
- [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(backClick) userInfo:nil repeats:NO];
|
|
|
+// [MBProgressHUD showSuccess:@"保存成功"];
|
|
|
+// [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(backClick) userInfo:nil repeats:NO];
|
|
|
+
|
|
|
+ if ([@"init" isEqualToString:self.type]) {
|
|
|
+ MySkillsController *mySkillsVC = [[MySkillsController alloc] init];
|
|
|
+ [self.navigationController pushViewController:mySkillsVC animated:YES];
|
|
|
+ } else {
|
|
|
+ ShareCardController *shareCardVC = [[ShareCardController alloc] init];
|
|
|
+ [self.navigationController pushViewController:shareCardVC animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#pragma mark -- 网络请求
|