ModelCardController.m 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. //
  2. // ModelDataController.m
  3. // model
  4. //
  5. // Created by JuYi on 2018/7/16.
  6. // Copyright © 2018年 Mine. All rights reserved.
  7. // 模卡资料
  8. #import "ModelCardController.h"
  9. #import "MeasurementsViewController.h"
  10. #import "ModelPhotoViewController.h"
  11. #import "ModelTagViewController.h"
  12. #import "ModelHonorViewController.h"
  13. #import "InfoEditViewController.h"
  14. #import <BRPickerView.h>
  15. #import "MySkillsController.h"
  16. #import "ShareCardController.h"
  17. #import "HobbyViewController.h"
  18. @interface ModelCardController () <UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate> {
  19. ModelUser *tempUser;
  20. }
  21. @property(nonatomic, strong) UITableView *tableView;
  22. @property(nonatomic, strong) NSArray *titlesArr;
  23. @property(nonatomic, strong) NSArray *conentArr;
  24. @property(nonatomic, strong) UITableViewCell *nameCell;
  25. @property(nonatomic, strong) UITableViewCell *ageCell;
  26. @property(nonatomic, strong) UITableViewCell *heiCell;
  27. @property(nonatomic, strong) UITableViewCell *weiCell;
  28. @property(nonatomic, strong) UITableViewCell *waiBustHipCell; // 三围
  29. @property(nonatomic, strong) UITableViewCell *photoCell;
  30. @property(nonatomic, strong) UITableViewCell *areaCell; //地区(int类型,可空)
  31. @property(nonatomic, strong) UITableViewCell *occupationCell; //职业
  32. @property(nonatomic, strong) UITableViewCell *spdjCell;//视频单价
  33. @property(nonatomic, strong) UITableViewCell *fgbqCell;//风格标签
  34. @property(nonatomic, strong) UITableViewCell *lnameCell; //个性签名
  35. @property(nonatomic, strong) UITableViewCell *wdryCell; // 我的荣誉
  36. @property(nonatomic, strong) UITableViewCell *constellationCell; // 星座
  37. @property(nonatomic, strong) UITableViewCell *collegeCell; // 学校
  38. @property(nonatomic, strong) UITableViewCell *hobbyCell; // 爱好
  39. @property(nonatomic, strong) NSMutableArray *areaArray;
  40. @property(nonatomic, strong) NSArray *jobArray;
  41. @property(nonatomic, strong) NSArray *constellationArray;
  42. @end
  43. @implementation ModelCardController
  44. - (void)viewDidLoad {
  45. [super viewDidLoad];
  46. self.title = @"模卡资料";
  47. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  48. btn.frame = CGRectMake(0, 0, 40, 40);
  49. [btn setImage:[UIImage imageNamed:@"fanhui2"] forState:UIControlStateNormal];
  50. btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
  51. [btn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
  52. UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
  53. UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
  54. self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem];
  55. self.titlesArr = @[@[@"照片"],
  56. @[@"姓名"],
  57. @[@"个性签名"],
  58. @[@"视频单价"],
  59. @[@"身高", @"体重", @"三围", @"地区", @"年龄", @"职业", @"星座", @"毕业院校", @"兴趣爱好"],
  60. @[@"我的标签"],
  61. @[@"我的荣誉"]];
  62. self.conentArr = @[@[@""],
  63. @[@""],
  64. @[@""],
  65. @[@""],
  66. @[@"", @"", @"", @"", @"", @"", @"", @"", @""],
  67. @[@""],
  68. @[@""]];
  69. self.areaArray = [NSMutableArray array];
  70. self.jobArray = @[@"空姐", @"职业模特", @"白领", @"演员", @"护士", @"学生", @"老师", @"品酒师", @"其他"];
  71. self.constellationArray = @[@"水瓶座", @"双鱼座", @"白羊座", @"金牛座", @"双子座", @"巨蟹座", @"狮子座", @"处女座", @"天秤座", @"天蝎座", @"射手座", @"魔蝎座"];
  72. UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 10)];
  73. headerView.backgroundColor = RGBValueColor(0xf7f7f7, 1.0);
  74. //
  75. UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight - 460)];
  76. footerView.backgroundColor = RGBValueColor(0xf7f7f7, 1.0);
  77. UIButton *bindingBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  78. bindingBtn.frame = CGRectMake(20, 39, ScreenWidth - 40, 44);
  79. bindingBtn.layer.backgroundColor = [UIColor colorWithRed:255 / 255.0 green:64 / 255.0 blue:149 / 255.0 alpha:1].CGColor;
  80. bindingBtn.layer.cornerRadius = 22;
  81. bindingBtn.layer.shadowColor = [UIColor colorWithRed:255 / 255.0 green:64 / 255.0 blue:149 / 255.0 alpha:0.36].CGColor;
  82. bindingBtn.layer.shadowOffset = CGSizeMake(0, 8);
  83. bindingBtn.layer.shadowOpacity = 1;
  84. bindingBtn.layer.shadowRadius = 10;
  85. if ([@"init" isEqualToString:self.type]) {
  86. [bindingBtn setTitle:@"下一步" forState:UIControlStateNormal];
  87. } else {
  88. [bindingBtn setTitle:@"查看我的模卡" forState:UIControlStateNormal];
  89. }
  90. bindingBtn.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
  91. [bindingBtn setTitleColor:RGBValueColor(0xffffff, 1.0) forState:UIControlStateNormal];
  92. [bindingBtn addTarget:self action:@selector(bindingBtnAction) forControlEvents:UIControlEventTouchUpInside];
  93. [footerView addSubview:bindingBtn];
  94. self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight) style:UITableViewStylePlain];
  95. // self.tableView.scrollEnabled = NO;
  96. self.tableView.backgroundColor = RGBValueColor(0xf7f7f7, 1.0);
  97. self.tableView.delegate = self;
  98. self.tableView.dataSource = self;
  99. self.tableView.showsVerticalScrollIndicator = NO;
  100. // self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  101. self.tableView.tableHeaderView = headerView;
  102. self.tableView.tableFooterView = footerView;
  103. [self.view addSubview:self.tableView];
  104. self.view.backgroundColor = [UIColor colorWithRed:242 / 255.0 green:244 / 255.0 blue:245 / 255.0 alpha:1];
  105. [self getAreaData];
  106. }
  107. - (void)viewWillAppear:(BOOL)animated {
  108. [super viewWillAppear:animated];
  109. [self.navigationController setNavigationBarHidden:NO animated:YES];
  110. [self getModelData];
  111. }
  112. - (void)didReceiveMemoryWarning {
  113. [super didReceiveMemoryWarning];
  114. // Dispose of any resources that can be recreated.
  115. }
  116. - (void)getAreaData {
  117. [YanCNetWorkManager requestGETWithURLStr:Url_getArea(PublicUrl) parameters:@{} finish:^(id dataDic) {
  118. [self.areaArray addObjectsFromArray:dataDic[@"data"]];
  119. [self.tableView reloadData];
  120. } enError:^(NSError *error) {
  121. }];
  122. }
  123. - (void)getModelData {
  124. [YanCNetWorkManager requestGETWithURLStr:Url_getModelData(PublicUrl) parameters:@{@"modelpk": [ModelUser user].modelpk} finish:^(id dataDic) {
  125. [[ModelUser modelUser] setValuesForKeysWithDictionary:[dataDic[@"data"] firstObject]];
  126. tempUser = [ModelUser mj_objectWithKeyValues:[dataDic[@"data"] firstObject]];
  127. [self.tableView reloadData];
  128. } enError:^(NSError *error) {
  129. }];
  130. }
  131. - (void)backClick {
  132. [self.navigationController popViewControllerAnimated:YES];
  133. }
  134. #pragma mark -- UITableViewDelegate, UITableViewDataSource
  135. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  136. return self.titlesArr.count;
  137. }
  138. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  139. return ((NSDictionary *) self.titlesArr[section]).count;
  140. }
  141. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  142. static NSString *reuseIdentifier = @"cellID";
  143. UITableViewCell *modelCell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
  144. if (modelCell == nil) {
  145. modelCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentifier];
  146. }
  147. modelCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
  148. modelCell.selectionStyle = UITableViewCellSelectionStyleNone;
  149. modelCell.detailTextLabel.textColor = RGBValueColor(0x999999, 1.0);
  150. modelCell.textLabel.textColor = RGBValueColor(0x333333, 1.0);
  151. modelCell.textLabel.font = [UIFont systemFontOfSize:14.0];
  152. modelCell.detailTextLabel.font = [UIFont systemFontOfSize:14.0];
  153. modelCell.textLabel.text = self.titlesArr[indexPath.section][indexPath.row];
  154. NSString *rowTitle = self.titlesArr[indexPath.section][indexPath.row];
  155. if ([@"照片" isEqualToString:rowTitle]) {
  156. self.photoCell = modelCell;
  157. modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@张照片", tempUser.photocount];
  158. } else if ([@"姓名" isEqualToString:rowTitle]) {
  159. self.nameCell = modelCell;
  160. modelCell.detailTextLabel.text = tempUser.pet;
  161. } else if ([@"个性签名" isEqualToString:rowTitle]) {
  162. self.lnameCell = modelCell;
  163. modelCell.detailTextLabel.text = tempUser.lname;
  164. } else if ([@"视频单价" isEqualToString:rowTitle]) {
  165. self.spdjCell = modelCell;
  166. modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@元/分钟", tempUser.vprice];
  167. } else if ([@"身高" isEqualToString:rowTitle]) {
  168. self.heiCell = modelCell;
  169. modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@cm", tempUser.hei];
  170. } else if ([@"体重" isEqualToString:rowTitle]) {
  171. self.weiCell = modelCell;
  172. modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@kg", tempUser.wei];
  173. } else if ([@"三围" isEqualToString:rowTitle]) {
  174. self.waiBustHipCell = modelCell;
  175. modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@/%@/%@", tempUser.bust, tempUser.wai, tempUser.hip];
  176. } else if ([@"地区" isEqualToString:rowTitle]) {
  177. self.areaCell = modelCell;
  178. modelCell.detailTextLabel.text = @"";
  179. for (NSDictionary *dic in self.areaArray) {
  180. if ([dic[@"pk"] isEqual:tempUser.area]) {
  181. modelCell.detailTextLabel.text = dic[@"name"];
  182. }
  183. }
  184. } else if ([@"年龄" isEqualToString:rowTitle]) {
  185. self.ageCell = modelCell;
  186. modelCell.detailTextLabel.text = tempUser.age;
  187. } else if ([@"职业" isEqualToString:rowTitle]) {
  188. self.occupationCell = modelCell;
  189. modelCell.detailTextLabel.text = tempUser.occupation;
  190. } else if ([@"星座" isEqualToString:rowTitle]) {
  191. self.constellationCell = modelCell;
  192. modelCell.detailTextLabel.text = tempUser.constellation;
  193. } else if ([@"毕业院校" isEqualToString:rowTitle]) {
  194. self.collegeCell = modelCell;
  195. modelCell.detailTextLabel.text = tempUser.college;
  196. } else if ([@"兴趣爱好" isEqualToString:rowTitle]) {
  197. self.hobbyCell = modelCell;
  198. modelCell.detailTextLabel.text = tempUser.hobby;
  199. } else if ([@"我的标签" isEqualToString:rowTitle]) {
  200. self.fgbqCell = modelCell;
  201. modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@个标签", tempUser.stylecount];
  202. } else if ([@"我的荣誉" isEqualToString:rowTitle]) {
  203. self.wdryCell = modelCell;
  204. modelCell.detailTextLabel.text = [NSString stringWithFormat:@"%@个荣誉", tempUser.honorcount];
  205. }
  206. return modelCell;
  207. }
  208. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  209. return 50;
  210. }
  211. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  212. UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
  213. NSString *rowTitle = self.titlesArr[indexPath.section][indexPath.row];
  214. if ([@"照片" isEqualToString:rowTitle]) {
  215. ModelPhotoViewController *photovc = [ModelPhotoViewController new];
  216. [self.navigationController pushViewController:photovc animated:YES];
  217. } else if ([@"姓名" isEqualToString:rowTitle]) {
  218. InfoEditViewController *infoVc = [InfoEditViewController new];
  219. infoVc.editType = InfoEditTypeName;
  220. [self.navigationController pushViewController:infoVc animated:YES];
  221. } else if ([@"个性签名" isEqualToString:rowTitle]) {
  222. InfoEditViewController *infoVc = [InfoEditViewController new];
  223. infoVc.editType = InfoEditTypeSigature;
  224. [self.navigationController pushViewController:infoVc animated:YES];
  225. } else if ([@"视频单价" isEqualToString:rowTitle]) {
  226. InfoEditViewController *infoVc = [InfoEditViewController new];
  227. infoVc.editType = InfoEditTypeVprice;
  228. [self.navigationController pushViewController:infoVc animated:YES];
  229. } else if ([@"身高" isEqualToString:rowTitle]) {
  230. InfoEditViewController *infoVc = [InfoEditViewController new];
  231. infoVc.editType = InfoEditTypeHeight;
  232. [self.navigationController pushViewController:infoVc animated:YES];
  233. } else if ([@"体重" isEqualToString:rowTitle]) {
  234. InfoEditViewController *infoVc = [InfoEditViewController new];
  235. infoVc.editType = InfoEditTypeWeight;
  236. [self.navigationController pushViewController:infoVc animated:YES];
  237. } else if ([@"三围" isEqualToString:rowTitle]) {
  238. MeasurementsViewController *bmhVc = [MeasurementsViewController new];
  239. [self.navigationController pushViewController:bmhVc animated:YES];
  240. } else if ([@"地区" isEqualToString:rowTitle]) {
  241. NSMutableArray *tempArray = [NSMutableArray array];
  242. for (NSDictionary *dic in self.areaArray) {
  243. [tempArray addObject:dic[@"name"]];
  244. }
  245. [BRStringPickerView showStringPickerWithTitle:@"请选择地区" dataSource:tempArray defaultSelValue:nil resultBlock:^(id selectValue) {
  246. for (NSDictionary *dic in self.areaArray) {
  247. if ([dic[@"name"] isEqualToString:selectValue]) {
  248. [YanCNetWorkManager requestPostWithURLStr:Url_updateModelCard(PublicUrl)
  249. parameters:@{@"area": dic[@"pk"], @"modelpk": [ModelUser user].modelpk}
  250. finish:^(id dataDic) {
  251. if ([dataDic[@"msg"] isEqualToString:@"success"]) {
  252. [MBProgressHUD showSuccess:@"修改成功"];
  253. cell.detailTextLabel.text = selectValue;
  254. } else {
  255. [MBProgressHUD showError:@"修改失败"];
  256. }
  257. }
  258. enError:^(NSError *error) {
  259. }];
  260. }
  261. }
  262. }];
  263. } else if ([@"年龄" isEqualToString:rowTitle]) {
  264. InfoEditViewController *infoVc = [InfoEditViewController new];
  265. infoVc.editType = InfoEditTypeAge;
  266. [self.navigationController pushViewController:infoVc animated:YES];
  267. } else if ([@"职业" isEqualToString:rowTitle]) {
  268. // InfoEditViewController *infoVc = [InfoEditViewController new];
  269. // infoVc.editType = InfoEditTypeOccupation;
  270. // [self.navigationController pushViewController:infoVc animated:YES];
  271. [BRStringPickerView showStringPickerWithTitle:@"请选择职业" dataSource:self.jobArray defaultSelValue:nil resultBlock:^(id selectValue) {
  272. [YanCNetWorkManager requestPostWithURLStr:Url_updateModelCard(PublicUrl)
  273. parameters:@{@"occupation": selectValue, @"modelpk": [ModelUser user].modelpk}
  274. finish:^(id dataDic) {
  275. if ([dataDic[@"msg"] isEqualToString:@"success"]) {
  276. [MBProgressHUD showSuccess:@"修改成功"];
  277. cell.detailTextLabel.text = selectValue;
  278. } else {
  279. [MBProgressHUD showError:@"修改失败"];
  280. }
  281. }
  282. enError:^(NSError *error) {
  283. }];
  284. }];
  285. } else if ([@"星座" isEqualToString:rowTitle]) {
  286. // InfoEditViewController *infoVc = [InfoEditViewController new];
  287. // infoVc.editType = InfoEditTypeConstellation;
  288. // [self.navigationController pushViewController:infoVc animated:YES];
  289. [BRStringPickerView showStringPickerWithTitle:@"请选择星座" dataSource:self.constellationArray defaultSelValue:nil resultBlock:^(id selectValue) {
  290. [YanCNetWorkManager requestPostWithURLStr:Url_updateModelCard(PublicUrl)
  291. parameters:@{@"constellation": selectValue, @"modelpk": [ModelUser user].modelpk}
  292. finish:^(id dataDic) {
  293. if ([dataDic[@"msg"] isEqualToString:@"success"]) {
  294. [MBProgressHUD showSuccess:@"修改成功"];
  295. cell.detailTextLabel.text = selectValue;
  296. } else {
  297. [MBProgressHUD showError:@"修改失败"];
  298. }
  299. }
  300. enError:^(NSError *error) {
  301. }];
  302. }];
  303. } else if ([@"毕业院校" isEqualToString:rowTitle]) {
  304. InfoEditViewController *infoVc = [InfoEditViewController new];
  305. infoVc.editType = InfoEditTypeCollege;
  306. [self.navigationController pushViewController:infoVc animated:YES];
  307. } else if ([@"兴趣爱好" isEqualToString:rowTitle]) {
  308. HobbyViewController *hobbyVC = [[HobbyViewController alloc] init];
  309. [self.navigationController pushViewController:hobbyVC animated:YES];
  310. } else if ([@"我的标签" isEqualToString:rowTitle]) {
  311. ModelTagViewController *tagVC = [ModelTagViewController new];
  312. [self.navigationController pushViewController:tagVC animated:YES];
  313. } else if ([@"我的荣誉" isEqualToString:rowTitle]) {
  314. ModelHonorViewController *honorVc = [ModelHonorViewController new];
  315. [self.navigationController pushViewController:honorVc animated:YES];
  316. }
  317. }
  318. #pragma mark -- 保存按钮
  319. - (void)bindingBtnAction {
  320. if ([tempUser.photocount intValue] < 5) {
  321. [self.view makeToast:@"请至少上传5张照片" duration:2.0 position:CSToastPositionCenter];
  322. return;
  323. }
  324. if (tempUser.pet.length == 0) {
  325. [self.view makeToast:@"请填写姓名" duration:2.0 position:CSToastPositionCenter];
  326. return;
  327. }
  328. if (tempUser.lname.length == 0) {
  329. [self.view makeToast:@"请填写个性签名" duration:2.0 position:CSToastPositionCenter];
  330. return;
  331. }
  332. if (tempUser.vprice.length == 0) {
  333. [self.view makeToast:@"请填写视频单价" duration:2.0 position:CSToastPositionCenter];
  334. return;
  335. }
  336. if (tempUser.hei.length == 0 || [@"0" isEqualToString:tempUser.hei]) {
  337. [self.view makeToast:@"请填写身高" duration:2.0 position:CSToastPositionCenter];
  338. return;
  339. }
  340. if (tempUser.wei.length == 0 || [@"0" isEqualToString:tempUser.wei]) {
  341. [self.view makeToast:@"请填写体重" duration:2.0 position:CSToastPositionCenter];
  342. return;
  343. }
  344. if (tempUser.bust.length == 0) {
  345. [self.view makeToast:@"请填写三围" duration:2.0 position:CSToastPositionCenter];
  346. return;
  347. }
  348. if (tempUser.area.length == 0) {
  349. [self.view makeToast:@"请填写地区" duration:2.0 position:CSToastPositionCenter];
  350. return;
  351. }
  352. if (tempUser.age.length == 0) {
  353. [self.view makeToast:@"请填写年龄" duration:2.0 position:CSToastPositionCenter];
  354. return;
  355. }
  356. if (tempUser.occupation.length == 0) {
  357. [self.view makeToast:@"请填写职业" duration:2.0 position:CSToastPositionCenter];
  358. return;
  359. }
  360. if (tempUser.constellation.length == 0) {
  361. [self.view makeToast:@"请填写星座" duration:2.0 position:CSToastPositionCenter];
  362. return;
  363. }
  364. if (tempUser.college.length == 0) {
  365. [self.view makeToast:@"请填写毕业院校" duration:2.0 position:CSToastPositionCenter];
  366. return;
  367. }
  368. // [MBProgressHUD showSuccess:@"保存成功"];
  369. // [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(backClick) userInfo:nil repeats:NO];
  370. if ([@"init" isEqualToString:self.type]) {
  371. MySkillsController *mySkillsVC = [[MySkillsController alloc] init];
  372. [self.navigationController pushViewController:mySkillsVC animated:YES];
  373. } else {
  374. ShareCardController *shareCardVC = [[ShareCardController alloc] init];
  375. [self.navigationController pushViewController:shareCardVC animated:YES];
  376. }
  377. }
  378. #pragma mark -- 网络请求
  379. - (void)postDataFromNetworking {
  380. [MBProgressHUD showHUDAddedTo:self.view animated:YES];
  381. ModelUser *modelUser = [ModelUser user];
  382. NSDictionary *dic = @{@"modelpk": modelUser.modelpk, @"lname": self.lnameCell.textLabel.text};
  383. [YanCNetWorkManager requestPostWithURLStr:Url_updateModelCard(PublicUrl)
  384. parameters:dic
  385. finish:^(id dataDic) {
  386. [MBProgressHUD hideHUDForView:self.view animated:YES];
  387. NSString *issuccess = dataDic[@"msg"];
  388. if ([issuccess isEqualToString:@"success"]) {
  389. [MBProgressHUD showSuccess:@"保存成功"];
  390. } else {
  391. }
  392. }
  393. enError:^(NSError *error) {
  394. [MBProgressHUD hideHUDForView:self.view animated:YES];
  395. }];
  396. }
  397. @end