AboutUsViewController.m 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // AboutUsViewController.m
  3. // KulexiuForTeacher
  4. //
  5. // Created by Kyle on 2022/3/22.
  6. //
  7. #import "AboutUsViewController.h"
  8. #import "AboutUsBodyView.h"
  9. @interface AboutUsViewController ()
  10. @property (nonatomic, strong) AboutUsBodyView *bodyView;
  11. @end
  12. @implementation AboutUsViewController
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. // Do any additional setup after loading the view.
  16. [self allocTitle:@"关于我们"];
  17. [self configUI];
  18. [self requestConfig];
  19. }
  20. - (void)requestConfig {
  21. [KSNetworkingManager queryConfigRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
  22. if ([dic ks_integerValueForKey:@"code"] == 200) {
  23. NSDictionary *result = [dic ks_dictionaryValueForKey:@"data"];
  24. NSString *phone = [result ks_stringValueForKey:@"customerServicePhone"];
  25. NSString *email = [result ks_stringValueForKey:@"customerServiceEmail"];
  26. [self.bodyView configPhone:phone email:email];
  27. }
  28. else {
  29. }
  30. } faliure:^(NSError * _Nonnull error) {
  31. }];
  32. }
  33. - (void)configUI {
  34. _bodyView = [AboutUsBodyView shareInstance];
  35. [self.scrollView addSubview:_bodyView];
  36. [_bodyView mas_makeConstraints:^(MASConstraintMaker *make) {
  37. make.top.mas_equalTo(self.scrollView.mas_top);
  38. make.right.left.mas_equalTo(self.view);
  39. make.height.mas_equalTo(kScreenHeight - kNaviBarHeight - iPhoneXSafeBottomMargin);
  40. }];
  41. }
  42. /*
  43. #pragma mark - Navigation
  44. // In a storyboard-based application, you will often want to do a little preparation before navigation
  45. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  46. // Get the new view controller using [segue destinationViewController].
  47. // Pass the selected object to the new view controller.
  48. }
  49. */
  50. @end