123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- //
- // YOUPAILZLiveManagerListUtils.m
- // VQU
- //
- // Created by CY on 2021/9/1.
- // Copyright © 2021 MS. All rights reserved.
- //
- #import "YOUPAILZLiveManagerListUtils.h"
- @interface YOUPAILZLiveManagerListUtils ()
- @property (nonatomic,strong,readwrite) NSArray <YOUPAILZLiveManageModel*> *youpaipmanages;
- @property (nonatomic,strong,readwrite) NSArray <NSString *> *youpaipmanageUserIds;
- @end
- @implementation YOUPAILZLiveManagerListUtils
- + (instancetype)shared{
- static YOUPAILZLiveManagerListUtils *sharedManager = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- sharedManager = [[YOUPAILZLiveManagerListUtils alloc] init];
- });
- return sharedManager;
- }
- - (void)youpaifreloadManagerListWithLiveId:(NSString *)liveId{
- @weakify(self);
- [LCHttpHelper requestWithURLString:GetManagerList parameters:@{@"live_id":liveId,@"type":@"manager"} needToken:YES type:HttpRequestTypePost success:^(id responseObject) {
- @strongify(self);
- NSDictionary* dict = (NSDictionary*)responseObject;
- NSInteger code = [[dict objectForKey:@"code"] integerValue];
- if (code == 0) {
- self.youpaipmanages = [YOUPAILZLiveManageModel mj_objectArrayWithKeyValuesArray:[dict objectForKey:@"data"]].mutableCopy;
- NSMutableArray *youpaipmanageUserIds = [NSMutableArray array];
- for (YOUPAILZLiveManageModel *model in self.youpaipmanages) {
- [youpaipmanageUserIds addObject:model.youpaipid];
- }
- self.youpaipmanageUserIds = youpaipmanageUserIds.copy;
- }
- } failure:^(NSError *error) {
- }];
- }
- @end
|