chore: Initial clean commit

- Removed YuMi/Library/ (138 MB, not tracked)
- Removed YuMi/Resources/ (23 MB, not tracked)
- Removed old version assets (566 files, not tracked)
- Excluded Pods/, xcuserdata/ and other build artifacts
- Clean repository optimized for company server deployment
This commit is contained in:
edwinQQQ
2025-10-09 16:19:14 +08:00
commit a35a711be6
5582 changed files with 408913 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,171 @@
//
// DataUtils.m
// YYFaceAuth
//
// Created by chenran on 16/10/18.
// Copyright © 2016 zhangji. All rights reserved.
//
#define kFileName @"AccountInfo.data"
#define kDataKey @"accountInfo"
#define kHomeUserDataKey @"homeUserInfo"
#define kHomeUserName @"HomeUserModel.data"
#import "AccountInfoStorage.h"
#import "AccountModel.h"
#import "HomeTagModel.h"
#define kTagListDataKey @"homeaaNewTagModel"
#define kTagListDataName @"HomeTagNewModel.data"
@interface AccountInfoStorage()
@property (nonatomic,strong) HomeUserModel *homeUserInfo;
@property (nonatomic, copy) NSString *ticket;
@property (nonatomic, strong) AccountModel *accountModel;
@property (nonatomic,strong) NSArray<HomeTagModel *> *tagList;
@end
@implementation AccountInfoStorage
static AccountInfoStorage *_instance = nil;
+ (AccountInfoStorage *)instance {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_instance = [[self alloc] init];
}) ;
return _instance;
}
-(NSString *) getFilePath{
NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [[array objectAtIndex:0] stringByAppendingPathComponent:kFileName];
if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
[[NSFileManager defaultManager] createFileAtPath:path contents:nil attributes:nil];
}
return path;
}
- (AccountModel *)getCurrentAccountInfo
{
if (self.accountModel != nil) {
return self.accountModel;
}
if ([[NSFileManager defaultManager] fileExistsAtPath:[self getFilePath]] == NO) {
return nil;
}
NSData *data = [[NSData alloc] initWithContentsOfFile:[self getFilePath]];
if (data == nil) {
return nil;
}
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
//
self.accountModel = [unarchiver decodeObjectForKey:kDataKey];
[unarchiver finishDecoding];//finishDecoding
return self.accountModel;
}
- (void)saveAccountInfo:(AccountModel *)accountInfo
{
if (accountInfo == nil) {
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 getFilePath] atomically:YES];
}
- (HomeUserModel *)getCurrentHomeUserInfo
{
if (self.homeUserInfo != nil) {
return self.homeUserInfo;
}
NSData *data = [[NSData alloc] initWithContentsOfFile:[self getHomeUserFilePath]];
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
//
self.homeUserInfo = [unarchiver decodeObjectForKey:kHomeUserDataKey];
[unarchiver finishDecoding];//finishDecoding
return self.homeUserInfo;
}
- (void)saveHomeUserInfo:(HomeUserModel *)homeUserInfo
{
if (homeUserInfo == nil) {
homeUserInfo = [[HomeUserModel alloc] init];
}
self.homeUserInfo = homeUserInfo;
NSMutableData *data = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:homeUserInfo forKey:kHomeUserDataKey];
[archiver finishEncoding];
[data writeToFile:[self getHomeUserFilePath] atomically:YES];
}
-(NSString *) getHomeUserFilePath{
NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [[array objectAtIndex:0] stringByAppendingPathComponent:kHomeUserName];
if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
[[NSFileManager defaultManager] createFileAtPath:path contents:nil attributes:nil];
}
return path;
}
- (void)saveTicket:(NSString *)t
{
self.ticket = t;
}
- (NSString *)getTicket
{
if (self.ticket == nil) {
return @"";
}
return self.ticket;
}
- (NSString *)getUid
{
AccountModel *am = [self getCurrentAccountInfo];
if (am == nil) {
return @"";
}
return am.uid;
}
- (NSArray<HomeTagModel *> *)getCurrentTagList{
if (self.tagList != nil) {
return self.tagList;
}
NSData *data = [[NSData alloc] initWithContentsOfFile:[self getTagListFilePath]];
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
//
self.tagList = [unarchiver decodeObjectForKey:kTagListDataKey];
[unarchiver finishDecoding];//finishDecoding
return self.tagList != nil ? self.tagList : @[];
}
- (void)saveTagList:(NSArray<HomeTagModel *> *)tagList{
if(tagList == nil){
tagList = @[];
}
self.tagList = tagList;
NSMutableData *data = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:tagList forKey:kTagListDataKey];
[archiver finishEncoding];
[data writeToFile:[self getTagListFilePath] atomically:YES];
}
-(NSString *) getTagListFilePath{
NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [[array objectAtIndex:0] stringByAppendingPathComponent:kTagListDataName];
if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
[[NSFileManager defaultManager] createFileAtPath:path contents:nil attributes:nil];
}
return path;
}
@end

View File

@@ -0,0 +1,31 @@
//
// TokenModel.h
// YUMI
//
// Created by zu on 2021/9/8.
//
#import "NSObject+MJExtension.h"
NS_ASSUME_NONNULL_BEGIN
@interface AccountModel : PIBaseModel
@property (nonatomic , copy) NSString *uid;
@property (nonatomic , copy) NSString *jti;
@property (nonatomic , copy) NSString *token_type;
@property (nonatomic , copy) NSString *refresh_token;
@property (nonatomic , copy) NSString *netEaseToken;
@property (nonatomic , copy) NSString *access_token;
@property (nonatomic , copy) NSNumber *expires_in;
@end
@interface HomeUserModel : PIBaseModel
@property (nonatomic,copy)NSString *nick;
@property (nonatomic,copy)NSString *avatar;
@property (nonatomic,assign)BOOL isBindPhone;
@property (nonatomic,copy) NSString *ticket;
@property (nonatomic,assign) BOOL isGetUserInfoSuccess;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,15 @@
//
// TokenModel.m
// YUMI
//
// Created by zu on 2021/9/8.
//
#import "AccountModel.h"
@implementation AccountModel
@end
@implementation HomeUserModel
@end

View File

@@ -0,0 +1,26 @@
//
// BaseModel.h
// YUMI
//
// Created by zu on 2021/9/8.
//
#import "NSObject+MJExtension.h"
NS_ASSUME_NONNULL_BEGIN
@interface BaseModel : NSObject
@property(nonatomic,assign) long timestamp;
@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
NS_ASSUME_NONNULL_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

@@ -0,0 +1,23 @@
//
// GuildInfo.h
// YuMi
//
// Created by P on 2024/9/19.
//
#import "PIBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface GuildInfo : PIBaseModel
@property (nonatomic, copy) NSString *avatar;
@property (nonatomic, copy) NSString *guildName;
@property (nonatomic, assign) NSInteger erbanNo;
@property (nonatomic, assign) NSInteger guildId;
@property (nonatomic, assign) NSInteger showCpAnim;
@property (nonatomic, assign) NSInteger showCpAvatar;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// GuildInfo.m
// YuMi
//
// Created by P on 2024/9/19.
//
#import "GuildInfo.h"
@implementation GuildInfo
@end

View File

@@ -0,0 +1,85 @@
//
// MedalModel.h
// YuMi
//
// Created by P on 2024/6/25.
//
#import "PIBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface UserMedalModel : PIBaseModel
/**
* 用户UID
*/
@property (nonatomic, assign) NSInteger uid;
/**
* 勋章ID
*/
@property (nonatomic, assign) NSInteger medalId;
/**
* 勋章名称
*/
@property (nonatomic, copy) NSString *medalName;
/**
* 图片链接
*/
@property (nonatomic, copy) NSString *picUrl;
/**
* 排序
*/
@property (nonatomic, assign) NSInteger seqNo;
/**
* 勋章类型
*/
@property (nonatomic, assign) NSInteger medalType;
/**
* 是否点亮
*/
@property (nonatomic, assign) BOOL isLightUp;
/**
* 领取时间
*/
@property (nonatomic, assign) double receiveTime;
/**
* 勋章描述
*/
@property (nonatomic, copy) NSString *medalDesc;
/**
* 勋章横幅
*/
@property (nonatomic, copy) NSString *banner;
/**
* 勋章数量
*/
@property (nonatomic, assign) NSInteger amount;
/**
* 勋章小图标
*/
@property (nonatomic, copy) NSString *smallIcon;
/**
* 业务类型
*/
@property (nonatomic, assign) NSInteger busType;
@property (nonatomic,copy) NSString *mp4Url;
@end
@interface MedalModel : PIBaseModel
@property (nonatomic, assign) NSInteger medalCount;
@property (nonatomic, strong) NSArray<UserMedalModel *>* userMedals;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,21 @@
//
// MedalModel.m
// YuMi
//
// Created by P on 2024/6/25.
//
#import "MedalModel.h"
@implementation MedalModel
+ (NSDictionary *)objectClassInArray {
return @{
@"userMedals":UserMedalModel.class
};
}
@end
@implementation UserMedalModel
@end

View File

@@ -0,0 +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>
// 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

@@ -0,0 +1,245 @@
//
// NSObject+AutoCoding.m
// YYMobileFramework
//
// Created by wuwei on 14/6/13.
// Copyright (c) 2014 YY Inc. All rights reserved.
//
#import "NSObject+AutoCoding.h"
#import <objc/runtime.h>
#pragma GCC diagnostic ignored "-Wgnu"
static NSString *const AutocodingException = @"AutocodingException";
@implementation NSObject (AutoCoding)
+ (BOOL)supportsSecureCoding
{
return YES;
}
+ (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];
}
}
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 *)codableProperties
{
unsigned int propertyCount;
__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])
{
case '@':
{
if (strlen(typeEncoding) >= 3)
{
char *className = strndup(typeEncoding + 2, strlen(typeEncoding) - 3);
__autoreleasing NSString *name = @(className);
NSRange range = [name rangeOfString:@"<"];
if (range.location != NSNotFound)
{
name = [name substringToIndex:range.location];
}
propertyClass = NSClassFromString(name) ?: [NSObject class];
free(className);
}
break;
}
case 'c':
case 'i':
case 's':
case 'l':
case 'q':
case 'C':
case 'I':
case 'S':
case 'L':
case 'Q':
case 'f':
case 'd':
case 'B':
{
propertyClass = [NSNumber class];
break;
}
case '{':
{
propertyClass = [NSValue class];
break;
}
default:
break;
}
free(typeEncoding);
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]])
{
//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)
{
//no ivar, but setValue:forKey: will still work
codableProperties[key] = propertyClass;
}
free(dynamic);
free(readonly);
}
}
}
free(properties);
return codableProperties;
}
- (NSDictionary *)codableProperties
{
__autoreleasing NSDictionary *codableProperties = objc_getAssociatedObject([self class], _cmd);
if (!codableProperties)
{
codableProperties = [NSMutableDictionary dictionary];
Class subclass = [self class];
while (subclass != [NSObject class])
{
[(NSMutableDictionary *)codableProperties addEntriesFromDictionary:[subclass codableProperties]];
subclass = [subclass superclass];
}
codableProperties = [NSDictionary dictionaryWithDictionary:codableProperties];
//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 codableProperties;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
for (__unsafe_unretained NSString *key in [self codableProperties])
{
id value = [self valueForKey:key];
if (value)
dict[key] = value;
else
dict[key] = @"nil";
}
return dict;
}
- (void)setWithCoder:(NSCoder *)aDecoder
{
BOOL secureAvailable = [aDecoder respondsToSelector:@selector(decodeObjectOfClass:forKey:)];
BOOL secureSupported = [[self class] supportsSecureCoding];
NSDictionary *properties = [self codableProperties];
for (NSString *key in properties)
{
id object = nil;
Class propertyClass = properties[key];
if (secureAvailable)
{
if ([propertyClass isEqual:[NSMutableAttributedString class]]) {
continue;
}
object = [aDecoder decodeObjectOfClass:propertyClass forKey:key];
}
else
{
if ([propertyClass isEqual:[NSMutableAttributedString class]]) {
continue;
}
object = [aDecoder decodeObjectForKey:key];
}
if (object)
{
if (secureSupported && ![object isKindOfClass:propertyClass])
{
[NSException raise:AutocodingException format:@"Expected '%@' to be a %@, but was actually a %@", key, propertyClass, [object class]];
}
[self setValue:object forKey:key];
}
}
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
[self setWithCoder:aDecoder];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
for (NSString *key in [self codableProperties])
{
id object = [self valueForKey:key];
if (object) [aCoder encodeObject:object forKey:key];
}
}
@end

View File

@@ -0,0 +1,16 @@
//
// PIBaseModel.h
// YuMi
//
// Created by duoban on 2023/11/15.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface PIBaseModel : NSObject
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,36 @@
//
// PIBaseModel.m
// YuMi
//
// Created by duoban on 2023/11/15.
//
#import "PIBaseModel.h"
@implementation PIBaseModel
- (NSString *)debugDescription {
//NSArray NSDictionary NSNumber debugDescription
if ([self isKindOfClass:[NSArray class]] || [self isKindOfClass:[NSDictionary class]] || [self isKindOfClass:[NSString class]] || [self isKindOfClass:[NSNumber class]]) {
return [self debugDescription];
}
//
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
//class
uint count;
objc_property_t *properties = class_copyPropertyList([self class], &count);
//KVC
for (int i = 0; i<count; i++) {
objc_property_t property = properties[i];
NSString *name = @(property_getName(property));
id value = [self valueForKey:name]?:@"nil";//nil
[dictionary setObject:value forKey:name];//
}
//
free(properties);
//return
return [NSString stringWithFormat:@"<%@: %p> -- %@",[self class],self,dictionary];
}
@end

View File

@@ -0,0 +1,54 @@
//
// RelationUserVO.h
// YuMi
//
// Created by P on 2024/9/19.
//
#import "PIBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, CP_TYPE) {
CP_TYPE_CP = 1,
CP_TYPE_BRO,
CP_TYPE_SISTER,
CP_TYPE_FRIEND
};
typedef NS_ENUM(NSUInteger, CP_CLICK_TYPE) {
CP_CLICK_TYPE_DEFAULT = 0,
CP_CLICK_TYPE_SENDING,
CP_CLICK_TYPE_PASSED
};
@interface RelationUserVO : PIBaseModel
@property (nonatomic, assign) BOOL showCpAvatar;
@property (nonatomic, assign) BOOL showCpAnim;
@property (nonatomic, copy) NSString *nick;
@property (nonatomic, copy) NSString *avatar;
@property (nonatomic, copy) NSString *cpNick;
@property (nonatomic, copy) NSString *cpAvatar;
@property (nonatomic, assign) NSInteger uid;
@property (nonatomic, assign) NSInteger cpUid;
@property (nonatomic, assign) NSInteger cpDay;
@property (nonatomic, assign) NSInteger cpLevel;
@property (nonatomic, assign) NSInteger maxCpLevel;
@property (nonatomic, assign) NSInteger currentExp;
@property (nonatomic, assign) NSInteger nextLevelExp;
@property (nonatomic, assign) NSInteger cancelGoldNum;
@property (nonatomic, assign) NSInteger endExp;
@property (nonatomic, assign) NSInteger startExp;
@property (nonatomic, assign) CP_TYPE relationNameType;
@property (nonatomic, assign) CP_CLICK_TYPE clickFlag; //默认状态0,1-您已经提交更换申请请耐心等待。2-你需要30天才能更换状态。
- (BOOL)isEmptyRelation;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,16 @@
//
// RelationUserVO.m
// YuMi
//
// Created by P on 2024/9/19.
//
#import "RelationUserVO.h"
@implementation RelationUserVO
- (BOOL)isEmptyRelation {
return self.cpAvatar.length == 0 || self.cpUid == 0 || self.cpNick.length == 0;
}
@end

View File

@@ -0,0 +1,21 @@
//
// UserExpand.h
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "NSObject+MJExtension.h"
NS_ASSUME_NONNULL_BEGIN
@interface UserExpand : PIBaseModel
@property (nonatomic , assign) NSInteger id;
@property (nonatomic , assign) BOOL showLocation;
@property (nonatomic , assign) NSInteger uid;
@property (nonatomic , assign) BOOL showAge;
@property (nonatomic , assign) BOOL matchChat;
@property (nonatomic , assign) BOOL sysMsgNotify;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@@ -0,0 +1,220 @@
//
// UserInfoModel.h
// xplan-ios
//
// Created by zu on 2021/9/14.
//
#import "NSObject+MJExtension.h"
#import "UserExpand.h"
#import "UserLevelVo.h"
#import "UserInfoSkillVo.h"
#import "UserVipInfoVo.h"
#import "UserPhoto.h"
#import "UserGiftWallInfoModel.h"
#import "MomentsInfoModel.h"
#import "XPSoundCardModel.h"
#import "MedalModel.h"
#import "RelationUserVO.h"
#import "GuildInfo.h"
#import "NameplateModel.h"
#import "BaseModelVo.h"
NS_ASSUME_NONNULL_BEGIN
@interface UsingPersonalBackground : PIBaseModel
@property(nonatomic, assign) NSInteger effectType; // 装扮动效图片类型 空/0-图1-mp4,2-svga
@property(nonatomic, assign) NSInteger status;
@property(nonatomic, assign) NSInteger id;
@property(nonatomic, assign) NSInteger partitionFlag;
@property(nonatomic, assign) NSTimeInterval updateTime;
@property(nonatomic, assign) NSTimeInterval createTime;
@property(nonatomic, copy) NSString *pic;
@property(nonatomic, copy) NSString *effect;
@property(nonatomic, copy) NSString *name;
@end
@interface InfoCardVO : PIBaseModel
@property(nonatomic, assign) NSInteger effectType; // 装扮动效图片类型 空/0-图1-mp4,2-svga
@property(nonatomic, copy) NSString *effect;
@end
@interface UserInfoModel : PIBaseModel
@property (nonatomic , assign) NSInteger bindType;
@property (nonatomic , assign) NSInteger createTime;
@property (nonatomic , assign) BOOL parentMode;
@property (nonatomic , assign) BOOL isBindPhone;
@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) 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) GenderType gender;
@property (nonatomic , assign) NSInteger platformRole; /// 0 普通 1超管
@property (nonatomic , assign) NSInteger uid;
@property (nonatomic , assign) NSInteger defUser;
@property (nonatomic , copy) NSString * phone;
@property (nonatomic , copy) NSString * email;
@property (nonatomic , copy) NSString * nick;
@property (nonatomic , assign) NSInteger remainDay;
@property (nonatomic , copy) NSString * avatar;
@property (nonatomic , copy) NSString * reviewingAvatar;
@property (nonatomic , assign) BOOL isReview;
@property (nonatomic , strong) UserInfoSkillVo * userInfoSkillVo;
@property (nonatomic,copy) NSString *region;
@property (nonatomic,copy) NSArray *labels;
@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) BOOL showLimitCharge;
///限时首充结束时间
@property (nonatomic, assign) long limitChargeEndTime;
///相册
@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,assign) BOOL isCustomWord;
///如果在房间有直播中字段
@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,assign) NSInteger headwearType; // 1 = svga, 表示 headwearEffect 是 svga 的链接
@property (nonatomic,assign) NSInteger headWearType; // 1 = svga, 表示 headwearEffect 是 svga 的链接, W 大小写不一致是后端的原因,这里做个兼容
///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上 从 HeadwearModel 映射而来
@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;
///VIP信息
@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) UserEnterRoomFromType fromType;
@property (nonatomic,copy) NSString *fromUid;
///安卓房间公屏气泡
@property (nonatomic, copy) NSString *androidBubbleUrl;
///iOS房间公屏气泡
@property (nonatomic, copy) NSString *iosBubbleUrl;
#pragma mark - 小游戏
/// 小游戏状态 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<MomentsInfoModel *> *dynamicInfo;
///区号
@property (nonatomic,copy) NSString *phoneAreaCode;
///声音卡
@property (nonatomic,strong) XPSoundCardModel *audioCard;
///用户所在区
@property(nonatomic,copy) NSString *partitionId;
///
///
@property (nonatomic,strong) NSMutableAttributedString *levelAtt;
@property (nonatomic,strong) NSMutableAttributedString *idAtt;
///是否是代充代理
@property(nonatomic,assign) BOOL isRechargeUser;
///pk时不能禁麦
@property(nonatomic,assign) BOOL isNoProhibitMic;
@property (nonatomic, strong) MedalModel *medals;
@property (nonatomic, strong) RelationUserVO *relationUserVO;
@property (nonatomic, strong) GuildInfo *guildInfo;
@property (nonatomic, copy) NSArray <NameplateModel *> *userNameplateList;
@property(nonatomic, strong) UsingPersonalBackground *usingPersonalBackground;
@property(nonatomic, strong) InfoCardVO *infoCardVo;
/// 是否超管身份
@property(nonatomic, assign) BOOL hasSuperRole;
@property(nonatomic, copy) NSString *guildNameplateIcon;
@property(nonatomic, assign) NSInteger uploadGifAvatarPrice;
@property(nonatomic, copy) NSString *regionIcon;
@property(nonatomic, copy) NSString *visitTimeDesc;
@property (nonatomic, copy) NSArray <BaseModelVo *> *medalsPic;
- (BOOL)isUserValid;
- (NSString *)userIDString;
- (BOOL)isHeadWearSVGA;
- (BOOL)isArabia;
- (BOOL)isEnglish;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,84 @@
//
// UserInfoModel.m
// xplan-ios
//
// Created by zu on 2021/9/14.
//
#import "UserInfoModel.h"
@implementation InfoCardVO
@end
@implementation UsingPersonalBackground
@end
@implementation UserInfoModel
+ (NSDictionary *)objectClassInArray {
return @{
@"privatePhoto":UserPhoto.class,
@"userGiftWall":UserGiftWallInfoModel.class,
@"userLuckyBagGiftWall":UserGiftWallInfoModel.class,
@"dynamicInfo":MomentsInfoModel.class,
@"audioCard":XPSoundCardModel.class,
@"userNameplateList":NameplateModel.class,
@"usingPersonalBackground":UsingPersonalBackground.class,
@"infoCardVo" : InfoCardVO.class,
@"medalsPic": BaseModelVo.class
};
}
/// id -> ID name -> other.name
+ (NSDictionary *)replacedKeyFromPropertyName {
return @{@"carEffect": @"carport.effect",
@"viewUrl": @"carport.viewUrl",
@"otherViewType": @"carport.otherViewType",
@"headwearEffect" : @"userHeadwear.effect",
@"headwearPic" : @"userHeadwear.pic",
@"headwearType" : @"userHeadwear.type",
@"carName": @"carport.name",
@"reviewingAvatar" : @"newAvatar"
};
}
- (BOOL)isUserValid {
return self.uid > 0;
}
- (NSString *)userIDString {
return [NSString stringWithFormat:@"%ld", (long)self.uid];
}
- (BOOL)isEqual:(id)object {
if (self == object) {
return YES;
}
if (![object isKindOfClass:[UserInfoModel class]]) {
return NO;
}
UserInfoModel *other = (UserInfoModel *)object;
return self.uid == other.uid &&
[self.nick isEqualToString:other.nick] &&
[self.avatar isEqualToString:self.avatar];
}
- (NSUInteger)hash {
return self.nick.hash ^ self.uid;
}
- (BOOL)isHeadWearSVGA {
return self.headwearType == 1 || self.headWearType == 1;
}
- (BOOL)isArabia {
return [self.partitionId isEqualToString:@"2"];
}
- (BOOL)isEnglish {
return [self.partitionId isEqualToString:@"1"];
}
@end

View File

@@ -0,0 +1,16 @@
//
// UserInfoSkillVo.h
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "NSObject+MJExtension.h"
NS_ASSUME_NONNULL_BEGIN
@interface UserInfoSkillVo : PIBaseModel
@property (nonatomic , assign) BOOL liveTag;
@end
NS_ASSUME_NONNULL_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

@@ -0,0 +1,32 @@
//
// UserLevelVo.h
// YUMI
//
// Created by zu on 2021/9/14.
//
#import "NSObject+MJExtension.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, UserLevelType) {
UserLevelType_Common = 1,///普通人
UserLevelType_Offical = 2,///官方
UserLevelType_Robot = 3, ///机器人
};
@interface UserLevelVo : PIBaseModel
@property (nonatomic , copy) NSString * experUrl;
@property (nonatomic , assign) NSInteger charmLevelSeq;
@property (nonatomic , copy) NSString * experLevelName;
@property (nonatomic , copy) NSString * charmLevelName;
@property (nonatomic , assign) NSInteger charmAmount;
@property (nonatomic , copy) NSString * experLevelGrp;
@property (nonatomic , copy) NSString * charmUrl;
@property (nonatomic , assign) NSInteger experLevelSeq;
@property (nonatomic , assign) NSInteger experAmount;
@property (nonatomic , copy) NSString * charmLevelGrp;
///账号类型
@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

@@ -0,0 +1,18 @@
//
// UserPhoto.h
// YUMI
//
// Created by YUMI on 2021/9/23.
//
#import "NSObject+MJExtension.h"
NS_ASSUME_NONNULL_BEGIN
@interface UserPhoto : PIBaseModel
@property (copy, nonatomic) NSString *photoUrl;
@property (copy, nonatomic) NSString *pid;
@property (nonatomic, assign) BOOL isReview;
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@@ -0,0 +1,55 @@
//
// UserVipInfoVo.h
// YUMI
//
// Created by YUMI on 2022/1/4.
// VIP信息
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface UserVipInfoVo : PIBaseModel
///VIP图标
@property (nonatomic, copy) NSString *vipIcon;
///VIP等级
@property (nonatomic, assign) NSInteger vipLevel;
//用户好友昵称颜色
@property (nonatomic, copy) NSString *friendNickColour;
///是否防被踢
@property (nonatomic, assign) BOOL preventKick;
///是否隐身进房
@property (nonatomic, assign) BOOL enterHide;
///VIP进房特效
@property (nonatomic, copy) NSString *enterRoomEffects;
///VIP名称
@property (nonatomic, copy) NSString *vipName;
///隐身访问主页
@property (nonatomic,assign) BOOL lookHomepageHide;
@property (nonatomic, copy) NSString *userCardBG;
/// 是否可以上传动态头像
@property (nonatomic, assign) BOOL uploadGifAvatar;
/// 过期时间
@property (nonatomic, assign) NSTimeInterval expireTime;
/// 是否防跟随进房
@property (nonatomic, assign) BOOL preventTrace;
/// 是否防关注
@property (nonatomic, assign) BOOL preventFollow;
/// 查看访客
@property(nonatomic, assign) BOOL visitHide;
/// 是否無痕瀏覽
@property(nonatomic, assign) BOOL visitListView;
@property (nonatomic, assign) bool privateChatLimit;
@property (nonatomic, copy) NSString *nameplateUrl;
@property(nonatomic, assign) NSInteger visitListVipLimit;
@property(nonatomic, assign) BOOL roomPicScreen; // 是否能发送房间公屏图片消息
@end
NS_ASSUME_NONNULL_END

View File

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