YOUPAIUesrInfoEditModel.m 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // YOUPAIUesrInfoEditModen.m
  3. // MSYOUPAI
  4. //
  5. // Created by admin on 2022/3/5.
  6. // Copyright © 2022 MS. All rights reserved.
  7. //
  8. #import "YOUPAIUesrInfoEditModel.h"
  9. @implementation YOUPAIUesrInfoEditModel
  10. -(NSMutableArray *)youpaipalbums{
  11. if(_youpaipalbums == nil){
  12. _youpaipalbums = [[NSMutableArray alloc]initWithCapacity:0];
  13. }
  14. return _youpaipalbums;
  15. }
  16. // 计算进度
  17. -(CGFloat)youpaifProgress{
  18. CGFloat progress = 0;
  19. if(_youpaipbirthday.length>0){
  20. progress = progress+1;
  21. }
  22. if([_youpaipheight integerValue]>0){
  23. progress = progress+1;
  24. }
  25. if([_youpaipweight integerValue]>0){
  26. progress = progress+1;
  27. }
  28. if([_youpaipcityId length ]>0){
  29. progress = progress+1;
  30. }
  31. if(_youpaipoccupation.length>0){
  32. progress = progress+1;
  33. }
  34. if(_youpaipannual_income.length>0){
  35. progress = progress+1;
  36. }
  37. if(_youpaipeducation.length>0){
  38. progress = progress+1;
  39. }
  40. if(_youpaipis_marriage.length>0){
  41. progress = progress+1;
  42. }
  43. if(_youpaiplabel.count>0){
  44. progress = progress+1;
  45. }
  46. if(_youpaipnickname.length>0){
  47. progress = progress+1;
  48. }
  49. if(_youpaipalbums.count>0){
  50. progress = progress+1;
  51. }
  52. // 签名
  53. if(_youpaipsignature.length>0){
  54. progress = progress+1;
  55. }
  56. // 语音
  57. if(_youpaipvoice.length>0){
  58. progress = progress+1;
  59. }
  60. // 视频
  61. if(_youpaipvideo.length>0){
  62. progress = progress+1;
  63. }
  64. return progress/14.0;
  65. }
  66. @end