CoachInfo.m 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #import "CoachInfo.h"
  2. @implementation CoachInfo
  3. +(id)coachInfoWithDict:(NSDictionary*)dict{
  4. CoachInfo* coach = [[CoachInfo alloc] init];
  5. coach.ciName = dict[@"NAME"];
  6. coach.ciSex = dict[@"SEX"];
  7. coach.ciTeachCarType = dict[@"teachCarType"];//@lee-mark CARTYPE
  8. coach.ciAddress = dict[@"ADDRESS"];
  9. coach.count = dict[@"COUNT"];
  10. coach.ciMobile = dict[@"mobile"];//@lee-mark TELPHONE 下面也是mobile(都保留吧 先)
  11. coach.tel = dict[@"MOBILE"];
  12. coach.star = dict[@"STAR"];
  13. coach.schoolName = dict[@"SCHOOLNAME"];
  14. coach.headImage = dict[@"photo"];//@lee-mark HEADIMG ps:(教练排行榜进入)返回的都是小写 这里。。。
  15. coach.coachSFZHM = dict[@"SFZHM"];//@lee-mark 这个参数没有(教练排行榜进入)
  16. coach.score = dict[@"SCORE"];//@lee-mark 这个参数没有(教练排行榜进入)
  17. coach.price = dict[@"price"];
  18. coach.desc = dict[@"desc"];//@lee-mark 这个参数没有(教练排行榜进入)
  19. coach.watch = dict[@"watch"];
  20. if ([coach.desc isEqualToString:@""]) {
  21. coach.desc = @"暂无相关描述";
  22. }
  23. if ([coach.price isEqualToString:@""]) {
  24. coach.price = @"0";
  25. }
  26. return coach;
  27. }
  28. @end