CNCSubMinePresent.h 2.26 KB
//
//  CNCSubMinePresent.h
//  CNLiveCMineModule
//
//  Created by CNLive on 2022/1/28.
//

#import <Foundation/Foundation.h>
#import "CNMySettingListModel.h"

NS_ASSUME_NONNULL_BEGIN
typedef void(^RequestCompleted) (BOOL isSuccess, NSString *desc, NSString *score);
typedef void (^CNBindingArrayBlock)(NSArray * _Nullable bindingData, NSArray * _Nullable unBindingData);
typedef void (^CNLoginResponseBlock)(NSURLSessionTask *requestTask, id responseObject, NSError *error);
@interface CNCSubMinePresent : NSObject
@property (nonatomic, copy) RequestCompleted block;
/// 请求刷新二维码
/// @param type 请求类型
/// @param response 返回数据
+ (void) requestGenCodeWith:(NSString *)type response:(void(^)(NSDictionary *data,NSError *error))response;

/// 获取设置本地数据
+ (NSMutableArray <CNMySettingListModel*> *)settingDataSource:(NSString *)status;

/// 允许陌生人查看生活圈
/// @param response 返回数据
+ (void)requestIsAllowFindStrangerSwichResponse:(void (^)(NSString *status))response;
///切换是否可看生活圈
/// @param type 切换类型
/// @param succeed 成功返回
/// @param failed 失败返回
+ (void)requestSwichAllowStranger:(NSString *)type response:(void(^)(void))succeed error:(void(^)(void))failed;
//延时调用
+ (instancetype)manager;
- (void)requestTime:(NSInteger)time taskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block;
//取消延时
- (void)cancelSendRequest;

//首次登录加积分
+ (void)firstLogin:(RequestCompleted _Nullable)block;

//直接调用
+ (void)requestTaskId:(NSString *)taskId contentId:(NSString *)contentId block:(RequestCompleted _Nullable)block;

+ (BOOL)judgeIsAddScoreJson:(NSString *)name taskType:(NSString *)taskType taskId:(NSString *)taskId;
+ (BOOL)writeJsonName:(NSString *)name dic:(NSDictionary *)dic;


#pragma mark - 点击签到

/// 点击签到
/// @param completerBlock 签到完成
+(void)requestWithSignInForIntegralSignInMedthodWithCompleterBlock:(void(^)(CNScoreModel *model,NSInteger errorCode))completerBlock;

/// 显示提示框
/// @param scoreIntergal 积分
/// @param statue 状态
+(void)showWithScoreViewForScoreIntergal:(NSString *)scoreIntergal Statue:(BOOL)statue SuperView:(UIViewController *)superView;




@end

NS_ASSUME_NONNULL_END