ASSginViewModel.m 894 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // ASSginViewModel.m
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/11/29.
  6. //
  7. #import "ASSginViewModel.h"
  8. @implementation ASSginViewModel
  9. - (void)getSignData:(void(^)(NSArray *arr))compBlock {
  10. [ASNetTools.shared getWithPath:getSignStateUrl param:@{} success:^(id _Nonnull json) {
  11. NSArray *arr = json;
  12. compBlock(arr);
  13. } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
  14. NSArray *arr= [NSArray array];
  15. compBlock(arr);
  16. [Current_normalTool.currentNav.topViewController.view makeToast:msg];
  17. }];
  18. }
  19. - (void)signToday:(void(^)(void))compBlock {
  20. [ASNetTools.shared postWithPath:postSignUrl param:@{} success:^(id _Nonnull json) {
  21. compBlock();
  22. } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
  23. compBlock();
  24. [Current_normalTool.currentNav.topViewController.view makeToast:msg];
  25. }];
  26. }
  27. @end