Commit dbfc0c31 by ludi

已经把礼物面板迁移了过去,暂时还是ff前缀形式,还没删除旧的部分,已经能run了,现在ff的和fus的礼物,面板并存

parent e9a7176d
Showing with 500 additions and 37 deletions
...@@ -29,4 +29,7 @@ ...@@ -29,4 +29,7 @@
@property (nonatomic, assign) CGFloat endOffset; @property (nonatomic, assign) CGFloat endOffset;
+(NSString *)fus_dewGiftGcid;
@end @end
...@@ -14,4 +14,8 @@ ...@@ -14,4 +14,8 @@
_gcid = gcid; _gcid = gcid;
} }
+ (NSString *)fus_dewGiftGcid{
return @"1";
}
@end @end
...@@ -19,6 +19,14 @@ ...@@ -19,6 +19,14 @@
@end @end
@interface FUSJumpDataGiftModel : FUSBaseModel
///访问链接
@property (nonatomic, copy) NSString *url;
///固定高度
@property (nonatomic, assign) CGFloat high;
@end
@interface FUSLiveGiftDataModel : FUSBaseModel @interface FUSLiveGiftDataModel : FUSBaseModel
@property (nonatomic, copy) NSString *subimg; // 角标图片 @property (nonatomic, copy) NSString *subimg; // 角标图片
...@@ -70,5 +78,9 @@ ...@@ -70,5 +78,9 @@
// 专属礼物 (不是专属为空) // 专属礼物 (不是专属为空)
@property (nonatomic, strong) FUSLiveExclusiveGiftModel *exclusive; @property (nonatomic, strong) FUSLiveExclusiveGiftModel *exclusive;
/// 跳转对象
@property (nonatomic, strong) FUSJumpDataGiftModel *jumpData;
/// 爆浆礼物 0:否 1:是
@property (nonatomic, assign) NSInteger burstAward;
@end @end
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
//嵌套的 model //嵌套的 model
+ (NSDictionary *)modelContainerPropertyGenericClass { + (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"exclusive":[FUSLiveExclusiveGiftModel class]}; return @{@"exclusive":[FUSLiveExclusiveGiftModel class],
@"jumpData":[FUSJumpDataGiftModel class]};
} }
@end @end
...@@ -25,3 +26,7 @@ ...@@ -25,3 +26,7 @@
@implementation FUSLiveExclusiveGiftModel @implementation FUSLiveExclusiveGiftModel
@end @end
@implementation FUSJumpDataGiftModel
@end
//
// FUSLevelDataModel.h
// FUSCommon
//
// Created by aaa on 2024/12/23.
//
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSLevelDataModel : FUSBaseModel
@property (nonatomic, strong) NSString *carPower;
@property (nonatomic, strong) NSString *chatPower;
/// 颜色
@property (nonatomic, strong) NSString *color;
/// 图标
@property (nonatomic, strong) NSString *icon;
/// 左侧颜色
@property (nonatomic, strong) NSString *leftColor;
/// 等级
@property (nonatomic, strong) NSString *level;
/// 等级名称
@property (nonatomic, strong) NSString *levelname;
/// 等级ID
@property (nonatomic, strong) NSString *lid;
@property (nonatomic, strong) NSString *power;
@property (nonatomic, strong) NSString *powerIteme;
/// 特权
@property (nonatomic, strong) NSDictionary *privilege;
/// 特权URL
@property (nonatomic, strong) NSString *privilegeUrl;
/// 比率
@property (nonatomic, strong) NSString *rate;
@property (nonatomic, strong) NSString *rightColor;
@property (nonatomic, assign) NSInteger score;
@property (nonatomic, strong) NSString *txtColor;
@end
NS_ASSUME_NONNULL_END
//
// FUSLevelDataModel.m
// FUSCommon
//
// Created by aaa on 2024/12/23.
//
#import "FUSLevelDataModel.h"
@implementation FUSLevelDataModel
@end
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "FUSHotDataMD5Model.h" #import "FUSHotDataMD5Model.h"
#import "FUSLiveStartConfigModel.h" #import "FUSLiveStartConfigModel.h"
#import "FUSLevelDataModel.h"
@interface FUSCommonCacheOperate : NSObject @interface FUSCommonCacheOperate : NSObject
...@@ -119,4 +120,10 @@ ...@@ -119,4 +120,10 @@
success:(void (^)(FUSLiveStartConfigModel *model))success success:(void (^)(FUSLiveStartConfigModel *model))success
failure:(void (^)(NSString *msg))failure; failure:(void (^)(NSString *msg))failure;
/// 更新等级列表数据
/// @param type 类型
/// @param success 1
/// @param failure 0
+ (void)fus_getUpdateLevelModelWithType:(ReadCacheOrder)type success:(void (^)(NSArray<FUSLevelDataModel *> *levelModelArray))success failure:(void (^)(NSString *msg))failure;
@end @end
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#import <RangersAppLog/RangersAppLog.h> #import <RangersAppLog/RangersAppLog.h>
#import <RangersAppLog/BDAutoTrack.h> #import <RangersAppLog/BDAutoTrack.h>
#import <FUSCommon/FUSCommon-Swift.h>
NSString * const kHOT_EXPRESSION = @"expression"; NSString * const kHOT_EXPRESSION = @"expression";
NSString * const kHOT_GIFT = @"gift"; NSString * const kHOT_GIFT = @"gift";
NSString * const kHOT_MOTORING = @"motoring"; NSString * const kHOT_MOTORING = @"motoring";
...@@ -57,6 +59,7 @@ NSString * const kHOT_CHAT_GIFT = @"chatgift"; // 单聊礼物 ...@@ -57,6 +59,7 @@ NSString * const kHOT_CHAT_GIFT = @"chatgift"; // 单聊礼物
{ {
BOOL expression = [[dataDict objectForKey:kHOT_EXPRESSION] boolValue]; BOOL expression = [[dataDict objectForKey:kHOT_EXPRESSION] boolValue];
BOOL banner = [[dataDict objectForKey:kHOT_BANNER] boolValue]; BOOL banner = [[dataDict objectForKey:kHOT_BANNER] boolValue];
BOOL levelNeedUpdate = [[dataDict objectForKey:kHOT_LEVEL] boolValue];
// 旗标数组 // 旗标数组
NSMutableArray *markArray = [NSMutableArray arrayWithObjects:kHOT_RECHARGE, kHOT_GIFT, kHOT_MOTORING, kHOT_EXPRESSION, kHOT_LEVEL, kHOT_BANNER, kHOT_SPLASH, kHOT_CHAT_GIFT, nil]; NSMutableArray *markArray = [NSMutableArray arrayWithObjects:kHOT_RECHARGE, kHOT_GIFT, kHOT_MOTORING, kHOT_EXPRESSION, kHOT_LEVEL, kHOT_BANNER, kHOT_SPLASH, kHOT_CHAT_GIFT, nil];
...@@ -105,6 +108,24 @@ NSString * const kHOT_CHAT_GIFT = @"chatgift"; // 单聊礼物 ...@@ -105,6 +108,24 @@ NSString * const kHOT_CHAT_GIFT = @"chatgift"; // 单聊礼物
}]; }];
} }
if (!levelNeedUpdate) {
[markArray removeObject:kHOT_LEVEL];
[self fus_getUpdateLevelModelWithType:ReadMemoryBegin success:nil failure:nil];
}else {
[self fus_getUpdateLevelModelWithType:ReadServerBegin success:^(NSArray<FUSLevelDataModel *> *levelModelArray) {
[markArray removeObject:kHOT_LEVEL];
if ([NSArray isNull:markArray]) {
if (finishBlock) finishBlock(failArray, code);
}
} failure:^(NSString *msg) {
[markArray removeObject:kHOT_LEVEL];
[failArray addObject:kHOT_LEVEL];
if ([NSArray isNull:markArray]) {
if (finishBlock) finishBlock(failArray, code);
}
}];
}
} failure:^(NSString *msg, int code) { } failure:^(NSString *msg, int code) {
if (finishBlock) finishBlock(nil, code); if (finishBlock) finishBlock(nil, code);
}]; }];
...@@ -457,6 +478,82 @@ NSString * const kHOT_CHAT_GIFT = @"chatgift"; // 单聊礼物 ...@@ -457,6 +478,82 @@ NSString * const kHOT_CHAT_GIFT = @"chatgift"; // 单聊礼物
} }
} }
/// 更新等级列表数据
/// @param type 类型
/// @param success 1
/// @param failure 0
+ (void)fus_getUpdateLevelModelWithType:(ReadCacheOrder)type success:(void (^)(NSArray<FUSLevelDataModel *> *levelModelArray))success failure:(void (^)(NSString *msg))failure{
// 从内存获取数据
if (type <= 1) {
NSArray<FUSLevelDataModel *> *modelList = [FUSSwiftCacheDataShare share].oc_levelModelList;
if (!modelList) {
if (success) success(modelList);
return;
}
}
// 从本地获取数据
if (type <= 2) {
// 获取本地数据
NSArray *modelDictList = [FUSCustomizedInfosStore fus_readCommonInfosWithKey:LEVEL_DATA_MODEL_ARRAY];
// 解析字典数组为Model数组
NSMutableArray<FUSLevelDataModel *> *modelList = [NSMutableArray array];
for (NSDictionary *modelDict in modelDictList) {
FUSLevelDataModel *model = [FUSLevelDataModel fus_modelWithDict:modelDict];
// 容错
if ([FUSBaseModel fus_isNullWithModel:model] || [NSString isNull:model.level]) continue;
[modelList addObject:model];
}
// 更新内存, 回调数据
if (![NSArray isNull:modelList]) {
// 更新内存数据
[FUSSwiftCacheDataShare share].oc_levelModelList = modelList;
// 回调数据
if (success) success(modelList);
return;
}
}
// 从服务器获取数据
if (type <= 3) {
[FUSCommonHttpRequest fus_requestLevelDataWithSuccess:^(NSDictionary *dataDict, int code){
// 解析数据
NSString *dataMd5 = [dataDict objectForKey:@"md5"];
NSArray *modelDictList = [dataDict objectForKey:@"data"];
// 将字典数组转为Model数组
NSMutableArray<FUSLevelDataModel *> *modelList = [NSMutableArray array];
if ([NSArray isNull:modelDictList]) {
modelDictList = [NSArray array];
}
for (NSDictionary *dataDict in modelDictList) {
FUSLevelDataModel *model = [FUSLevelDataModel fus_modelWithDict:dataDict];
// 容错
if ([FUSBaseModel fus_isNullWithModel:model]
|| [NSString isNull:model.level]) {
continue;
}
[modelList addObject:model];
}
// 更新内存数据
FUSHotDataMD5Model *hotDataMD5Model = [[FUSCacheDataShare shareStore] hotDataMD5Model];
hotDataMD5Model.levelMd5 = dataMd5;
[FUSSwiftCacheDataShare share].oc_levelModelList = modelList;
// 更新本地数据
[FUSCustomizedInfosStore fus_addCommonInfosWithKey:HOT_UPDATE_CHECK_MD5_DICT value:[hotDataMD5Model fus_getDictionary]];
[FUSCustomizedInfosStore fus_addCommonInfosWithKey:LEVEL_DATA_MODEL_ARRAY value:modelDictList];
// 回调数据
if (success) success(modelList);
} failure:^(NSString *msg, int code) {
if (failure) failure(msg);
}];
}
}
/** /**
* 获取开播主题配置 * 获取开播主题配置
* *
......
...@@ -111,7 +111,7 @@ typedef enum : NSUInteger { ...@@ -111,7 +111,7 @@ typedef enum : NSUInteger {
* @param success 成功回调 * @param success 成功回调
* @param failure 失败回调 * @param failure 失败回调
*/ */
+ (void)fus_updateRechargeWithMd5:(NSString *)md5 Success:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure; //+ (void)fus_updateRechargeWithMd5:(NSString *)md5 Success:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure;
/** /**
...@@ -122,6 +122,11 @@ typedef enum : NSUInteger { ...@@ -122,6 +122,11 @@ typedef enum : NSUInteger {
*/ */
+ (void)fus_updateGiftWithSuccess:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure; + (void)fus_updateGiftWithSuccess:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure;
/// 请求富豪等级数据
/// @param success 1
/// @param failure 0
+(void)fus_requestLevelDataWithSuccess:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure;
/** /**
更新单聊礼物数据 更新单聊礼物数据
......
...@@ -197,18 +197,18 @@ ...@@ -197,18 +197,18 @@
* @param success 成功回调 * @param success 成功回调
* @param failure 失败回调 * @param failure 失败回调
*/ */
+ (void)fus_updateRechargeWithMd5:(NSString *)md5 Success:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure //+ (void)fus_updateRechargeWithMd5:(NSString *)md5 Success:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure
{ //{
// 新版支付储值点获取 // // 新版支付储值点获取
NSDictionary *paramsDict = @{@"os":@"ios", // NSDictionary *paramsDict = @{@"os":@"ios",
@"pkgname":@"yabolive", // @"pkgname":@"yabolive",
@"paytype":@"APPLEPAY"}; // @"paytype":@"APPLEPAY"};
//
[FUSHttpHelper postRequestBinaryWithUrl:FUSCommonURLs.fus_URL_PAYMENT_RECHARGE_INFO params:paramsDict retryTimes:3 success:success failure:^(NSDictionary *dataDict, int code) { // [FUSHttpHelper postRequestBinaryWithUrl:FUSCommonURLs.fus_URL_PAYMENT_RECHARGE_INFO params:paramsDict retryTimes:3 success:success failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code); // if (failure) failure(FAILURE_MESSAGE, code);
}]; // }];
//
} //}
/** /**
...@@ -264,6 +264,15 @@ ...@@ -264,6 +264,15 @@
}]; }];
} }
/// 请求富豪等级数据
/// @param success 1
/// @param failure 0
+(void)fus_requestLevelDataWithSuccess:(void (^)(NSDictionary *dataDict, int code))success failure:(void (^)(NSString *msg, int code))failure{
[FUSHttpHelper postRequestBinaryWithUrl:FUSCommonURLs.fus_URL_requestLevelData params:nil retryTimes:3 success:success failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
/** /**
* 获取开播主题配置 * 获取开播主题配置
* *
......
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
@property (nonatomic, strong) FUSHotDataMD5Model *hotDataMD5Model; @property (nonatomic, strong) FUSHotDataMD5Model *hotDataMD5Model;
// 储值点数据 // 储值点数据
@property (nonatomic, strong) NSArray *rechargeModelArray; //@property (nonatomic, strong) NSArray *rechargeModelArray;
@property (nonatomic, readonly) NSDictionary *rechargeModelDict; //@property (nonatomic, readonly) NSDictionary *rechargeModelDict;
@property (nonatomic, strong) NSArray *appStoreModelArray; @property (nonatomic, strong) NSArray *appStoreModelArray;
@property (nonatomic, readonly) NSDictionary *appStoreRechargeModelDict; @property (nonatomic, readonly) NSDictionary *appStoreRechargeModelDict;
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
@property (nonatomic, strong) NSArray *expressionModelArray; @property (nonatomic, strong) NSArray *expressionModelArray;
@property (nonatomic, readonly) NSDictionary *expressionModelDict; @property (nonatomic, readonly) NSDictionary *expressionModelDict;
// 座驾数据 // 座驾数据 ludy:这个地方的数据是老版本的,相当于假的,新版本的在FUSGiftDataCenter里取
@property (nonatomic, strong) NSArray *motoringModelArray; @property (nonatomic, strong) NSArray *motoringModelArray;
@property (nonatomic, readonly) NSDictionary *motoringModelDict; @property (nonatomic, readonly) NSDictionary *motoringModelDict;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
} }
return _userVerifyInfo; return _userVerifyInfo;
} }
@synthesize userDetailInfo = _userDetailInfo;
- (FUSUserInfosModel *)userDetailInfo - (FUSUserInfosModel *)userDetailInfo
{ {
if (!_userDetailInfo) { if (!_userDetailInfo) {
...@@ -82,6 +82,10 @@ ...@@ -82,6 +82,10 @@
} }
return _userDetailInfo; return _userDetailInfo;
} }
- (void)setUserDetailInfo:(FUSUserInfosModel *)userDetailInfo{
_userDetailInfo = userDetailInfo;
[FUSSwiftCacheDataShare share].oc_userInfo = userDetailInfo;
}
- (NSMutableDictionary *)zoneInfosDict - (NSMutableDictionary *)zoneInfosDict
{ {
...@@ -138,25 +142,28 @@ ...@@ -138,25 +142,28 @@
return _hotDataMD5Model; return _hotDataMD5Model;
} }
- (void)setRechargeModelArray:(NSArray *)rechargeModelArray //- (void)setRechargeModelArray:(NSArray *)rechargeModelArray
{ //{
_rechargeModelArray = rechargeModelArray; // _rechargeModelArray = rechargeModelArray;
//
NSMutableDictionary *rechargeModelDict = [NSMutableDictionary dictionary]; // NSMutableDictionary *rechargeModelDict = [NSMutableDictionary dictionary];
for (FUSRechargeDataModel *rechargeModel in _rechargeModelArray) { // for (FUSRechargeDataModel *rechargeModel in _rechargeModelArray) {
[rechargeModelDict setObject:rechargeModel forKey:rechargeModel.rid]; // [rechargeModelDict setObject:rechargeModel forKey:rechargeModel.rid];
} // }
_rechargeModelDict = rechargeModelDict; // _rechargeModelDict = rechargeModelDict;
} //}
- (void)setAppStoreModelArray:(NSArray *)appStoreModelArray { - (void)setAppStoreModelArray:(NSArray *)appStoreModelArray {
_appStoreModelArray = appStoreModelArray; _appStoreModelArray = appStoreModelArray;
[FUSSwiftCacheDataShare.share fus_handlerRechargeDataWithDataList:appStoreModelArray];
NSMutableDictionary *rechargeModelDict = [NSMutableDictionary dictionary]; NSMutableDictionary *rechargeModelDict = [NSMutableDictionary dictionary];
for (FUSRechargeDataModel *rechargeModel in _rechargeModelArray) { // for (FUSRechargeDataModel *rechargeModel in _rechargeModelArray) {
for (FUSRechargeDataModel *rechargeModel in _appStoreModelArray) {
[rechargeModelDict setObject:rechargeModel forKey:rechargeModel.rid]; [rechargeModelDict setObject:rechargeModel forKey:rechargeModel.rid];
} }
_appStoreRechargeModelDict = rechargeModelDict; _appStoreRechargeModelDict = rechargeModelDict;
[FUSSwiftCacheDataShare.share fus_handlerRechargeDataModelDictWithDataDict:rechargeModelDict];
} }
- (void)setExpressionModelArray:(NSArray *)expressionModelArray - (void)setExpressionModelArray:(NSArray *)expressionModelArray
......
...@@ -15,6 +15,11 @@ import RxSwift ...@@ -15,6 +15,11 @@ import RxSwift
private let disposeBag = DisposeBag() private let disposeBag = DisposeBag()
// - OC PART // - OC PART
/// 用户信息 OC,这个数据的索引是在FUSCacheDataShare中的,修改数据的时候修改FUSCacheDataShare中的就行了
@objc public var oc_userInfo: FUSUserInfosModel?{
get{ FUSSwiftCacheDataShare.share.userInfo.value }
set{ FUSSwiftCacheDataShare.share.userInfo.accept(oc_userInfo) }
}
/// 用户设置,现在暂时只做了部分属性的跟踪,如定位,其他属性需要做到的时候补全 /// 用户设置,现在暂时只做了部分属性的跟踪,如定位,其他属性需要做到的时候补全
@objc public var oc_settingData:FUSSettingDataModel?{ @objc public var oc_settingData:FUSSettingDataModel?{
get{ FUSSwiftCacheDataShare.share.settingData.value } get{ FUSSwiftCacheDataShare.share.settingData.value }
...@@ -35,8 +40,20 @@ import RxSwift ...@@ -35,8 +40,20 @@ import RxSwift
get{ FUSSwiftCacheDataShare.share.myZoneInfo.value } get{ FUSSwiftCacheDataShare.share.myZoneInfo.value }
set{ FUSSwiftCacheDataShare.share.myZoneInfo.accept(newValue) } set{ FUSSwiftCacheDataShare.share.myZoneInfo.accept(newValue) }
} }
/// 用户首充信息弹窗的资料 OC
@objc public var oc_userFirstChargeAlertInfo: [String: Any] {
get{ FUSSwiftCacheDataShare.share.userFirstChargeAlertInfo.value }
set{ FUSSwiftCacheDataShare.share.userFirstChargeAlertInfo.accept(oc_userFirstChargeAlertInfo) }
}
/// 等级数据 OC
@objc public var oc_levelModelList: [FUSLevelDataModel]?{
get{ FUSSwiftCacheDataShare.share.levelModelList.value }
set{ FUSSwiftCacheDataShare.share.levelModelList.accept(oc_levelModelList) }
}
// - swift PART // - swift PART
/// 用户信息,这个数据的索引是在FUSCacheDataShare中的,修改数据的时候修改FUSCacheDataShare中的就行了
public let userInfo: BehaviorRelay<FUSUserInfosModel?> = .init(value: nil)
/// 用户设置,现在暂时只做了部分属性的跟踪,如定位,其他属性需要做到的时候补全 /// 用户设置,现在暂时只做了部分属性的跟踪,如定位,其他属性需要做到的时候补全
public let settingData: BehaviorRelay<FUSSettingDataModel?> = .init(value: nil) public let settingData: BehaviorRelay<FUSSettingDataModel?> = .init(value: nil)
/// 用户信息未填写提醒 /// 用户信息未填写提醒
...@@ -45,6 +62,14 @@ import RxSwift ...@@ -45,6 +62,14 @@ import RxSwift
public let onetoOneCheckQualification: BehaviorRelay<FUSOnetoOneCheckQualificationModel?> = .init(value: nil) public let onetoOneCheckQualification: BehaviorRelay<FUSOnetoOneCheckQualificationModel?> = .init(value: nil)
/// 记录当前最新的myZoneInfoModel,网络请求的总会覆盖掉缓存的 /// 记录当前最新的myZoneInfoModel,网络请求的总会覆盖掉缓存的
public let myZoneInfo: BehaviorRelay<FUSZoneInfosModel?> = .init(value: nil) public let myZoneInfo: BehaviorRelay<FUSZoneInfosModel?> = .init(value: nil)
/// 储值点数据
public let rechargeData: BehaviorRelay<[FUSPaymentRechargeModel]> = .init(value: [])
/// 储值点数据, 以字典模式,[rid: model]
public let rechargeDataModelDict: BehaviorRelay<[String: FUSRechargeDataModel]> = .init(value: [:])
/// 用户首充信息弹窗的资料
public let userFirstChargeAlertInfo = BehaviorRelay<[String: Any]>(value: [:])
/// 等级数据
public let levelModelList: BehaviorRelay<[FUSLevelDataModel]?> = .init(value: nil)
/// 背包类型的数据 /// 背包类型的数据
public let backpackTypeList: BehaviorRelay<[FUSBackpackTypeModel]?> = .init(value: nil) public let backpackTypeList: BehaviorRelay<[FUSBackpackTypeModel]?> = .init(value: nil)
...@@ -78,6 +103,7 @@ import RxSwift ...@@ -78,6 +103,7 @@ import RxSwift
} }
} }
// - base
public override init() { public override init() {
super.init() super.init()
...@@ -85,7 +111,6 @@ import RxSwift ...@@ -85,7 +111,6 @@ import RxSwift
fus_setupSocket() fus_setupSocket()
} }
// - base
func fus_setupModel() { func fus_setupModel() {
localBackpackUnreadGetTimeDidChange.accept(localBackpackUnreadGetTime) localBackpackUnreadGetTimeDidChange.accept(localBackpackUnreadGetTime)
...@@ -159,6 +184,23 @@ import RxSwift ...@@ -159,6 +184,23 @@ import RxSwift
} }
} }
/// 获取更新储值点数据 ,其实是从oc那边获取的,索引出给oc倒入数据的接口
@objc public func fus_handlerRechargeData(dataList: [Any]){
guard let dataList = dataList as? [FUSPaymentRechargeModel] else { return }
self.rechargeData.accept(dataList)
}
/// 获取更新储值点数据 ,其实是从oc那边获取的,索引出给oc倒入数据的接口
@objc public func fus_handlerRechargeDataModelDict(dataDict: [String: Any]){
guard let dataDict = dataDict as? [String: FUSRechargeDataModel] else { return }
self.rechargeDataModelDict.accept(dataDict)
}
/// 根据等级取出level的模型
@objc public func fus_levelModel(level: Int) -> FUSLevelDataModel? {
if let index = self.levelModelList.value?.firstIndex(where: { $0.level.intValue == level }) {
return self.levelModelList.value?[index]
}
return nil
}
} }
/// 通知cid /// 通知cid
class FUSSwiftCacheDataSocketCID: NSObject { class FUSSwiftCacheDataSocketCID: NSObject {
......
...@@ -24,6 +24,8 @@ extern NSString * const HOT_EXPRESSION_DICT_ARRAY; ...@@ -24,6 +24,8 @@ extern NSString * const HOT_EXPRESSION_DICT_ARRAY;
extern NSString * const HOT_MOTORING_DICT_ARRAY; extern NSString * const HOT_MOTORING_DICT_ARRAY;
// 热横幅广告数据数组 // 热横幅广告数据数组
extern NSString * const HOT_BANNER_DICT_ARRAY; extern NSString * const HOT_BANNER_DICT_ARRAY;
/// 等级数据模型
extern NSString * const LEVEL_DATA_MODEL_ARRAY;
// 直播主题配置缓存 // 直播主题配置缓存
extern NSString * const Live_Start_Config_Cache; extern NSString * const Live_Start_Config_Cache;
......
...@@ -26,6 +26,8 @@ NSString * const HOT_EXPRESSION_DICT_ARRAY = @"HotExpressionDictArray"; ...@@ -26,6 +26,8 @@ NSString * const HOT_EXPRESSION_DICT_ARRAY = @"HotExpressionDictArray";
NSString * const HOT_MOTORING_DICT_ARRAY = @"HotMotoringDictArray"; NSString * const HOT_MOTORING_DICT_ARRAY = @"HotMotoringDictArray";
// 热横幅广告数据数组 // 热横幅广告数据数组
NSString * const HOT_BANNER_DICT_ARRAY = @"HotBannerDictArray"; NSString * const HOT_BANNER_DICT_ARRAY = @"HotBannerDictArray";
/// 等级数据模型
NSString * const LEVEL_DATA_MODEL_ARRAY = @"LevelDataModelArray";
// 直播主题配置缓存 // 直播主题配置缓存
NSString * const Live_Start_Config_Cache = @"Live_Start_Config_Cache"; NSString * const Live_Start_Config_Cache = @"Live_Start_Config_Cache";
......
...@@ -166,6 +166,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -166,6 +166,9 @@ NS_ASSUME_NONNULL_BEGIN
//更新储值点 //更新储值点
+ (NSString *)fus_URL_PAYMENT_RECHARGE_INFO; + (NSString *)fus_URL_PAYMENT_RECHARGE_INFO;
/// 请求富豪等级数据
+ (NSString *)fus_URL_requestLevelData;
// 同步充值点首充信息 // 同步充值点首充信息
+ (NSString *)fus_URL_RECHARGE_QUERY_ELEMENT; + (NSString *)fus_URL_RECHARGE_QUERY_ELEMENT;
......
...@@ -140,6 +140,10 @@ ...@@ -140,6 +140,10 @@
+ (NSString *)fus_URL_UPDATE_BANNER { + (NSString *)fus_URL_UPDATE_BANNER {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/setting/banner.html"]; return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/setting/banner.html"];
} }
/// 请求富豪等级数据
+ (NSString *)fus_URL_requestLevelData{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/setting/updateuserlevel.html"];
}
/// 获取开播主题配置 /// 获取开播主题配置
+ (NSString *)fus_URL_Start_Live_Config { + (NSString *)fus_URL_Start_Live_Config {
......
...@@ -65,6 +65,8 @@ orderid = 11111; ...@@ -65,6 +65,8 @@ orderid = 11111;
@property (nonatomic, copy) NSString *sale; // 是否推荐 @property (nonatomic, copy) NSString *sale; // 是否推荐
@property (nonatomic, copy) NSString *appname; @property (nonatomic, copy) NSString *appname;
@property (nonatomic, copy) NSString *worth; @property (nonatomic, copy) NSString *worth;
/// 各地区对应价格数据
@property (nonatomic, copy) NSArray<FUSPaymentPriceModel *> *price;
@property (nonatomic,strong) FUSPaymentPriceModel *priceModel; @property (nonatomic,strong) FUSPaymentPriceModel *priceModel;
......
...@@ -10,4 +10,11 @@ ...@@ -10,4 +10,11 @@
@implementation FUSPaymentRechargeModel @implementation FUSPaymentRechargeModel
//嵌套的 model
+ (NSDictionary *)modelContainerPropertyGenericClass {
// return @{@“children”:[CustomModel class]};
return @{@"price": [FUSPaymentPriceModel class]};
}
@end @end
...@@ -124,6 +124,17 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -124,6 +124,17 @@ NS_ASSUME_NONNULL_BEGIN
// 沙盒-账号相关-用户首次开播弹出协议提示 // 沙盒-账号相关-用户首次开播弹出协议提示
+ (NSString *)fus_UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL; + (NSString *)fus_UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL;
/// 用户协议,开播部分
+ (NSString *)fus_liveAgreementConfirmLiveStart;
/// 用户协议,游戏房部分
+ (NSString *)fus_liveAgreementConfirmGamePlay;
/// 用户协议,发帖文部分
+ (NSString *)fus_liveAgreementConfirmPost;
/// 用户协议,暴奖部分
+ (NSString *)fus_liveAgreementConfirmBurstAward;
/// 用户协议,提现部分
+ (NSString *)fus_liveAgreementConfirmWithDraw;
@end @end
...@@ -232,6 +243,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -232,6 +243,9 @@ NS_ASSUME_NONNULL_BEGIN
// 连麦移除自己 // 连麦移除自己
+ (NSString *)fus_FUS_LINKMIC_DELE_SELF; + (NSString *)fus_FUS_LINKMIC_DELE_SELF;
/// 自己送礼的通知
+(NSString *)fus_liveRoomSendGiftByMyself;
// 开始大礼物特效 // 开始大礼物特效
+ (NSString *)fus_FUS_LIVE_START_WHOLE_GIFTEFFECT_NOTIFICAT; + (NSString *)fus_FUS_LIVE_START_WHOLE_GIFTEFFECT_NOTIFICAT;
......
...@@ -199,6 +199,27 @@ ...@@ -199,6 +199,27 @@
return @"UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL"; return @"UDKEY_ACCOUNT_FIRST_STAR_LIVE_SHOW_PROTOCOL";
} }
/// 用户协议,开播部分
+ (NSString *)fus_liveAgreementConfirmLiveStart{
return @"liveAgreementConfirmLiveStart";
}
/// 用户协议,游戏房部分
+ (NSString *)fus_liveAgreementConfirmGamePlay{
return @"liveAgreementConfirmGamePlay";
}
/// 用户协议,发帖文部分
+ (NSString *)fus_liveAgreementConfirmPost{
return @"liveAgreementConfirmPost";
}
/// 用户协议,暴奖部分
+ (NSString *)fus_liveAgreementConfirmBurstAward{
return @"liveAgreementConfirmBurstAward";
}
/// 用户协议,提现部分
+ (NSString *)fus_liveAgreementConfirmWithDraw{
return @"liveAgreementConfirmWithDraw";
}
@end @end
...@@ -375,6 +396,10 @@ ...@@ -375,6 +396,10 @@
return @"FUS_LINKMIC_DELE_SELF"; return @"FUS_LINKMIC_DELE_SELF";
} }
/// 自己送礼的通知
+(NSString *)fus_liveRoomSendGiftByMyself{
return @"notificationSendGiftByMyself";
}
// 开始大礼物特效 // 开始大礼物特效
+ (NSString *)fus_FUS_LIVE_START_WHOLE_GIFTEFFECT_NOTIFICAT { + (NSString *)fus_FUS_LIVE_START_WHOLE_GIFTEFFECT_NOTIFICAT {
......
...@@ -111,4 +111,20 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -111,4 +111,20 @@ NS_ASSUME_NONNULL_BEGIN
@end @end
/// 直播间礼物面板的分页类型,区分打开背包后默认跳转到哪一个分页
typedef SWIFT_ENUM(NSInteger, FUSLiveGiftPageType, closed) {
/// 无选项
FUSLiveGiftPageTypeNone = -1,
/// 背包所有,根据id在哪个分页就跳哪个分页
FUSLiveGiftPageTypeBackPackAll = 0,
/// 背包礼物
FUSLiveGiftPageTypeBackPackGift = 1,
/// 背包道具
FUSLiveGiftPageTypeBackPackProps = 2,
/// 背包座驾
FUSLiveGiftPageTypeBackPackCar = 3,
/// 背包周边
FUSLiveGiftPageTypeBackPackEdgs = 4,
};
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
//
// FUSBackpackDataViewModelType.swift
// AFNetworking
//
// Created by aaa on 2024/12/20.
//
import UIKit
@objc public protocol FUSBackpackDataViewModelType {
/// 背包类型
@objc var oc_backpackTypeList: [FUSBackpackTypeModel]? { get }
@objc var oc_propsList: [FUSBackpackPropsModel] { get }
@objc var oc_giftList: [FUSBackpackGiftModel] { get }
@objc var oc_motorList: [FUSBackpackMotorModel] { get }
@objc var oc_edgeList: [FUSBackpackPropsModel] { get }
@objc var oc_backpackUnreadGetTime: FUSBackpackUnreadGetTimeModel { get }
@objc var oc_backpackAllUnreadBadgeShow: Bool { get }
@objc var backpackTypeListDidChanged:(([FUSBackpackTypeModel]?)->Void)? { get set }
@objc var propsListDidChanged:(([FUSBackpackPropsModel])->Void)? { get set }
@objc var giftListDidChanged:(([FUSBackpackGiftModel])->Void)? { get set }
@objc var motorListDidChanged:(([FUSBackpackMotorModel])->Void)? { get set }
@objc var edgeListDidChanged:(([FUSBackpackPropsModel])->Void)? { get set }
@objc var backpackUnreadGetTimeDidChanged:((FUSBackpackUnreadGetTimeModel)->Void)? { get set }
@objc var backpackAllUnreadBadgeShowDidChange:((Bool)->Void)? { get set }
@objc var propsListRequesetComplete: Bool { get }
@objc var giftListRequesetComplete: Bool { get }
@objc var motorListRequesetComplete: Bool { get }
@objc var edgeListRequesetComplete: Bool { get }
@objc func fus_requestGiftList(success: (() -> Void)?,
failure: ((String,Int) -> Void)?) -> Void
@objc func fus_requestPropsList(success: (() -> Void)?,
failure: ((String,Int) -> Void)?) -> Void
@objc func fus_requestMotorList(success: (() -> Void)?,
failure: ((String,Int) -> Void)?) -> Void
@objc func fus_requestEdgeList(success: (() -> Void)?,
failure: ((String,Int) -> Void)?) -> Void
@objc func fus_selectedMotor(_ motor:FUSBackpackMotorModel) -> Void
@objc func fus_selectedUseProps(_ props:FUSBackpackPropsModel, success:(([String:Any])->Void)?) -> Void
@objc func fus_handleJumpToUseProps(_ props:FUSBackpackPropsModel, success:(([String:Any])->Void)?) -> Void
}
...@@ -157,6 +157,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -157,6 +157,9 @@ NS_ASSUME_NONNULL_BEGIN
// 粉丝未读数 // 粉丝未读数
+ (NSString *)fus_FANS_UNREAD_COUNT; + (NSString *)fus_FANS_UNREAD_COUNT;
/// 开通VIP通知
+ (NSString *)fus_userVipOpened;
// 动态的数据改变通知 // 动态的数据改变通知
+ (NSString *)fus_FUS_NEWS_FEED_DATA_DID_CHANGED_NOTIFICATION; + (NSString *)fus_FUS_NEWS_FEED_DATA_DID_CHANGED_NOTIFICATION;
......
...@@ -252,6 +252,10 @@ ...@@ -252,6 +252,10 @@
+ (NSString *)fus_FANS_UNREAD_COUNT { + (NSString *)fus_FANS_UNREAD_COUNT {
return @"fansUnreaderCount"; return @"fansUnreaderCount";
} }
/// 开通VIP通知
+ (NSString *)fus_userVipOpened{
return @"userVipOpenned";
}
// 动态的数据改变通知 // 动态的数据改变通知
+ (NSString *)fus_FUS_NEWS_FEED_DATA_DID_CHANGED_NOTIFICATION { + (NSString *)fus_FUS_NEWS_FEED_DATA_DID_CHANGED_NOTIFICATION {
......
...@@ -195,6 +195,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -195,6 +195,8 @@ NS_ASSUME_NONNULL_BEGIN
icon:(NSString *)icon icon:(NSString *)icon
amount:(NSInteger)amount; amount:(NSInteger)amount;
/// 返回的是服从FUSBackpackDataViewModelType的viewmodel
-(id)fus_backpackDataViewModel;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -10,11 +10,17 @@ ...@@ -10,11 +10,17 @@
#define FUSEnumSet_h #define FUSEnumSet_h
// 读取缓存数据顺序 // 读取缓存数据顺序
typedef enum : NSUInteger { //typedef enum : NSUInteger {
// ReadMemoryBegin = 1, // 从内存开始: 内存 -> 数据库 -> 服务器
// ReadDatabaseBegin = 2, // 从数据库开始: 数据库 -> 服务器
// ReadServerBegin = 3, // 从服务器开始: 服务器
//} ReadCacheOrder;
typedef NS_ENUM(NSUInteger, ReadCacheOrder) {
ReadMemoryBegin = 1, // 从内存开始: 内存 -> 数据库 -> 服务器 ReadMemoryBegin = 1, // 从内存开始: 内存 -> 数据库 -> 服务器
ReadDatabaseBegin = 2, // 从数据库开始: 数据库 -> 服务器 ReadDatabaseBegin = 2, // 从数据库开始: 数据库 -> 服务器
ReadServerBegin = 3, // 从服务器开始: 服务器 ReadServerBegin = 3, // 从服务器开始: 服务器
} ReadCacheOrder; };
/// 读取方式 /// 读取方式
typedef NS_ENUM(NSUInteger, ReadCacheFromType) { typedef NS_ENUM(NSUInteger, ReadCacheFromType) {
......
...@@ -94,6 +94,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -94,6 +94,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 反选圈 /// 反选圈
+ (UIImage *)fus_unSelectedIcon; + (UIImage *)fus_unSelectedIcon;
/// 富豪等级图标
+ (nullable UIImage *)fus_richIconWithLevel:(NSInteger)level;
/// 直播间点亮泡泡特殊类型,现在好像是同一个 /// 直播间点亮泡泡特殊类型,现在好像是同一个
+ (NSArray<UIImage *> *)fus_bubbles_special; + (NSArray<UIImage *> *)fus_bubbles_special;
......
...@@ -165,6 +165,11 @@ ...@@ -165,6 +165,11 @@
} }
} }
/// 富豪等级图标
+ (nullable UIImage *)fus_richIconWithLevel:(NSInteger)level{
return [self fus_ImageNamed:[NSString stringWithFormat:@"rich_icon_level_%ld",level]];
}
/// 帮助图标 /// 帮助图标
+ (UIImage *)fus_helpIcon { + (UIImage *)fus_helpIcon {
UIImage *image = [self fus_ImageNamed:@"common_help_icon"]; UIImage *image = [self fus_ImageNamed:@"common_help_icon"];
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key> <key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>72</integer> <integer>75</integer>
</dict> </dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key> <key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>76</integer> <integer>74</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -512,7 +512,7 @@ extension FUSChatCallView { ...@@ -512,7 +512,7 @@ extension FUSChatCallView {
if isGiftUpdating == true { return } if isGiftUpdating == true { return }
isGiftUpdating = true isGiftUpdating = true
self.giftView?.fus_requestGiftData(withType: .init(rawValue: 3), success: {[weak self] in self.giftView?.fus_requestGiftData(withType: .serverBegin, success: {[weak self] in
guard let self = self else { return } guard let self = self else { return }
self.isGiftUpdating = false self.isGiftUpdating = false
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key> <key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>74</integer> <integer>72</integer>
</dict> </dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key> <key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>75</integer> <integer>73</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_chat_gift_num_select_down@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_chat_gift_num_select_up@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "live_chat_gift_send_bg_cn.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_chat_gift_send_bg_cn@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_chat_gift_send_bg_cn@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment