更换项目

This commit is contained in:
liyuhua
2023-07-14 18:50:55 +08:00
parent fff67e0aee
commit fc0480ea2c
9340 changed files with 236665 additions and 221827 deletions

View File

@@ -6,42 +6,82 @@
//
#import <Foundation/Foundation.h>
#import "HttpRequestFacilitater.h"
#import "HttpRequestHelper.h"
NS_ASSUME_NONNULL_BEGIN
@interface Api : NSObject
+ (void)manufactureDemand:(NSString *)route method:(HttpRequestHelperMethod)method completion:(HttpRequestHelperCompletion)completion, ...;
/**
route : 接口路径
method : http 请求方法POST、GET等
completion : 网络请求完成的回调
... : 可变参数,第一个为 __FUNCTION__ ,接下来依次为该接口的协议参数
*/
+ (void)makeRequest:(NSString *)route method:(HttpRequestHelperMethod)method completion:(HttpRequestHelperCompletion)completion, ...;
+ (void)getUserInfo:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
+ (void)acquireConsumerAbstracts:(HttpRequestHelperCompletion)completion uids:(NSString *)uids;
///获取多个用户的信息
+ (void)getUserInfos:(HttpRequestHelperCompletion)completion uids:(NSString *)uids;
+ (void)mobileSmsCryptogram:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type phoneAreaCode:(NSString *)phoneAreaCode;
/// 获取手机号的验证码
/// @param completion 请求完成
/// @param mobile 手机号
/// @param type 类型 请看XPEunm中的枚举
+ (void)phoneSmsCode:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type phoneAreaCode:(NSString *)phoneAreaCode;
+ (void)examineAplictowardsionartowardsusCryptogram:(HttpRequestHelperCompletion)complection
/// 校验手机号码
/// @param complection 完成
/// @param mobile 手机号
/// @param code 验证码
/// @param uid 用户的uid
/// @param ticket ticket
+ (void)checkMoblieCode:(HttpRequestHelperCompletion)complection
mobile:(NSString *)mobile
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket;
+ (void)accomplishConsumerAbstract:(HttpRequestHelperCompletion)complection
/// 补全用户资料
/// @param complection 完成
/// @param userInfo 需要更新的用户信息
+ (void)completeUserInfo:(HttpRequestHelperCompletion)complection
userInfo:(NSDictionary *)userInfo;
+ (void)acquireConsumerPocketbookAbstract:(HttpRequestHelperCompletion)complection
/// 获取用户钱包余额信息
/// @param complection 完成
/// @param uid 用户uid
/// @param ticket ticketg
+ (void)getUserWalletInfo:(HttpRequestHelperCompletion)complection
uid:(NSString *)uid
ticket:(NSString *)ticket;
+ (void)requisitionCheckSplconcludeidIdents:(HttpRequestHelperCompletion)complection
/// 批量验证
/// @param complection 完成
/// @param transcationIdStr 需要验证的数据
+ (void)requestCheckTranscationIds:(HttpRequestHelperCompletion)complection
transcationIdStr:(NSString *)transcationIdStr;
+ (void)miecreoscoopeBretowardshaedImplementtowardsion:(HttpRequestHelperCompletion)complection
/// 锁麦/开麦
/// @param complection 完成
/// @param roomUid 房主的uid
/// @param state 0 开麦 1 锁麦
/// @param position 坑位
/// @param ticket 用户的ticket
/// @param uid uid
+ (void)microMuteCompletion:(HttpRequestHelperCompletion)complection
roomUid:(NSString *)roomUid
state:(NSString *)state
position:(NSString *)position
ticket:(NSString *)ticket
uid:(NSString *)uid;
+ (void)miecreoscoopeSpokeImplementtowardsion:(HttpRequestHelperCompletion)complection
/// 锁坑/开锁
/// @param complection 完成
/// @param roomUid 房主的uid
/// @param state 1锁坑位0取消锁即取消锁坑位
/// @param position 坑位
/// @param ticket 用户的ticket
/// @param uid uid
+ (void)microLockCompletion:(HttpRequestHelperCompletion)complection
roomUid:(NSString *)roomUid
state:(NSString *)state
position:(NSString *)position

View File

@@ -9,14 +9,14 @@
#import <Base64/MF_Base64Additions.h>
@implementation Api
+ (void)manufactureDemand:(NSString *)route method:(HttpRequestHelperMethod)method completion:(HttpRequestHelperCompletion)completion, ... {
+ (void)makeRequest:(NSString *)route method:(HttpRequestHelperMethod)method completion:(HttpRequestHelperCompletion)completion, ... {
va_list arg_lists;
va_start(arg_lists, completion);
// __FUNCTION__ key
const char *functionName = va_arg(arg_lists, const char *);
NSString *fn = [[NSString alloc] initWithUTF8String:functionName];
// NSLog __FUNCTION__
NSRange blankRange = [fn rangeOfString:@":"];
NSUInteger start = blankRange.location + 1;
NSUInteger length;
@@ -29,7 +29,7 @@
}
NSString *fromatParamKeys = [fn substringWithRange:NSMakeRange(start, length)];
// NSMutableDictionary *params
NSMutableDictionary *params = [NSMutableDictionary dictionary];
NSArray *paramKeys = [fromatParamKeys componentsSeparatedByString:@":"];
@@ -40,58 +40,92 @@
};
va_end(arg_lists);
[HttpRequestFacilitater request:route method:method params:params completion:completion];
[HttpRequestHelper request:route method:method params:params completion:completion];
}
+ (void)getUserInfo:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
NSString * fang = [NSString stringFromBase64String:@"dXNlci9nZXQ="];
[self manufactureDemand:fang method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
NSString * fang = [NSString stringFromBase64String:@"dXNlci9nZXQ="];///user/get
[self makeRequest:fang method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
}
+ (void)acquireConsumerAbstracts:(HttpRequestHelperCompletion)completion uids:(NSString *)uids {
NSString * fang = [NSString stringFromBase64String:@"dXNlci9saXN0"];
[self manufactureDemand:fang method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uids, nil];
+ (void)getUserInfos:(HttpRequestHelperCompletion)completion uids:(NSString *)uids {
NSString * fang = [NSString stringFromBase64String:@"dXNlci9saXN0"];///user/list
[self makeRequest:fang method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uids, nil];
}
+ (void)mobileSmsCryptogram:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type phoneAreaCode:(NSString *)phoneAreaCode {
NSString * fang = [NSString stringFromBase64String:@"c21zL2dldENvZGU="];
[self manufactureDemand:fang method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, mobile, type, phoneAreaCode,nil];
///
/// @param completion
/// @param mobile
/// @param type XPEunm
+ (void)phoneSmsCode:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type phoneAreaCode:(NSString *)phoneAreaCode {
NSString * fang = [NSString stringFromBase64String:@"c21zL2dldENvZGU="];///sms/getCode
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, mobile, type, phoneAreaCode,nil];
}
+ (void)examineAplictowardsionartowardsusCryptogram:(HttpRequestHelperCompletion)complection
///
/// @param complection
/// @param mobile
/// @param code
/// @param uid uid
/// @param ticket ticket
+ (void)checkMoblieCode:(HttpRequestHelperCompletion)complection
mobile:(NSString *)mobile
code:(NSString *)code
uid:(NSString *)uid
ticket:(NSString *)ticket {
NSString * fang = [NSString stringFromBase64String:@"c21zL3ZlcmlmeQ=="];
[self manufactureDemand:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, mobile, code, uid, ticket,nil];
NSString * fang = [NSString stringFromBase64String:@"c21zL3ZlcmlmeQ=="];///sms/verify
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, mobile, code, uid, ticket,nil];
}
+ (void)accomplishConsumerAbstract:(HttpRequestHelperCompletion)complection
///
/// @param complection
/// @param userInfo
+ (void)completeUserInfo:(HttpRequestHelperCompletion)complection
userInfo:(NSDictionary *)userInfo {
NSString * fang = [NSString stringFromBase64String:@"dXNlci92Mi91cGRhdGU="];
[HttpRequestFacilitater request:fang method:HttpRequestHelperMethodPOST params:userInfo completion:complection];
NSString * fang = [NSString stringFromBase64String:@"dXNlci92Mi91cGRhdGU="];///user/v2/update
[HttpRequestHelper request:fang method:HttpRequestHelperMethodPOST params:userInfo completion:complection];
}
+ (void)acquireConsumerPocketbookAbstract:(HttpRequestHelperCompletion)complection uid:(NSString *)uid ticket:(NSString *)ticket {
NSString * fang = [NSString stringFromBase64String:@"cHVyc2UvcXVlcnk="];
[self manufactureDemand:fang method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, ticket,nil];
///
/// @param complection
/// @param uid uid
/// @param ticket ticketg
+ (void)getUserWalletInfo:(HttpRequestHelperCompletion)complection uid:(NSString *)uid ticket:(NSString *)ticket {
NSString * fang = [NSString stringFromBase64String:@"cHVyc2UvcXVlcnk="];///purse/query
[self makeRequest:fang method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, ticket,nil];
}
+ (void)requisitionCheckSplconcludeidIdents:(HttpRequestHelperCompletion)complection
///
/// @param complection
/// @param transcationIdStr
+ (void)requestCheckTranscationIds:(HttpRequestHelperCompletion)complection
transcationIdStr:(NSString *)transcationIdStr {
NSString * fang = [NSString stringFromBase64String:@"dmVyaWZ5L2NoZWNrSU9TQ2hhcmdlUmVjb3Jk"];
[self manufactureDemand:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,transcationIdStr, nil];
NSString * fang = [NSString stringFromBase64String:@"dmVyaWZ5L2NoZWNrSU9TQ2hhcmdlUmVjb3Jk"];///verify/checkIOSChargeRecord
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,transcationIdStr, nil];
}
+ (void)miecreoscoopeBretowardshaedImplementtowardsion:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid state:(NSString *)state position:(NSString *)position ticket:(NSString *)ticket uid:(NSString *)uid {
NSString * fang = [NSString stringFromBase64String:@"cm9vbS9taWMvbG9ja21pYw=="];
[self manufactureDemand:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, roomUid, state, position, ticket, uid, nil];
/// /
/// @param complection
/// @param roomUid uid
/// @param state 0 1
/// @param position
/// @param ticket ticket
/// @param uid uid
+ (void)microMuteCompletion:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid state:(NSString *)state position:(NSString *)position ticket:(NSString *)ticket uid:(NSString *)uid {
NSString * fang = [NSString stringFromBase64String:@"cm9vbS9taWMvbG9ja21pYw=="];///@"room/mic/lockmic"
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, roomUid, state, position, ticket, uid, nil];
}
+ (void)miecreoscoopeSpokeImplementtowardsion:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid state:(NSString *)state position:(NSString *)position ticket:(NSString *)ticket uid:(NSString *)uid {
NSString * fang = [NSString stringFromBase64String:@"cm9vbS9taWMvbG9ja3Bvcw=="];
[self manufactureDemand:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, roomUid, state, position, ticket, uid, nil];
/// /
/// @param complection
/// @param roomUid uid
/// @param state 10
/// @param position
/// @param ticket ticket
/// @param uid uid
+ (void)microLockCompletion:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid state:(NSString *)state position:(NSString *)position ticket:(NSString *)ticket uid:(NSString *)uid {
NSString * fang = [NSString stringFromBase64String:@"cm9vbS9taWMvbG9ja3Bvcw=="];///room/mic/lockpos
[self makeRequest:fang method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, roomUid, state, position, ticket, uid, nil];
}
@end

View File

@@ -1,31 +0,0 @@
//
// DataUtils.h
// YYFaceAuth
//
// Created by chenran on 16/10/18.
// Copyright © 2016年 zhangji. All rights reserved.
//
#import <Foundation/Foundation.h>
@class AccountMatrix, ThirdConsumerAbstract, ResidenceCoupleMatrix;
@interface AccountAbstractStorage : NSObject
@property (nonatomic, strong, readonly) AccountMatrix *accountModel;
@property (nonatomic,assign) BOOL isRequestRicket;
@property (nonatomic,strong) ThirdConsumerAbstract *thirdUserInfo;
+ (instancetype)instance;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (id)copy NS_UNAVAILABLE;
- (id)mutableCopy NS_UNAVAILABLE;
- (AccountMatrix *)acquireUniversalSequenceriptionAbstract;
- (void)preserveSequenceriptionAbstract:(AccountMatrix *)accountInfo;
- (void)preserveTicket:(NSString *)ticket;
- (NSString *)acquireTicket;
- (NSString *)acquireCid;
- (NSArray<ResidenceCoupleMatrix *> *)acquireUniversalCoupleSttowardsement;
- (void)preserveCoupleSttowardsement:(NSArray<ResidenceCoupleMatrix *> *)tagList;
@end

View File

@@ -0,0 +1,34 @@
//
// DataUtils.h
// YYFaceAuth
//
// Created by chenran on 16/10/18.
// Copyright © 2016年 zhangji. All rights reserved.
//
#import <Foundation/Foundation.h>
@class AccountModel, ThirdUserInfo, HomeTagModel;
@interface AccountInfoStorage : NSObject
@property (nonatomic, strong, readonly) AccountModel *accountModel;
///判断是否正在请求ticketyes的话不能用ticket请求数据不然会出现401要重新登录
@property (nonatomic,assign) BOOL isRequestRicket;
///如果是第三方登录的话 保存一下用户信息
@property (nonatomic,strong) ThirdUserInfo *thirdUserInfo;
+ (instancetype)instance;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (id)copy NS_UNAVAILABLE;
- (id)mutableCopy NS_UNAVAILABLE;
- (AccountModel *)getCurrentAccountInfo;
- (void)saveAccountInfo:(AccountModel *)accountInfo;
- (void)saveTicket:(NSString *)ticket;
- (NSString *)getTicket;
- (NSString *)getUid;
///首页的tag列表增加缓存加快加载速度的优化
- (NSArray<HomeTagModel *> *)getCurrentTagList;
- (void)saveTagList:(NSArray<HomeTagModel *> *)tagList;
@end

View File

@@ -7,24 +7,24 @@
//
#define kFileName @"AccountInfo.data"
#define kDataKey @"accountInfo"
#import "AccountAbstractStorage.h"
#import "AccountMatrix.h"
#import "ResidenceCoupleMatrix.h"
#import "AccountInfoStorage.h"
#import "AccountModel.h"
#import "HomeTagModel.h"
#define kTagListDataKey @"homeaaNewTagModel"
#define kTagListDataName @"HomeTagNewModel.data"
@interface AccountAbstractStorage()
@interface AccountInfoStorage()
@property (nonatomic, copy) NSString *ticket;
@property (nonatomic, strong) AccountMatrix *accountModel;
@property (nonatomic,strong) NSArray<ResidenceCoupleMatrix *> *tagList;
@property (nonatomic, strong) AccountModel *accountModel;
@property (nonatomic,strong) NSArray<HomeTagModel *> *tagList;
@end
@implementation AccountAbstractStorage
@implementation AccountInfoStorage
static AccountAbstractStorage *_instance = nil;
static AccountInfoStorage *_instance = nil;
+ (AccountAbstractStorage *)instance {
+ (AccountInfoStorage *)instance {
static dispatch_once_t onceToken;
@@ -35,7 +35,7 @@ static AccountAbstractStorage *_instance = nil;
return _instance;
}
-(NSString *) acquireAccurtowardseRoute{
-(NSString *) getFilePath{
NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [[array objectAtIndex:0] stringByAppendingPathComponent:kFileName];
if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
@@ -44,39 +44,39 @@ static AccountAbstractStorage *_instance = nil;
return path;
}
- (AccountMatrix *)acquireUniversalSequenceriptionAbstract
- (AccountModel *)getCurrentAccountInfo
{
if (self.accountModel != nil) {
return self.accountModel;
}
NSData *data = [[NSData alloc] initWithContentsOfFile:[self acquireAccurtowardseRoute]];
NSData *data = [[NSData alloc] initWithContentsOfFile:[self getFilePath]];
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
//
self.accountModel = [unarchiver decodeObjectForKey:kDataKey];
[unarchiver finishDecoding];
[unarchiver finishDecoding];//finishDecoding
return self.accountModel;
}
- (void)preserveSequenceriptionAbstract:(AccountMatrix *)accountInfo
- (void)saveAccountInfo:(AccountModel *)accountInfo
{
if (accountInfo == nil) {
accountInfo = [[AccountMatrix alloc] init];
accountInfo = [[AccountModel alloc] init];
}
self.accountModel = accountInfo;
NSMutableData *data = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:accountInfo forKey:kDataKey];
[archiver finishEncoding];
[data writeToFile:[self acquireAccurtowardseRoute] atomically:YES];
[data writeToFile:[self getFilePath] atomically:YES];
}
- (void)preserveTicket:(NSString *)t
- (void)saveTicket:(NSString *)t
{
self.ticket = t;
}
- (NSString *)acquireTicket
- (NSString *)getTicket
{
if (self.ticket == nil) {
return @"";
@@ -84,28 +84,28 @@ static AccountAbstractStorage *_instance = nil;
return self.ticket;
}
- (NSString *)acquireCid
- (NSString *)getUid
{
AccountMatrix *am = [self acquireUniversalSequenceriptionAbstract];
AccountModel *am = [self getCurrentAccountInfo];
if (am == nil) {
return @"";
}
return am.uid;
}
- (NSArray<ResidenceCoupleMatrix *> *)acquireUniversalCoupleSttowardsement{
- (NSArray<HomeTagModel *> *)getCurrentTagList{
if (self.tagList != nil) {
return self.tagList;
}
NSData *data = [[NSData alloc] initWithContentsOfFile:[self acquireCoupleSttowardsementAccurtowardseRoute]];
NSData *data = [[NSData alloc] initWithContentsOfFile:[self getTagListFilePath]];
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
//
self.tagList = [unarchiver decodeObjectForKey:kTagListDataKey];
[unarchiver finishDecoding];
[unarchiver finishDecoding];//finishDecoding
return self.tagList != nil ? self.tagList : @[];
}
- (void)preserveCoupleSttowardsement:(NSArray<ResidenceCoupleMatrix *> *)tagList{
- (void)saveTagList:(NSArray<HomeTagModel *> *)tagList{
if(tagList == nil){
tagList = @[];
}
@@ -114,10 +114,10 @@ static AccountAbstractStorage *_instance = nil;
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:tagList forKey:kTagListDataKey];
[archiver finishEncoding];
[data writeToFile:[self acquireCoupleSttowardsementAccurtowardseRoute] atomically:YES];
[data writeToFile:[self getTagListFilePath] atomically:YES];
}
-(NSString *) acquireCoupleSttowardsementAccurtowardseRoute{
-(NSString *) getTagListFilePath{
NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [[array objectAtIndex:0] stringByAppendingPathComponent:kTagListDataName];
if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface AccountMatrix : NSObject
@interface AccountModel : NSObject
@property (nonatomic , assign) NSString *uid;
@property (nonatomic , copy) NSString *jti;

View File

@@ -5,8 +5,8 @@
// Created by zu on 2021/9/8.
//
#import "AccountMatrix.h"
#import "AccountModel.h"
@implementation AccountMatrix
@implementation AccountModel
@end

View File

@@ -1,12 +0,0 @@
//
// BaseMatrix.m
// YUMI
//
// Created by zu on 2021/9/8.
//
#import "BaseMatrix.h"
@implementation BaseMatrix
@end

View File

@@ -1,5 +1,5 @@
//
// BaseMatrix.h
// BaseModel.h
// YUMI
//
// Created by zu on 2021/9/8.
@@ -9,13 +9,17 @@
NS_ASSUME_NONNULL_BEGIN
@interface BaseMatrix : NSObject
@interface BaseModel : NSObject
@property (nonatomic , strong) id data;
@property (nonatomic , assign) NSInteger code;
@property (nonatomic , copy) NSString *message;
///注销的时间戳 因为后端返回的内容和code在同一层级 安卓已经发出去了 兼容就写在这里吧 请不要模仿
@property (nonatomic,assign) long long cancelDate;
///账号封禁返回的code
///时间
@property (nonatomic,copy) NSString * date;
///封禁的理由
@property (nonatomic,copy) NSString *reason;
@end

View File

@@ -0,0 +1,12 @@
//
// BaseModel.m
// YUMI
//
// Created by zu on 2021/9/8.
//
#import "BaseModel.h"
@implementation BaseModel
@end

View File

@@ -1,12 +0,0 @@
//
// ConsumerAbstractCommunicationVo.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "ConsumerAbstractCommunicationVo.h"
@implementation ConsumerAbstractCommunicationVo
@end

View File

@@ -1,32 +0,0 @@
//
// ConsumerAbstractMatrix.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "ConsumerAbstractMatrix.h"
@implementation ConsumerAbstractMatrix
+ (NSDictionary *)objectCtowardsegorizeInGarment {
return @{
@"privatePhoto":ConsumerAppearance.class,
@"userGiftWall":ConsumerPresentRamparatAbstractMatrix.class,
@"userLuckyBagGiftWall":ConsumerPresentRamparatAbstractMatrix.class,
@"dynamicInfo":SeparationsAbstractMatrix.class
};
}
+ (NSDictionary *)replacedDigitalByvirtueofMaintainertyConstitute {
return @{@"carEffect": @"carport.effect",
@"viewUrl": @"carport.viewUrl",
@"otherViewType": @"carport.otherViewType",
@"headwearEffect" : @"userHeadwear.effect",
@"headwearPic" : @"userHeadwear.pic",
@"carName": @"carport.name",
@"reviewingAvatar" : @"newAvatar"
};
}
@end

View File

@@ -1,13 +0,0 @@
//
// ConsumerAppearance.m
// YUMI
//
// Created by YUMI on 2021/9/23.
//
#import "ConsumerAppearance.h"
@implementation ConsumerAppearance
@end

View File

@@ -1,12 +0,0 @@
//
// ConsumerExpand.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "ConsumerExpand.h"
@implementation ConsumerExpand
@end

View File

@@ -1,12 +0,0 @@
//
// ConsumerPrototypeVo.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "ConsumerPrototypeVo.h"
@implementation ConsumerPrototypeVo
@end

View File

@@ -1,12 +0,0 @@
//
// ConsumerVipAbstractVo.m
// YUMI
//
// Created by YUMI on 2022/1/4.
//
#import "ConsumerVipAbstractVo.h"
@implementation ConsumerVipAbstractVo
@end

View File

@@ -1,22 +1,25 @@
//
// NSObject+AutoCoding.h
// YYMobileFramework
//
// Created by wuwei on 14/6/13.
// Copyright (c) 2014年 YY Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSObject (AutoCoding) <NSSecureCoding>
+ (NSDictionary *)codableMaintainerties;
- (void)setAboutCryptogramr:(NSCoder *)aDecoder;
- (NSDictionary *)codableMaintainerties;
- (NSDictionary *)dictionaryRepresentation;
+ (instancetype)objectAboutStowardsisfperformancesHLOfAccurtowardse:(NSString *)path;
- (BOOL)writeToFile:(NSString *)filePath atomically:(BOOL)useAuxiliaryFile;
//
// NSObject+AutoCoding.h
// YYMobileFramework
//
// Created by wuwei on 14/6/13.
// Copyright (c) 2014年 YY Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSObject (AutoCoding) <NSSecureCoding>
// Coding
+ (NSDictionary *)codableProperties;
- (void)setWithCoder:(NSCoder *)aDecoder;
// Properties access
- (NSDictionary *)codableProperties;
- (NSDictionary *)dictionaryRepresentation;
// Loading / Saving
+ (instancetype)objectWithContentsOfFile:(NSString *)path;
- (BOOL)writeToFile:(NSString *)filePath atomically:(BOOL)useAuxiliaryFile;
@end

View File

@@ -20,22 +20,22 @@ static NSString *const AutocodingException = @"AutocodingException";
return YES;
}
+ (instancetype)objectAboutStowardsisfperformancesHLOfAccurtowardse:(NSString *)filePath
+ (instancetype)objectWithContentsOfFile:(NSString *)filePath
{
//load the file
NSData *data = [NSData dataWithContentsOfFile:filePath];
//attempt to deserialise data as a plist
id object = nil;
if (data)
{
NSPropertyListFormat format;
object = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:&format error:NULL];
//success?
if (object)
{
//check if object is an NSCoded unarchive
if ([object respondsToSelector:@selector(objectForKey:)] && [(NSDictionary *)object objectForKey:@"$archiver"])
{
object = [NSKeyedUnarchiver unarchiveObjectWithData:data];
@@ -43,40 +43,40 @@ static NSString *const AutocodingException = @"AutocodingException";
}
else
{
//return raw data
object = data;
}
}
//return object
return object;
}
- (BOOL)writeToFile:(NSString *)filePath atomically:(BOOL)useAuxiliaryFile
{
//note: NSData, NSDictionary and NSArray already implement this method
//and do not save using NSCoding, however the objectWithContentsOfFile
//method will correctly recover these objects anyway
//archive object
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:self];
return [data writeToFile:filePath atomically:useAuxiliaryFile];
}
+ (NSDictionary *)codableMaintainerties
+ (NSDictionary *)codableProperties
{
unsigned int propertyCount;
__autoreleasing NSMutableDictionary *codableMaintainerties = [NSMutableDictionary dictionary];
__autoreleasing NSMutableDictionary *codableProperties = [NSMutableDictionary dictionary];
objc_property_t *properties = class_copyPropertyList(self, &propertyCount);
for (unsigned int i = 0; i < propertyCount; i++)
{
//get property name
objc_property_t property = properties[i];
const char *propertyName = property_getName(property);
__autoreleasing NSString *key = @(propertyName);
//check if codable
//get property type
Class propertyClass = nil;
char *typeEncoding = property_copyAttributeValue(property, "T");
switch (typeEncoding[0])
@@ -126,28 +126,28 @@ static NSString *const AutocodingException = @"AutocodingException";
if (propertyClass && [propertyClass conformsToProtocol:@protocol(NSSecureCoding)])
{
//check if there is a backing ivar
char *ivar = property_copyAttributeValue(property, "V");
if (ivar)
{
//check if ivar has KVC-compliant name
__autoreleasing NSString *ivarName = @(ivar);
if ([ivarName isEqualToString:key] || [ivarName isEqualToString:[@"_" stringByAppendingString:key]])
{
codableMaintainerties[key] = propertyClass;
//no setter, but setValue:forKey: will still work
codableProperties[key] = propertyClass;
}
free(ivar);
}
else
{
//check if property is dynamic and readwrite
char *dynamic = property_copyAttributeValue(property, "D");
char *readonly = property_copyAttributeValue(property, "R");
if (dynamic && !readonly)
{
codableMaintainerties[key] = propertyClass;
//no ivar, but setValue:forKey: will still work
codableProperties[key] = propertyClass;
}
free(dynamic);
free(readonly);
@@ -156,33 +156,33 @@ static NSString *const AutocodingException = @"AutocodingException";
}
free(properties);
return codableMaintainerties;
return codableProperties;
}
- (NSDictionary *)codableMaintainerties
- (NSDictionary *)codableProperties
{
__autoreleasing NSDictionary *codableMaintainerties = objc_getAssociatedObject([self class], _cmd);
if (!codableMaintainerties)
__autoreleasing NSDictionary *codableProperties = objc_getAssociatedObject([self class], _cmd);
if (!codableProperties)
{
codableMaintainerties = [NSMutableDictionary dictionary];
codableProperties = [NSMutableDictionary dictionary];
Class subclass = [self class];
while (subclass != [NSObject class])
{
[(NSMutableDictionary *)codableMaintainerties addEntriesFromDictionary:[subclass codableMaintainerties]];
[(NSMutableDictionary *)codableProperties addEntriesFromDictionary:[subclass codableProperties]];
subclass = [subclass superclass];
}
codableMaintainerties = [NSDictionary dictionaryWithDictionary:codableMaintainerties];
codableProperties = [NSDictionary dictionaryWithDictionary:codableProperties];
objc_setAssociatedObject([self class], _cmd, codableMaintainerties, OBJC_ASSOCIATION_RETAIN);
//make the association atomically so that we don't need to bother with an @synchronize
objc_setAssociatedObject([self class], _cmd, codableProperties, OBJC_ASSOCIATION_RETAIN);
}
return codableMaintainerties;
return codableProperties;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
for (__unsafe_unretained NSString *key in [self codableMaintainerties])
for (__unsafe_unretained NSString *key in [self codableProperties])
{
id value = [self valueForKey:key];
if (value)
@@ -193,11 +193,11 @@ static NSString *const AutocodingException = @"AutocodingException";
return dict;
}
- (void)setAboutCryptogramr:(NSCoder *)aDecoder
- (void)setWithCoder:(NSCoder *)aDecoder
{
BOOL secureAvailable = [aDecoder respondsToSelector:@selector(decodeObjectOfClass:forKey:)];
BOOL secureSupported = [[self class] supportsSecureCoding];
NSDictionary *properties = [self codableMaintainerties];
NSDictionary *properties = [self codableProperties];
for (NSString *key in properties)
{
id object = nil;
@@ -229,13 +229,13 @@ static NSString *const AutocodingException = @"AutocodingException";
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
[self setAboutCryptogramr:aDecoder];
[self setWithCoder:aDecoder];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
for (NSString *key in [self codableMaintainerties])
for (NSString *key in [self codableProperties])
{
id object = [self valueForKey:key];
if (object) [aCoder encodeObject:object forKey:key];

View File

@@ -1,5 +1,5 @@
//
// ConsumerExpand.h
// UserExpand.h
// YUMI
//
// Created by zu on 2021/9/14.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface ConsumerExpand : NSObject
@interface UserExpand : NSObject
@property (nonatomic , assign) NSInteger id;
@property (nonatomic , assign) BOOL showLocation;
@property (nonatomic , assign) NSInteger uid;

View File

@@ -0,0 +1,12 @@
//
// UserExpand.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "UserExpand.h"
@implementation UserExpand
@end

View File

@@ -1,38 +1,38 @@
//
// ConsumerAbstractMatrix.h
// UserInfoModel.h
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "NSObject+MJExtension.h"
#import "ConsumerExpand.h"
#import "ConsumerPrototypeVo.h"
#import "ConsumerAbstractCommunicationVo.h"
#import "ConsumerVipAbstractVo.h"
#import "ConsumerAppearance.h"
#import "ConsumerPresentRamparatAbstractMatrix.h"
#import "UserExpand.h"
#import "UserLevelVo.h"
#import "UserInfoSkillVo.h"
#import "UserVipInfoVo.h"
#import "UserPhoto.h"
#import "UserGiftWallInfoModel.h"
#import "YUMINNNN.h"
#import "SeparationsAbstractMatrix.h"
#import "MonentsInfoModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface ConsumerAbstractMatrix : NSObject
@interface UserInfoModel : NSObject
@property (nonatomic , assign) NSInteger bindType;
@property (nonatomic , assign) NSInteger createTime;
@property (nonatomic , assign) BOOL parentMode;
@property (nonatomic , assign) BOOL isBindPhone;
@property (nonatomic , strong) ConsumerExpand * userExpand;
@property (nonatomic , strong) UserExpand * userExpand;
@property (nonatomic , assign) NSInteger erbanNo;
@property (nonatomic , assign) NSInteger registerDay;
@property (nonatomic , assign) BOOL isFirstCharge;
@property (nonatomic , assign) BOOL hasPrettyErbanNo;
@property (nonatomic , strong) ConsumerPrototypeVo * userLevelVo;
@property (nonatomic , strong) UserLevelVo * userLevelVo;
@property (nonatomic , assign) BOOL isBindApple;
@property (nonatomic , assign) NSInteger fansNum;
@property (nonatomic , assign) BOOL isBindBankCard;
@property (nonatomic , assign) BOOL hasRegPacket;
@property (nonatomic , assign) GenderGenre gender;
@property (nonatomic , assign) GenderType gender;
@property (nonatomic , assign) NSInteger platformRole;
@property (nonatomic , assign) NSInteger uid;
@property (nonatomic , assign) NSInteger defUser;
@@ -42,58 +42,96 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic , copy) NSString * avatar;
@property (nonatomic , copy) NSString * reviewingAvatar;
@property (nonatomic , assign) BOOL isReview;
@property (nonatomic , strong) ConsumerAbstractCommunicationVo * userInfoSkillVo;
@property (nonatomic , strong) UserInfoSkillVo * userInfoSkillVo;
@property (nonatomic , assign) BOOL newUser;
@property (nonatomic , assign) NSInteger followNum;
@property (nonatomic , assign) BOOL isBindPaymentPwd;
@property (nonatomic , assign) BOOL isBindXCZAccount;
@property (nonatomic , assign) BOOL isBindAlipay;
///是否绑定了密码
@property (nonatomic , assign) BOOL isBindPasswd;
@property (nonatomic, assign) NSInteger visitNum;
@property (nonatomic, assign) NSInteger inRoomNum;
@property (nonatomic, assign) NSInteger visitNum;///访客数量
@property (nonatomic, assign) NSInteger inRoomNum;///足迹
///是否需要展示限时首充列表
@property (nonatomic, assign) BOOL showLimitCharge;
///限时首充结束时间
@property (nonatomic, assign) long limitChargeEndTime;
@property (nonatomic, strong) NSArray<ConsumerAppearance *> *privatePhoto;
///相册
@property (nonatomic, strong) NSArray<UserPhoto *> *privatePhoto;//相册
///签名
@property (nonatomic,copy) NSString *userDesc;
///出生日期
@property (nonatomic,assign) long birth;
///是否实名认证
@property (nonatomic,assign) BOOL isCertified;
///铭牌背景
@property (nonatomic, copy) NSString *nameplatePic;
///铭牌名称
@property (nonatomic, copy) NSString *nameplateWord;
///如果在房间有直播中字段
@property(nonatomic, copy) NSString * roomUid;
///如果在房间,房间的标题
@property (nonatomic, copy) NSString *roomTitle;
///用户信息中的 座驾 并不需要CarModel 映射一下吧
@property (nonatomic,copy) NSString *carEffect;
///座驾特效类型 0普通 1VAP特效
@property (nonatomic, assign) NSInteger otherViewType;
///用户信息中需要用VAP播放的座驾, 映射一下
@property (nonatomic, copy) NSString *viewUrl;
///用户信息中的 座驾昵称 并不需要CarModel 映射一下吧
@property (nonatomic,copy) NSString *carName;
///用户信息中的 头饰的动画 并不需要HeadwearModel 映射一下吧
@property (nonatomic,copy) NSString *headwearEffect;
///用户信息中的 头饰的动画 如果没有的话 就用这个 并不需要HeadwearModel 映射一下吧
@property (nonatomic,copy) NSString *headwearPic;
///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上
@property (nonatomic,copy) NSString *headWearUrl;
#pragma mark - 相亲房的字段
///是否为相亲模式VIP坑位
@property (nonatomic,assign) BOOL vipMic;
///帽子 相亲中收到礼物值最高的那个人 男神 女神都有
@property (nonatomic,copy) NSString *capUrl;
///是不是选择了人
@property (nonatomic,assign) BOOL hasSelectUser;
///所选择的麦序
@property (nonatomic,assign) int selectMicPosition;
@property (nonatomic, strong) ConsumerVipAbstractVo *userVipInfoVO;
///贵族信息
@property (nonatomic, strong) UserVipInfoVo *userVipInfoVO;
///当前使用的资料卡装扮
@property (nonatomic, copy) NSString *userInfoCardPic;
///麦位光圈链接
@property (nonatomic, copy) NSString *micCircle;
///麦位昵称颜色
@property (nonatomic, copy) NSString *micNickColor;
///技能卡图标列表
@property (nonatomic, strong) NSArray *absCardPics;
///跟随的 本地添加的字段
@property (nonatomic,copy) NSString *fromNick;
@property (nonatomic,assign) ConsumerEnterChamberFromGenre fromType;
@property (nonatomic,assign) UserEnterRoomFromType fromType;
@property (nonatomic,copy) NSString *fromUid;
///安卓房间公屏气泡
@property (nonatomic, copy) NSString *androidBubbleUrl;
///iOS房间公屏气泡
@property (nonatomic, copy) NSString *iosBubbleUrl;
#pragma mark - 小游戏
@property (nonatomic, assign) LittleGameDisportPosition gameStatus;
@property (nonatomic, assign) GroupGenre groupType;
@property (nonatomic,strong) NSArray<ConsumerPresentRamparatAbstractMatrix *> *userGiftWall;
@property (nonatomic,strong) NSArray<ConsumerPresentRamparatAbstractMatrix *> *userLuckyBagGiftWall;
/// 小游戏状态 0 未加入游戏1 加入游戏未准备2 加入游戏已准备 3 游戏中
@property (nonatomic, assign) LittleGamePlayStatus gameStatus;
///用户的参加PK的类型
@property (nonatomic, assign) GroupType groupType;
///礼物墙中的礼物
@property (nonatomic,strong) NSArray<UserGiftWallInfoModel *> *userGiftWall;
///礼物墙中的幸运礼物礼物
@property (nonatomic,strong) NSArray<UserGiftWallInfoModel *> *userLuckyBagGiftWall;
///是否防被踢
@property (nonatomic, assign) BOOL preventKick;
///是否符合渠道打招呼
@property (nonatomic,assign) BOOL fromSayHelloChannel;
///是否是封号用户
@property (nonatomic,assign) BOOL banAccount;
@property (nonatomic,strong) NSArray<SeparationsAbstractMatrix *> *dynamicInfo;
///用户的动态
@property (nonatomic,strong) NSArray<MonentsInfoModel *> *dynamicInfo;
@property (nonatomic,strong) NSMutableAttributedString *levelAtt;
@property (nonatomic,strong) NSMutableAttributedString *idAtt;
@end

View File

@@ -0,0 +1,33 @@
//
// UserInfoModel.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "UserInfoModel.h"
@implementation UserInfoModel
+ (NSDictionary *)objectClassInArray {
return @{
@"privatePhoto":UserPhoto.class,
@"userGiftWall":UserGiftWallInfoModel.class,
@"userLuckyBagGiftWall":UserGiftWallInfoModel.class,
@"dynamicInfo":MonentsInfoModel.class
};
}
/// id -> ID name -> other.name
+ (NSDictionary *)replacedKeyFromPropertyName {
return @{@"carEffect": @"carport.effect",
@"viewUrl": @"carport.viewUrl",
@"otherViewType": @"carport.otherViewType",
@"headwearEffect" : @"userHeadwear.effect",
@"headwearPic" : @"userHeadwear.pic",
@"carName": @"carport.name",
@"reviewingAvatar" : @"newAvatar"
};
}
@end

View File

@@ -1,5 +1,5 @@
//
// ConsumerAbstractCommunicationVo.h
// UserInfoSkillVo.h
// YUMI
//
// Created by zu on 2021/9/14.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface ConsumerAbstractCommunicationVo : NSObject
@interface UserInfoSkillVo : NSObject
@property (nonatomic , assign) BOOL liveTag;
@end

View File

@@ -0,0 +1,12 @@
//
// UserInfoSkillVo.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "UserInfoSkillVo.h"
@implementation UserInfoSkillVo
@end

View File

@@ -1,5 +1,5 @@
//
// ConsumerPrototypeVo.h
// UserLevelVo.h
// YUMI
//
// Created by zu on 2021/9/14.
@@ -8,13 +8,13 @@
#import "NSObject+MJExtension.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, ConsumerPrototypeGenre) {
ConsumerPrototypeGenre_Common = 1,
ConsumerPrototypeGenre_Offical = 2,
ConsumerPrototypeGenre_Robot = 3,
typedef NS_ENUM(NSInteger, UserLevelType) {
UserLevelType_Common = 1,///普通人
UserLevelType_Offical = 2,///官方
UserLevelType_Robot = 3, ///机器人
};
@interface ConsumerPrototypeVo : NSObject
@interface UserLevelVo : NSObject
@property (nonatomic , copy) NSString * experUrl;
@property (nonatomic , assign) NSInteger charmLevelSeq;
@property (nonatomic , copy) NSString * experLevelName;
@@ -25,7 +25,8 @@ typedef NS_ENUM(NSInteger, ConsumerPrototypeGenre) {
@property (nonatomic , assign) NSInteger experLevelSeq;
@property (nonatomic , assign) NSInteger experAmount;
@property (nonatomic , copy) NSString * charmLevelGrp;
@property(nonatomic, assign) ConsumerPrototypeGenre defUser;
///账号类型
@property(nonatomic, assign) UserLevelType defUser; //账号类型
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// UserLevelVo.m
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "UserLevelVo.h"
@implementation UserLevelVo
@end

View File

@@ -1,5 +1,5 @@
//
// ConsumerAppearance.h
// UserPhoto.h
// YUMI
//
// Created by YUMI on 2021/9/23.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface ConsumerAppearance : NSObject
@interface UserPhoto : NSObject
@property (copy, nonatomic) NSString *photoUrl;
@property (copy, nonatomic) NSString *pid;
@property (nonatomic, assign) BOOL isReview;

View File

@@ -0,0 +1,13 @@
//
// UserPhoto.m
// YUMI
//
// Created by YUMI on 2021/9/23.
//
#import "UserPhoto.h"
@implementation UserPhoto
@end

View File

@@ -1,5 +1,5 @@
//
// ConsumerVipAbstractVo.h
// UserVipInfoVo.h
// YUMI
//
// Created by YUMI on 2022/1/4.
@@ -9,15 +9,23 @@
NS_ASSUME_NONNULL_BEGIN
@interface ConsumerVipAbstractVo : NSObject
@interface UserVipInfoVo : NSObject
///贵族图标
@property (nonatomic, copy) NSString *vipIcon;
///贵族等级
@property (nonatomic, assign) NSInteger vipLevel;
//用户好友昵称颜色
@property (nonatomic, copy) NSString *friendNickColour;
///是否防被踢
@property (nonatomic, assign) BOOL preventKick;
///是否隐身进房
@property (nonatomic, assign) BOOL enterHide;
///贵族进房特效
@property (nonatomic, copy) NSString *enterRoomEffects;
///贵族名称
@property (nonatomic, copy) NSString *vipName;
///隐身访问主页
@property (nonatomic,assign) BOOL lookHomepageHide;
@end

View File

@@ -0,0 +1,12 @@
//
// UserVipInfoVo.m
// YUMI
//
// Created by YUMI on 2022/1/4.
//
#import "UserVipInfoVo.h"
@implementation UserVipInfoVo
@end

View File

@@ -1,36 +0,0 @@
//
// BaseMvpExternalizer.h
// YUMI
//
// Created by admin on 2023/3/9.
//
#import <Foundation/Foundation.h>
#import "BaseMvpCeremony.h"
#import "HttpRequestFacilitater.h"
NS_ASSUME_NONNULL_BEGIN
typedef void(^HttpSuccess)(BaseMatrix *data);
typedef void(^HttpFail)(NSInteger code, NSString * _Nullable msg);
@interface BaseMvpExternalizer : NSObject
- (void)towardsttowardschRegard:(id)view;
- (id)acquireRegard;
- (void)dettowardschRegard;
- (void)logout;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success EvidenceChambering:(BOOL)loading;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success errorToast:(BOOL)toast;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success EvidenceChambering:(BOOL)loading errorToast:(BOOL)toast;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail EvidenceChambering:(BOOL)loading;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail errorToast:(BOOL)toast;
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail EvidenceChambering:(BOOL)loading errorToast:(BOOL)toast;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,128 +0,0 @@
//
// BaseMvpExternalizer.m
// YUMI
//
// Created by admin on 2023/3/9.
//
#import "BaseMvpExternalizer.h"
#import "AccountAbstractStorage.h"
#import <NIMSDK/NIMSDK.h>
#import "ClientDisposition.h"
@interface BaseMvpExternalizer()
@property (nonatomic, weak) id view;
@end
@implementation BaseMvpExternalizer
- (void)towardsttowardschRegard:(id)view {
self.view = view;
}
- (id)acquireRegard {
return self.view;
}
- (void)logout {
[[AccountAbstractStorage instance] preserveSequenceriptionAbstract:nil];
[[AccountAbstractStorage instance] preserveTicket:nil];
if ([NIMSDK sharedSDK].loginManager.isLogined) {
[[NIMSDK sharedSDK].loginManager logout:nil];
}
[[self acquireRegard] tokenInvalid];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success {
return [self produceHyperessayImplementtowardsion:success fail:nil];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success EvidenceChambering:(BOOL)loading {
return [self produceHyperessayImplementtowardsion:success fail:nil EvidenceChambering:loading];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success errorToast:(BOOL)toast {
return [self produceHyperessayImplementtowardsion:success fail:nil errorToast:toast];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success EvidenceChambering:(BOOL)loading errorToast:(BOOL)toast {
return [self produceHyperessayImplementtowardsion:success fail:nil EvidenceChambering:loading errorToast:toast];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success fail:(HttpFail)fail {
return [self produceHyperessayImplementtowardsion:success fail:fail EvidenceChambering:NO errorToast:YES];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success fail:(HttpFail)fail EvidenceChambering:(BOOL)loading {
return [self produceHyperessayImplementtowardsion:success fail:fail EvidenceChambering:loading errorToast:YES];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success fail:(HttpFail)fail errorToast:(BOOL)toast {
return [self produceHyperessayImplementtowardsion:success fail:fail EvidenceChambering:NO errorToast:toast];
}
- (HttpRequestHelperCompletion)produceHyperessayImplementtowardsion:(HttpSuccess)success fail:(HttpFail)fail EvidenceChambering:(BOOL)loading errorToast:(BOOL)toast {
if (loading) {
[self.view EvidenceKellegChambering];
}
return ^(BaseMatrix *data, NSInteger code, NSString * _Nullable msg) {
if (loading) {
[self.view brakeHUD];
}
if (code == 200) {
success(data);
return;
}
switch (code) {
case 401:
[self logout];
return;
case 407:
case 408:
[[self acquireRegard] accomputtowardsionBanned:data];
return;
case 1415:
[[self acquireRegard] accomplishConsumerAbstract];
return;
case 3009:
[[self acquireRegard] accomputtowardsionRevoctowardsioned:data.mtowardsrix2dictionary];
return;
case 31005: {
}
break;
case 30000: {
}
break;
case 10111:
[self.view brakeHUD];
[[self acquireRegard] EvidenceRealConstituteTowardstesttowardsionentictowardsionPromptsPrecautiousRegard];
return;
case 10108:
[self.view brakeHUD];
[[self acquireRegard] EvidenceRealConstituteTowardstesttowardsionentictowardsionPromptsPrecautiousRegard];
return;
case 25000: {
}
}
if (toast) {
[self.view EvidenceMistakeToast:msg];
}
if (fail) {
fail(code, msg);
}
};
}
- (void)dettowardschRegard {
}
@end

View File

@@ -0,0 +1,36 @@
//
// BaseMvpPresenter.h
// YUMI
//
// Created by admin on 2023/3/9.
//
#import <Foundation/Foundation.h>
#import "BaseMvpProtocol.h"
#import "HttpRequestHelper.h"
NS_ASSUME_NONNULL_BEGIN
typedef void(^HttpSuccess)(BaseModel *data);
typedef void(^HttpFail)(NSInteger code, NSString * _Nullable msg);
@interface BaseMvpPresenter : NSObject
- (void)attatchView:(id)view;
- (id)getView;
- (void)detatchView;
- (void)logout;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success showLoading:(BOOL)loading;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success errorToast:(BOOL)toast;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success showLoading:(BOOL)loading errorToast:(BOOL)toast;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail showLoading:(BOOL)loading;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail errorToast:(BOOL)toast;
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess _Nonnull)success fail:(HttpFail _Nullable)fail showLoading:(BOOL)loading errorToast:(BOOL)toast;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,128 @@
//
// BaseMvpPresenter.m
// YUMI
//
// Created by admin on 2023/3/9.
//
#import "BaseMvpPresenter.h"
#import "AccountInfoStorage.h"
#import <NIMSDK/NIMSDK.h>
#import "ClientConfig.h"
@interface BaseMvpPresenter()
@property (nonatomic, weak) id view;
@end
@implementation BaseMvpPresenter
- (void)attatchView:(id)view {
self.view = view;
}
- (id)getView {
return self.view;
}
- (void)logout {
// 1. logout
[[AccountInfoStorage instance] saveAccountInfo:nil];
[[AccountInfoStorage instance] saveTicket:nil];
if ([NIMSDK sharedSDK].loginManager.isLogined) {
[[NIMSDK sharedSDK].loginManager logout:nil];
}
// 2.
[[self getView] tokenInvalid];
// ///
// [[ClientConfig shareConfig] resetHeartBratTimer];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success {
return [self createHttpCompletion:success fail:nil];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success showLoading:(BOOL)loading {
return [self createHttpCompletion:success fail:nil showLoading:loading];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success errorToast:(BOOL)toast {
return [self createHttpCompletion:success fail:nil errorToast:toast];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success showLoading:(BOOL)loading errorToast:(BOOL)toast {
return [self createHttpCompletion:success fail:nil showLoading:loading errorToast:toast];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail {
return [self createHttpCompletion:success fail:fail showLoading:NO errorToast:YES];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading {
return [self createHttpCompletion:success fail:fail showLoading:loading errorToast:YES];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail errorToast:(BOOL)toast {
return [self createHttpCompletion:success fail:fail showLoading:NO errorToast:toast];
}
- (HttpRequestHelperCompletion)createHttpCompletion:(HttpSuccess)success fail:(HttpFail)fail showLoading:(BOOL)loading errorToast:(BOOL)toast {
if (loading) {
[self.view showAnchorLoading];
}
return ^(BaseModel *data, NSInteger code, NSString * _Nullable msg) {
if (loading) {
[self.view hideHUD];
}
if (code == 200) {
success(data);
return;
}
switch (code) {
case 401: //
[self logout];
return;
case 407:
case 408:
[[self getView] accountBanned:data];
return;
case 1415: //
[[self getView] completeUserInfo];
return;
case 3009: //
[[self getView] accountCanceled:data.model2dictionary];
return;
case 31005: {//
}
break;
case 30000: {// , toast
}
break;
case 10111: //
[self.view hideHUD];
[[self getView] showRealNameAuthenticationTipsAlertView];
return;
case 10108: //
[self.view hideHUD];
[[self getView] showRealNameAuthenticationTipsAlertView];
return;
case 25000: {//
}
}
if (toast) {
[self.view showErrorToast:msg];
}
if (fail) {
fail(code, msg);
}
};
}
- (void)detatchView {
}
@end

View File

@@ -1,25 +0,0 @@
//
// BaseMvpCeremony.h
// YUMI
//
// Created by admin on 2023/3/9.
//
#import <Foundation/Foundation.h>
#import "BaseRegardGovernancer.h"
NS_ASSUME_NONNULL_BEGIN
@class BaseMatrix;
@protocol BaseMvpCeremony <NSObject, BaseRegardGovernancerCeremony>
- (void)tokenInvalid;
- (void)accomplishConsumerAbstract;
- (void)accomputtowardsionRevoctowardsioned:(NSDictionary *)data;
- (void)EvidenceRealConstituteTowardstesttowardsionentictowardsionPromptsPrecautiousRegard;
- (void)accomputtowardsionBanned:(BaseMatrix *)data;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,27 @@
//
// BaseMvpProtocol.h
// YUMI
//
// Created by admin on 2023/3/9.
//
#import <Foundation/Foundation.h>
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class BaseModel;
@protocol BaseMvpProtocol <NSObject, BaseViewControllerProtocol>
- (void)tokenInvalid;
- (void)completeUserInfo;
- (void)accountCanceled:(NSDictionary *)data;
///实名认证弹窗
- (void)showRealNameAuthenticationTipsAlertView;
///封禁账号
- (void)accountBanned:(BaseModel *)data;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,21 +0,0 @@
//
// MvpRegardGovernancer.h
// YUMI
//
// Created by admin on 2023/3/9.
//
#import "BaseRegardGovernancer.h"
#import "BaseMvpExternalizer.h"
NS_ASSUME_NONNULL_BEGIN
@interface MvpRegardGovernancer<T> : BaseRegardGovernancer
@property (nonatomic, strong) __kindof T presimport;
- (__kindof T)producePresimport;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,115 +0,0 @@
//
// MvpRegardGovernancer.m
// YUMI
//
// Created by admin on 2023/3/9.
//
#import "MvpRegardGovernancer.h"
#import "BaseMvpCeremony.h"
#import "BaseMvpExternalizer.h"
#import "YUMISurmountRegardGovernancer.h"
#import "BaseNevigationGovernancer.h"
#import "SurmountFullAbstractRegardGovernancer.h"
#import "YUMITissueRegardGovernancer.h"
#import "MKJPopup.h"
#import "PLIntratemporalUtil.h"
#import "DJDKMIMOMColor.h"
#import "YUMIMacroUitls.h"
#import "YUMIHtmlUrl.h"
@interface MvpRegardGovernancer ()
@end
@implementation MvpRegardGovernancer
- (__kindof id)presimport {
if (_presimport == nil) {
_presimport = [self producePresimport];
[_presimport towardsttowardschRegard:self];
}
return _presimport;
}
- (__kindof id)producePresimport {
return [[BaseMvpExternalizer alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)tokenInvalid {
YUMISurmountRegardGovernancer *loginVC = [[YUMISurmountRegardGovernancer alloc] init];
BaseNevigationGovernancer * nav = [[BaseNevigationGovernancer alloc] initWithRootViewController:loginVC];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
}
- (void)accomputtowardsionRevoctowardsioned:(NSDictionary *)data {
NSString *date = [NSString stringWithFormat:@"%.0f",[[data objectForKey:@"cancelDate"] doubleValue]];
NSString *dateDes = [NSString stringWithFormat:@"注销时间:%@", [PLIntratemporalUtil acquireEngagementAboutYYMMDD:date]];
NSString *msg = [NSString stringWithFormat:@"%@\n\n请联系客服微信kefu01咨询哦!", dateDes];
MKJPrecautiousCommunicationAttributedDisposition *dateAttrConfig = [[MKJPrecautiousCommunicationAttributedDisposition alloc] init];
dateAttrConfig.text = dateDes;
dateAttrConfig.color = DJDKMIMOMColor.aplictowardsionMainPrettify;
MKJPrecautiousDisposition *config = [[MKJPrecautiousDisposition alloc] init];
config.title = YMLocalizedString(@"Mvp_View_Controller_2");
config.message = msg;
config.communicationAttributedDisposition = @[dateAttrConfig];
[MKJPopup precautiousAboutDisposition:config acknowledgementHandler:^{
} cancelHandler:^{
}];
}
- (void)accomplishConsumerAbstract {
SurmountFullAbstractRegardGovernancer * bindPhoneVC = [[SurmountFullAbstractRegardGovernancer alloc] init];
BaseNevigationGovernancer * nav = [[BaseNevigationGovernancer alloc] initWithRootViewController:bindPhoneVC];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
}
- (void)EvidenceRealConstituteTowardstesttowardsionentictowardsionPromptsPrecautiousRegard {
MKJPrecautiousDisposition *config = [[MKJPrecautiousDisposition alloc] init];
config.message = YMLocalizedString(@"Mvp_View_Controller_3");
config.communicationBurlywoodIntervacuum = 4;
config.acknowledgementBtutonDisposition.title = YMLocalizedString(@"Mvp_View_Controller_4");
config.acknowledgementBtutonDisposition.titleColor = UIColor.whiteColor;
config.acknowledgementBtutonDisposition.backgroundColor = [DJDKMIMOMColor aplictowardsionMainPrettify];
MKJPrecautiousCommunicationAttributedDisposition *nameAttrConf = [[MKJPrecautiousCommunicationAttributedDisposition alloc] init];
nameAttrConf.text = YMLocalizedString(@"Mvp_View_Controller_5");
nameAttrConf.color = [DJDKMIMOMColor aplictowardsionMainPrettify];
config.communicationAttributedDisposition = @[nameAttrConf];
[MKJPopup precautiousAboutDisposition:config acknowledgementHandler:^{
} cancelHandler:^{
}];
}
- (void)accomputtowardsionBanned:(BaseMatrix *)data {
MKJPrecautiousDisposition * config = [[MKJPrecautiousDisposition alloc] init];
config.title = YMLocalizedString(@"Mvp_View_Controller_6");
NSString *dateDes = [PLIntratemporalUtil acquireEngagementAboutYYMMDD:data.date];
NSString * title = [NSString stringWithFormat:@"您的账号因%@被封禁\n解封时间%@", data.reason,dateDes];
MKJPrecautiousCommunicationAttributedDisposition * inviteAlertConfig = [[MKJPrecautiousCommunicationAttributedDisposition alloc] init];
inviteAlertConfig.text = dateDes;
inviteAlertConfig.color = [DJDKMIMOMColor aplictowardsionMainPrettify];
inviteAlertConfig.font = [UIFont systemFontOfSize:15];
config.message = title;
config.communicationAttributedDisposition = @[inviteAlertConfig];
[MKJPopup precautiousAboutDisposition:config acknowledgementHandler:^{
} cancelHandler:^{
}];
}
@end

View File

@@ -0,0 +1,21 @@
//
// MvpViewController.h
// YUMI
//
// Created by admin on 2023/3/9.
//
#import "BaseViewController.h"
#import "BaseMvpPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface MvpViewController<T> : BaseViewController
@property (nonatomic, strong) __kindof T presenter;
- (__kindof T)createPresenter;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,118 @@
//
// MvpViewController.m
// YUMI
//
// Created by admin on 2023/3/9.
//
#import "MvpViewController.h"
#import "BaseMvpProtocol.h"
#import "BaseMvpPresenter.h"
#import "XPLoginViewController.h"
#import "BaseNavigationController.h"
#import "LoginFullInfoViewController.h"
#import "XPWebViewController.h"
//Tool
#import "TTPopup.h"
#import "PLTimeUtil.h"
#import "DJDKMIMOMColor.h"
#import "YUMIMacroUitls.h"
#import "YUMIHtmlUrl.h"
@interface MvpViewController ()
@end
@implementation MvpViewController
- (__kindof id)presenter {
if (_presenter == nil) {
_presenter = [self createPresenter];
[_presenter attatchView:self];
}
return _presenter;
}
- (__kindof id)createPresenter {
return [[BaseMvpPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)tokenInvalid {
XPLoginViewController *loginVC = [[XPLoginViewController alloc] init];
BaseNavigationController * nav = [[BaseNavigationController alloc] initWithRootViewController:loginVC];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
}
- (void)accountCanceled:(NSDictionary *)data {
NSString *date = [NSString stringWithFormat:@"%.0f",[[data objectForKey:@"cancelDate"] doubleValue]];
NSString *dateDes = [NSString stringWithFormat:@"注销时间:%@", [PLTimeUtil getDateWithYYMMDD:date]];
NSString *msg = [NSString stringWithFormat:@"%@\n\n请联系客服微信kefu01咨询哦!", dateDes];
TTAlertMessageAttributedConfig *dateAttrConfig = [[TTAlertMessageAttributedConfig alloc] init];
dateAttrConfig.text = dateDes;
dateAttrConfig.color = DJDKMIMOMColor.appMainColor;
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.title = YMLocalizedString(@"MvpViewController2");
config.message = msg;
config.messageAttributedConfig = @[dateAttrConfig];
[TTPopup alertWithConfig:config confirmHandler:^{
} cancelHandler:^{
}];
}
- (void)completeUserInfo {
LoginFullInfoViewController * bindPhoneVC = [[LoginFullInfoViewController alloc] init];
BaseNavigationController * nav = [[BaseNavigationController alloc] initWithRootViewController:bindPhoneVC];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController presentViewController:nav animated:YES completion:nil];
}
///
- (void)showRealNameAuthenticationTipsAlertView {
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.message = YMLocalizedString(@"MvpViewController3");
config.messageLineSpacing = 4;
config.confirmButtonConfig.title = YMLocalizedString(@"MvpViewController4");
config.confirmButtonConfig.titleColor = UIColor.whiteColor;
config.confirmButtonConfig.backgroundColor = [DJDKMIMOMColor appMainColor];
TTAlertMessageAttributedConfig *nameAttrConf = [[TTAlertMessageAttributedConfig alloc] init];
nameAttrConf.text = YMLocalizedString(@"MvpViewController5");
nameAttrConf.color = [DJDKMIMOMColor appMainColor];
config.messageAttributedConfig = @[nameAttrConf];
[TTPopup alertWithConfig:config confirmHandler:^{
} cancelHandler:^{
}];
}
///
- (void)accountBanned:(BaseModel *)data {
TTAlertConfig * config = [[TTAlertConfig alloc] init];
config.title = YMLocalizedString(@"MvpViewController6");
NSString *dateDes = [PLTimeUtil getDateWithYYMMDD:data.date];
NSString * title = [NSString stringWithFormat:@"您的账号因%@被封禁\n解封时间%@", data.reason,dateDes];
TTAlertMessageAttributedConfig * inviteAlertConfig = [[TTAlertMessageAttributedConfig alloc] init];
inviteAlertConfig.text = dateDes;
inviteAlertConfig.color = [DJDKMIMOMColor appMainColor];
inviteAlertConfig.font = [UIFont systemFontOfSize:15];
config.message = title;
config.messageAttributedConfig = @[inviteAlertConfig];
[TTPopup alertWithConfig:config confirmHandler:^{
} cancelHandler:^{
}];
}
@end