Commit d3e11333 by ludi

Merge branch 'feature/修复bug和Tiktok' into feature/7850订阅功能

# Conflicts:
#	DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Chinese.strings
#	DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Chinese_Traditional.strings
#	DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_English.strings
#	DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Japanese.strings
#	DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_Thai.strings
#	DevelopmentPods/FUSFoundation/FUSFoundation/Assets/LocalizationString/Fusi_vietnamese.strings
parents 23665cd1 5e3d79f8
Showing with 314 additions and 97 deletions
......@@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL showMyLiveSwitch;
@property (nonatomic, assign) BOOL showPay;
@property (nonatomic, assign) BOOL showTaskSystem;
@property (nonatomic, assign) BOOL showWithdraw;
@property (nonatomic, assign) BOOL showRedeem;
@property (nonatomic, assign) BOOL statswitch;
@property (nonatomic, strong) NSString *tips;
@property (nonatomic, assign) NSInteger unicastDefaultType;
......
......@@ -78,12 +78,12 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
/// App Version
- (NSString *)appVersion {
return @"7850";
return @"7836";
}
/// App Dot Version
- (NSString *)appDotVersion {
return @"7.8.5.0";
return @"7.8.3.6";
}
/// App Id
......@@ -156,12 +156,12 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
/// TikTok 应用事件 SDK 的 TikTok App ID
- (NSString *)tikTokBusinessAppId {
return @"7639294434219130896";
return @"7647442763411111943";
}
/// TikTok 应用事件 SDK 的密钥
- (NSString *)tikTokBusinessAccessToken {
return @"f1ca59121d93098d2970b2f3b62cd06fca70dfae";
return @"TTAGdcOSYo9mkgWwLkHRZS7aqZ0xuAGd";
}
/// 声网的 key
......
......@@ -15,7 +15,7 @@ typedef NS_ENUM(NSUInteger,FUSJumpType) {
FUSJOpenH5Link = 3, // 网页调起客户端打开新的网页
FUSJMy = 10, // 我的
FUSJPersonalInfo = 11, // 个人信息
FUSJFiresWithDraw = 12, // 萤火提现
FUSJFiresRedeem = 12, // 萤火提现
FUSJVipCenter = 13, // VIP中心
FUSJInviteAward = 14, // 邀请有奖
FUSJExchangeDew = 15, // 兑换露水
......
......@@ -1167,14 +1167,14 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG
[FUSRouter.userRouter fus_enterUserZone:[FUSCacheDataShare shareStore].userDetailInfo.uid];
}
break;
case FUSJFiresWithDraw:
case FUSJFiresRedeem:
{
if (FUSConfig.sharedInstanced.devConfigs.appStatus){
// sh不跳
return;
}
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.withdrawAddress;
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.redeemAddress;
[[UIViewController fus_topViewController].navigationController pushViewController:vc animated:YES];
}
break;
......
......@@ -133,7 +133,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 用户协议,暴奖部分
+ (NSString *)fus_liveAgreementConfirmBurstAward;
/// 用户协议,提现部分
+ (NSString *)fus_liveAgreementConfirmWithDraw;
+ (NSString *)fus_liveAgreementConfirmRedeem;
/// 选中的开播质量
+ (NSString *)fus_livePushQualityBid;
......
......@@ -216,8 +216,8 @@
return @"liveAgreementConfirmBurstAward";
}
/// 用户协议,提现部分
+ (NSString *)fus_liveAgreementConfirmWithDraw{
return @"liveAgreementConfirmWithDraw";
+ (NSString *)fus_liveAgreementConfirmRedeem{
return @"liveAgreementConfirmRedeem";
}
/// 选中的开播质量
......
......@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 平台活动地址
@property (nonatomic, copy) NSString *activitiesAddress;
/// 提现H5地址
@property (nonatomic, copy) NSString *withdrawAddress;
@property (nonatomic, copy) NSString *redeemAddress;
/// 宝石记录H5地址
@property (nonatomic, copy) NSString *gemTradeAddress;
/// 露水记录H5地址
......
......@@ -1735,7 +1735,7 @@ static NSString *fus_subscribeDisplayText(NSString *text) {
break;
case FUSSystemNoticeTypeNoticeAnchorToVideoAuth:
{
defaultNotice = [NSString stringWithFormat:@"%@_#{%@}#_",[NSString fus_localString:@"还未进行认证,认证后,私信/声讯/视讯分润可翻倍哦,"],[NSString fus_localString:@"去认证>"]];
defaultNotice = [NSString stringWithFormat:@"%@_#{%@}#_",[NSString fus_versionLocalString:@"完善個人資料,回復私信獲得更高分成,"],[NSString fus_versionLocalString:@"去完善 >"]];
}
break;
case FUSSystemNoticeTypeNoticeRemindCloseStrangerBottle:
......
......@@ -1163,6 +1163,7 @@
3E4DC89A2F580A46003070EC /* live_link_mic_boy_speak_anim.webp in Resources */ = {isa = PBXBuildFile; fileRef = 3E4DC8982F580A46003070EC /* live_link_mic_boy_speak_anim.webp */; };
3E4DC89B2F580A46003070EC /* live_link_mic_girl_speak_anim.webp in Resources */ = {isa = PBXBuildFile; fileRef = 3E4DC8992F580A46003070EC /* live_link_mic_girl_speak_anim.webp */; };
3E50054E2F556DC300058145 /* FUSLiveRTCData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E50054D2F556DC300058145 /* FUSLiveRTCData.swift */; };
3E84E8622FD9103200815647 /* TTSDKLisenceFile in Resources */ = {isa = PBXBuildFile; fileRef = 3E84E8612FD9103200815647 /* TTSDKLisenceFile */; };
3ED4D5C42F7BB15D00C17B8E /* fus_home_navi_startLive2_animate.webp in Resources */ = {isa = PBXBuildFile; fileRef = 3ED4D5C32F7BB15D00C17B8E /* fus_home_navi_startLive2_animate.webp */; };
7C2A1F1A3A1D4D2C9A0B1C2D /* FUSPayRoomCompanionDataModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C2A1F0B3A1D4D2C9A0B1C2D /* FUSPayRoomCompanionDataModel.h */; };
7C2A1F1B3A1D4D2C9A0B1C2D /* FUSPayRoomCompanionDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C2A1F0C3A1D4D2C9A0B1C2D /* FUSPayRoomCompanionDataModel.m */; };
......@@ -1817,7 +1818,6 @@
BED65C702C60C5D400668116 /* FUSShowRoomCenterBunble.m in Sources */ = {isa = PBXBuildFile; fileRef = BED65C6D2C60C5D400668116 /* FUSShowRoomCenterBunble.m */; };
BED65C722C60C61C00668116 /* FUSShowRoomAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BED65C712C60C61C00668116 /* FUSShowRoomAssets.xcassets */; };
BED65CFF2C62148700668116 /* TTSDKLisenceFileForTest in Resources */ = {isa = PBXBuildFile; fileRef = BED65CFD2C62148700668116 /* TTSDKLisenceFileForTest */; };
BED65D002C62148700668116 /* TTSDKLisenceFile in Resources */ = {isa = PBXBuildFile; fileRef = BED65CFE2C62148700668116 /* TTSDKLisenceFile */; };
BEEAB2532D3380FA008CD059 /* FusAnchorRewardView.h in Headers */ = {isa = PBXBuildFile; fileRef = BEEAB2512D3380FA008CD059 /* FusAnchorRewardView.h */; };
BEEAB2542D3380FA008CD059 /* FusAnchorRewardView.m in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB2522D3380FA008CD059 /* FusAnchorRewardView.m */; };
BEEAB2632D34CC60008CD059 /* FUSLiveStartSetPrivacyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEEAB2612D34CC60008CD059 /* FUSLiveStartSetPrivacyView.swift */; };
......@@ -3576,6 +3576,7 @@
3E4DC8982F580A46003070EC /* live_link_mic_boy_speak_anim.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_link_mic_boy_speak_anim.webp; sourceTree = "<group>"; };
3E4DC8992F580A46003070EC /* live_link_mic_girl_speak_anim.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_link_mic_girl_speak_anim.webp; sourceTree = "<group>"; };
3E50054D2F556DC300058145 /* FUSLiveRTCData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveRTCData.swift; sourceTree = "<group>"; };
3E84E8612FD9103200815647 /* TTSDKLisenceFile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TTSDKLisenceFile; sourceTree = "<group>"; };
3ED4D5C32F7BB15D00C17B8E /* fus_home_navi_startLive2_animate.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = fus_home_navi_startLive2_animate.webp; sourceTree = "<group>"; };
549D669035746701FD4C7ADC /* FUSLiveGiftInteractOptionModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = FUSLiveGiftInteractOptionModel.m; sourceTree = "<group>"; };
7C2A1F0B3A1D4D2C9A0B1C2D /* FUSPayRoomCompanionDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSPayRoomCompanionDataModel.h; sourceTree = "<group>"; };
......@@ -4238,7 +4239,6 @@
BED65C6D2C60C5D400668116 /* FUSShowRoomCenterBunble.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUSShowRoomCenterBunble.m; sourceTree = "<group>"; };
BED65C712C60C61C00668116 /* FUSShowRoomAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = FUSShowRoomAssets.xcassets; sourceTree = "<group>"; };
BED65CFD2C62148700668116 /* TTSDKLisenceFileForTest */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TTSDKLisenceFileForTest; sourceTree = "<group>"; };
BED65CFE2C62148700668116 /* TTSDKLisenceFile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TTSDKLisenceFile; sourceTree = "<group>"; };
BEEAB2512D3380FA008CD059 /* FusAnchorRewardView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FusAnchorRewardView.h; sourceTree = "<group>"; };
BEEAB2522D3380FA008CD059 /* FusAnchorRewardView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FusAnchorRewardView.m; sourceTree = "<group>"; };
BEEAB2552D34CC60008CD059 /* FUSLiveStartBeautyFavoritesEditView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSLiveStartBeautyFavoritesEditView.swift; sourceTree = "<group>"; };
......@@ -6699,8 +6699,8 @@
isa = PBXGroup;
children = (
BEF675F02C6B156500A670FB /* Resources */,
BED65CFE2C62148700668116 /* TTSDKLisenceFile */,
BE4096BE2C7C37EF00CE2FE8 /* Info.plist */,
3E84E8612FD9103200815647 /* TTSDKLisenceFile */,
BED65CFD2C62148700668116 /* TTSDKLisenceFileForTest */,
BED65C712C60C61C00668116 /* FUSShowRoomAssets.xcassets */,
);
......@@ -10139,7 +10139,6 @@
BEF6774E2C6B156600A670FB /* PK_Win_Animation_01@2x.png in Resources */,
BEF675FD2C6B156500A670FB /* 1_First_Kill_Animation_13@3x.png in Resources */,
BEF677382C6B156600A670FB /* PK_Start_Animation_5@2x.png in Resources */,
BED65D002C62148700668116 /* TTSDKLisenceFile in Resources */,
BEF6774A2C6B156600A670FB /* PK_Start_Animation_23@2x.png in Resources */,
BEF676672C6B156500A670FB /* live_bullet_fluorescence_anim_14@2x.png in Resources */,
BEF6764E2C6B156500A670FB /* common_broadcast_purple_type_bg_6@2x.png in Resources */,
......@@ -10193,6 +10192,7 @@
BEF677DE2C6B156600A670FB /* live_head_follow_btn_anim_5@2x.png in Resources */,
BEF677632C6B156600A670FB /* PK_Win_Animation_22@2x.png in Resources */,
BEF677FC2C6B156600A670FB /* live_minimize_anim_14@2x.png in Resources */,
3E84E8622FD9103200815647 /* TTSDKLisenceFile in Resources */,
BEF677462C6B156600A670FB /* PK_Start_Animation_19@2x.png in Resources */,
BEF677672C6B156600A670FB /* PK_Win_Animation_26@2x.png in Resources */,
BEF677642C6B156600A670FB /* PK_Win_Animation_23@2x.png in Resources */,
......@@ -10811,10 +10811,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FUSShowRoomModule/Pods-FUSShowRoomModule-resources.sh\"\n";
{
"Signature": "uEdniqEXaqUfQl+3lCZxyGgsKmWZTSJIQe11EvcgYLvdFW3ICs7uwWJ4IdWM7X8aIxJwbZZ+PZnXQ394zw7FVgK1HAuDvJsjOlA677WYbWW5h/p40HBTJ4fxEo0SJsYdzsnBYVmzq4t6jRv9FyTEu5gTrGwyQgC49EqFrp14m5L0zR+1B8OVMlKY0Diq7z6xt3NjZrUQz/yFAC0DNvtQWNQ72i8AvfOyRcznx3h/jqiatQK2EnwVg/XGPOo1e9jVYVzoaheH94kLHq483WstMPMFFwRokrzcFTdG30Bzv0Z1rv+i0bqC+NVK7jQTe8ylPNMtSuNf/9YIy90VLwHNoQ==",
"Content": "eyJJZCI6Ijk4MDMwMjMzOCIsICJWZXJzaW9uIjoyLCAiQ2hhbm5lbCI6ImxpdmUiLCAiVHlwZSI6MiwgIkJ1bmRsZUlkIjoiY29tLmZ1c2kubWVldC5saXZlLmNoYXQudmlkZW8uYW1vbmcuZnJpZW5kcyIsICJNb2R1bGVzIjpbeyJOYW1lIjoibGl2ZV9wdXNoIiwgIkVkaXRpb24iOiJwcmVtaXVtX2VkaXRpb24iLCAiU3RhcnRUaW1lIjoxNzI0NDAzMDg2MjI2LCAiRXhwaXJlVGltZSI6MTc1NTkzOTA4NjIyNiwgIkV4cGlyZUJ1ZmZlciI6MTU1NTIwMDAwMDB9LCB7Ik5hbWUiOiJsaXZlX3B1bGwiLCAiRWRpdGlvbiI6InByZW1pdW1fZWRpdGlvbiIsICJTdGFydFRpbWUiOjE3MjQ0MDMwODYyMjYsICJFeHBpcmVUaW1lIjoxNzU1OTM5MDg2MjI2LCAiRXhwaXJlQnVmZmVyIjoxNTU1MjAwMDAwMH1dLCAiRmlsZVZlcnNpb24iOiIxNzI0NDAzMDg2MjM5Mjg5NTc1In0=",
"MainURL": "https://vod-license-m.volccdn.com/vod-license/l-980302338-ch-live-a-642006.lic?lk3s=0d9f7a7d&x-expires=4878003086&x-signature=OuyhczqZaNon1D4P7Xd9Wp7FuiA%3D",
"BackupURL": "https://vod-license-b.volccdn.com/vod-license/l-980302338-ch-live-a-642006.lic?lk3s=0d9f7a7d&x-expires=4878003086&x-signature=As%2FM9U1MevQNKT%2B%2F3%2B9Lxz87YSw%3D",
"Id": "980302338"
}
"Signature": "CwmrbzrrtSXlnT8WVJkjC3/Di3YZWBlcpvQSHjMR43BsE9BsM3zRFBCs/p7vN2lE0yr+tzs8OeicMcnHOdTxQTVXc9FBKx/bxSiOC8G/Itw0+spQmOXVYq0TcQtHmakdMw1coS3ZlyY5VSkBJSlfPPLZ1ROGf1BjY6B6rsyiY9k67FTvzMmX6kseJrFIJL97uPrf0/CdPIuPLjyO3u7rKcL6VOXx1jzAAAUQotLKgZaS9Yiadu4gfy4tnaas6mD1PnT5PYM9lGQTuRkAM5GNvndq9RK4GODu2Q0eSHLAlaGnF1VN0bQHbQzK3qhwiZajjhnbpcGv3wSKG3/ftd1LqA==",
"Content": "eyJJZCI6IjMyNDAxNDQzODYiLCJWZXJzaW9uIjoyLCJDaGFubmVsIjoidm9kIiwiVHlwZSI6MiwiQnVuZGxlSWQiOiJjb20uZnVzaS5tZWV0LmxpdmUuY2hhdC52aWRlby5hbW9uZy5mcmllbmRzIiwiTW9kdWxlcyI6W3siTmFtZSI6InZvZF9wbGF5IiwiRWRpdGlvbiI6InN0YW5kYXJkX2VkaXRpb24iLCJTdGFydFRpbWUiOjE3ODEwNjEzNzgwODgsIkV4cGlyZVRpbWUiOjE4MTI1OTczNzgwODgsIkV4cGlyZUJ1ZmZlciI6MTU1NTIwMDAwMDB9XSwiRmlsZVZlcnNpb24iOiIxNzgxMDYxNTg4NTUyNTIwMzY5In0=",
"MainURL": "https://vod-license-m.volccdn.com/vod-license/l-3240144386-ch-vod-a-642642.lic?lk3s=0d9f7a7d&x-expires=4934661588&x-signature=XdmGcmW9k4uENmCJqVN8sP5n8%2Bg%3D",
"BackupURL": "https://vod-license-b.volccdn.com/vod-license/l-3240144386-ch-vod-a-642642.lic?lk3s=0d9f7a7d&x-expires=4934661588&x-signature=iK3jUKi9UiZoAPQZAeKTC5trH5Q%3D",
"Id": "3240144386"
}
\ No newline at end of file
......@@ -19,8 +19,8 @@ typedef NS_ENUM(NSUInteger,JumpType) {
JTOpenH5Link = 3, // H5链接
JTMy = 10, // 我的
JTPersonalInfo = 11, // 个人信息
JTFiresWithDraw = 12, // 萤火提现
JTVipCenter = 13, // VIP中心
JTFiresRedeem = 12, // 萤火提现
JTVipCenter = 13, // VIP中心
JTInviteAward = 14, // 邀请有奖
JTExchangeDew = 15, // 兑换露水
JTRechargeGem = 16, // 宝石储值
......@@ -69,14 +69,14 @@ typedef NS_ENUM(NSUInteger,JumpType) {
[FUSRouter.userRouter fus_enterUserZone:[FUSCacheDataShare shareStore].userDetailInfo.uid];
}
break;
case JTFiresWithDraw:
case JTFiresRedeem:
{
if (FUSConfig.sharedInstanced.devConfigs.appStatus){
// sh不跳
return;
}
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.withdrawAddress;
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.redeemAddress;
[currentController.navigationController pushViewController:vc animated:YES];
}
break;
......
......@@ -112,6 +112,9 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
// 截屏分享 View
@property (nonatomic, strong) FUSScreenShotShareView *screenShotView;
/// 记录最近一次因 Socket 恢复触发直播间重连的时间,避免短时间重复请求。
@property (nonatomic, assign) NSTimeInterval lastSocketReconnectRequestTime;
#pragma mark -- pk
// 流状态
@property (nonatomic, assign, readonly) FUSStreamState streamState;
......@@ -338,13 +341,13 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
switch (status) {
case AFNetworkReachabilityStatusUnknown:
{
FUSLogInfo(@"网络状况未知");
FUSLogInfo(@"AFNet网络状况未知");
[weakSelf.pushView fus_stopPush];
}
break;
case AFNetworkReachabilityStatusNotReachable:
{
FUSLogInfo(@"网络无连接");
FUSLogInfo(@"AFNet网络无连接");
[FUSDialogView fus_showDialog:[NSString fus_localString:@"网络异常,请检查网络连接"]];
[weakSelf fus_showLiveLoadingViewWithType:liveLoadingBuffering];
weakSelf.playView.hidden = YES;
......@@ -353,7 +356,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
break;
case AFNetworkReachabilityStatusReachableViaWWAN:
{
FUSLogInfo(@"运营商网络");
FUSLogInfo(@"AFNet运营商网络");
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeNone ||
(!weakSelf.playView && !weakSelf.pushView)) {
......@@ -408,7 +411,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
break;
case AFNetworkReachabilityStatusReachableViaWiFi:
{
FUSLogInfo(@"wifi");
FUSLogInfo(@"AFNet wifi");
if ([FUSLiveHelper shareInstance].liveType == FUSLiveTypeNone ||
(!weakSelf.playView && !weakSelf.pushView)) {
......@@ -1417,6 +1420,8 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(payRoomSwitch:) name:STR(ROOM_CID_PAYROOM_SWITCH) object:nil];
// 包房重连
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(roomReconnected:) name:FUSLiveNotificationKeys.fus_Baofang_Socket_Reconnected object:nil];
// Socket 恢复在线后,补发一次直播间重连接口,兜住后台小窗场景。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(socketStatusChanged:) name:FUSLiveNotificationKeys.fus_SOCKET_STATUS_CHANGE object:nil];
// 5555 回调
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(joinRoomRecieptNotification:) name:STR(ROOM_CONNECT) object:nil];
// 拉流错误
......@@ -1537,6 +1542,30 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
}
}
/// Socket 状态变化后,同步直播间业务重连。
- (void)socketStatusChanged:(NSNotification *)notification {
NSDictionary *statusDict = (NSDictionary *)notification.object;
NSInteger status = [statusDict[@"status"] integerValue];
if (status != SocketOnline) {
return;
}
[self fus_requestReconnectRoomAfterSocketOnlineIfNeeded];
}
/// Socket 重连成功后补发一次直播间重连接口,避免后台小窗恢复网络时漏掉业务重连。
- (void)fus_requestReconnectRoomAfterSocketOnlineIfNeeded {
NSString *roomId = FUSSwiftLiveHelper.shared.roomInfoModel.roomId ?: @"";
if ([NSString isNull:roomId] || FUSSwiftLiveHelper.shared.liveType == FUSLiveTypeNone) {
return;
}
NSTimeInterval currentTime = NSDate.date.timeIntervalSince1970;
if (currentTime - self.lastSocketReconnectRequestTime < 2.0) {
return;
}
self.lastSocketReconnectRequestTime = currentTime;
[FUSSwiftLiveHelper.shared fus_requestReconnectRoomWithNeedResp:YES];
}
// 结束主播
- (void)streamEnded:(NSNotification *)noti {
FUSSocketMessageModel *messageModel = noti.object;
......@@ -1836,6 +1865,7 @@ typedef NS_ENUM(NSInteger, FUSStreamState) {
if (code == 1) {
[self.resentJoinRoomTimer invalidate];
self.resentJoinRoomTimer = nil;
[[FUSLiveHelper shareInstance] fus_startShowTimeBuyVerifyPolling];
}
if (code != 1 &&
......
......@@ -286,6 +286,12 @@ typedef NS_ENUM(NSInteger,FUSLiveRoomScopeType) {
roundId:(NSString *)roundId
tipText:(NSString *)tipText;
/// 进房成功后启动未购票资格校验轮询:首次 30 秒,后续按服务端 nexttimes 调度。
- (void)fus_startShowTimeBuyVerifyPolling;
/// 停止未购票资格校验轮询,退出直播间或命中无权限时调用。
- (void)fus_stopShowTimeBuyVerifyPolling;
// 最小化直播间
+ (void)fus_minimizeLiveCompletion: (void (^ __nullable)(void))completion;
......
......@@ -85,12 +85,21 @@ static NSString *const KLiveDataCenter_store_liveRTCData = @"LiveDataCenter_stor
@property (nonatomic, assign) BOOL isRequestingPayRoomRenewalViewing;
@property (nonatomic, copy) NSString *payRoomRenewalCountdownRoomId;
/// 限时表演未购票资格校验定时器:首次 30 秒,后续按服务端 nexttimes 调度。
@property (nonatomic, strong) dispatch_source_t showTimeBuyVerifyTimer;
/// 当前校验绑定的房间ID,切房后用于拦截旧请求回调。
@property (nonatomic, copy) NSString *showTimeBuyVerifyRoomId;
/// 避免同一时间并发发起多次资格校验请求。
@property (nonatomic, assign) BOOL isRequestingShowTimeBuyVerify;
@end
@implementation FUSLiveHelper
static NSInteger const kFUSPayRoomCompanionPopViewTagRight = 90917001;
static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
static NSInteger const kFUSShowTimeBuyVerifyInitialDelayMs = 30 * 1000;
static NSInteger const kFUSShowTimeBuyVerifyMinimumDelayMs = 1000;
/**
* 获取单例
......@@ -1136,6 +1145,7 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
roundId:(NSString *)roundId
tipText:(NSString *)tipText
{
[self fus_stopShowTimeBuyVerifyPolling];
dispatch_async(dispatch_get_main_queue(), ^{
NSString *currentRoomId = ([NSString isNull:roomId] ? (self.roomInfoModel.roomId ?: @"") : roomId);
NSString *safeChannelId = ([NSString isNull:channelId] ? (self.roomInfoModel.channelId ?: @"") : channelId);
......@@ -1190,6 +1200,116 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
});
}
/// 进房成功后启动未购票资格校验轮询:首轮固定 30 秒,后续完全按服务端 nexttimes 驱动。
- (void)fus_startShowTimeBuyVerifyPolling
{
[self fus_stopShowTimeBuyVerifyPolling];
if (self.liveType != FUSLiveTypeAudience) {
return;
}
NSString *roomId = self.roomInfoModel.roomId ?: @"";
if ([NSString isNull:roomId]) {
return;
}
self.showTimeBuyVerifyRoomId = roomId;
[self fus_scheduleShowTimeBuyVerifyPollingAfterMs:kFUSShowTimeBuyVerifyInitialDelayMs];
}
/// 停止未购票资格校验轮询,退出直播间、切房或被踢时统一调用。
- (void)fus_stopShowTimeBuyVerifyPolling
{
if (self.showTimeBuyVerifyTimer) {
dispatch_source_cancel(self.showTimeBuyVerifyTimer);
self.showTimeBuyVerifyTimer = nil;
}
self.isRequestingShowTimeBuyVerify = NO;
self.showTimeBuyVerifyRoomId = @"";
}
/// 按服务端返回的毫秒数安排下一次校验;-1 表示结束轮询。
- (void)fus_scheduleShowTimeBuyVerifyPollingAfterMs:(NSInteger)delayMs
{
if (delayMs < 0) {
[self fus_stopShowTimeBuyVerifyPolling];
return;
}
NSString *roomId = self.roomInfoModel.roomId ?: @"";
if (self.liveType != FUSLiveTypeAudience || [NSString isNull:roomId]) {
[self fus_stopShowTimeBuyVerifyPolling];
return;
}
if (self.showTimeBuyVerifyTimer) {
dispatch_source_cancel(self.showTimeBuyVerifyTimer);
self.showTimeBuyVerifyTimer = nil;
}
NSInteger finalDelayMs = MAX(kFUSShowTimeBuyVerifyMinimumDelayMs, delayMs);
self.showTimeBuyVerifyRoomId = roomId;
__weak typeof(self) weakSelf = self;
dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_main_queue());
dispatch_source_set_timer(timer, dispatch_time(DISPATCH_TIME_NOW, (int64_t)finalDelayMs * NSEC_PER_MSEC), DISPATCH_TIME_FOREVER, (uint64_t)(0.1 * NSEC_PER_SEC));
dispatch_source_set_event_handler(timer, ^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) {
return;
}
if (strongSelf.showTimeBuyVerifyTimer) {
dispatch_source_cancel(strongSelf.showTimeBuyVerifyTimer);
strongSelf.showTimeBuyVerifyTimer = nil;
}
[strongSelf fus_requestShowTimeBuyVerifyWithRoomId:roomId];
});
self.showTimeBuyVerifyTimer = timer;
dispatch_resume(timer);
}
/// 执行一次未购票资格校验:命中无票时直接复用现有踢去购票入口逻辑。
- (void)fus_requestShowTimeBuyVerifyWithRoomId:(NSString *)roomId
{
if ([NSString isNull:roomId] || self.liveType != FUSLiveTypeAudience) {
[self fus_stopShowTimeBuyVerifyPolling];
return;
}
if (self.isRequestingShowTimeBuyVerify) {
return;
}
self.isRequestingShowTimeBuyVerify = YES;
__weak typeof(self) weakSelf = self;
[FUSLiveHttpHelper fus_ticketShowVerifyBuyHasWithRoomId:roomId succeed:^(NSInteger nextTimes) {
dispatch_async(dispatch_get_main_queue(), ^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) {
return;
}
strongSelf.isRequestingShowTimeBuyVerify = NO;
if (strongSelf.liveType != FUSLiveTypeAudience
|| ![strongSelf.roomInfoModel.roomId isEqualToString:roomId]) {
return;
}
[strongSelf fus_scheduleShowTimeBuyVerifyPollingAfterMs:nextTimes];
});
} failure:^(NSString *msg, NSInteger code, NSInteger nextTimes) {
dispatch_async(dispatch_get_main_queue(), ^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) {
return;
}
strongSelf.isRequestingShowTimeBuyVerify = NO;
if (strongSelf.liveType != FUSLiveTypeAudience
|| ![strongSelf.roomInfoModel.roomId isEqualToString:roomId]) {
return;
}
if (code == -40013) {
[strongSelf fus_handleShowTimeKickToBuyEntryWithRoomId:roomId
channelId:(strongSelf.roomInfoModel.channelId ?: @"")
roundId:(strongSelf.roomInfoModel.roundId ?: @"")
tipText:(msg ?: @"")];
return;
}
[strongSelf fus_scheduleShowTimeBuyVerifyPollingAfterMs:nextTimes];
});
}];
}
- (void)fus_requestTicketShowBuyGetDataAndFillEntry:(FUSLiveShowTimeAudienceEntryMainView *)entry
roomId:(NSString *)roomId
channelId:(NSString *)channelId
......@@ -2012,6 +2132,7 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
}
- (void)fus_quitRoom{
[self fus_stopShowTimeBuyVerifyPolling];
[[FUSLiveHelper shareInstance].liveMinimizeView removeFromSuperview];
[FUSLiveHelper shareInstance].liveMinimizeView = nil;
if ([[FUSLiveHelper shareInstance] liveType] == FUSLiveTypeAnchor) {
......@@ -2433,7 +2554,7 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
[[[[FUSLiveHelper shareInstance] liveVC] playView] fus_playWithUID:roomInfoModel.roomId Url:roomInfoModel.publishUrl];
}
self.autoStartPictureInPicture = [[NSUserDefaults fus_readCurrentUserObjectWithKey:FUSUserUDKeys.fus_UD_KEY_OPEN_ROOM_MINIMIZE] boolValue];
self.autoStartPictureInPicture = [self fus_shouldAutoStartPictureInPicture];
}else{
// 如果是声音连麦房,要销毁播放器
[[[[FUSLiveHelper shareInstance] liveVC] playView] fus_stopWithUID:roomInfoModel.roomId];
......@@ -2790,6 +2911,7 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
*/
- (void)fus_destory {
[self fus_stopPayRoomRenewalCountdown];
[self fus_stopShowTimeBuyVerifyPolling];
[self fus_quitRoom];
self.liveType = FUSLiveTypeNone;
self.roomType = defaultRoom;
......@@ -2937,8 +3059,23 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
}
- (void)setAutoStartPictureInPicture:(BOOL)autoStartPictureInPicture {
[FUSLiveHelper shareInstance].liveVC.autoStartPictureInPicture = autoStartPictureInPicture;
_autoStartPictureInPicture = autoStartPictureInPicture;
// 小窗总开关由后台统一控制,关闭时本地偏好不再生效。
BOOL finalAutoStartPictureInPicture = [self fus_isSmallWindowFeatureEnabled] && autoStartPictureInPicture;
[FUSLiveHelper shareInstance].liveVC.autoStartPictureInPicture = finalAutoStartPictureInPicture;
_autoStartPictureInPicture = finalAutoStartPictureInPicture;
}
/// 是否允许使用小窗能力,优先读取后台总开关。
- (BOOL)fus_isSmallWindowFeatureEnabled {
return [FUSCacheDataShare shareStore].settingInitDataModel.smallWindowSwitch.integerValue == 1;
}
/// 自动小窗最终状态:先看后台总开关,再看用户本地偏好。
- (BOOL)fus_shouldAutoStartPictureInPicture {
if (![self fus_isSmallWindowFeatureEnabled]) {
return NO;
}
return [[NSUserDefaults fus_readCurrentUserObjectWithKey:FUSUserUDKeys.fus_UD_KEY_OPEN_ROOM_MINIMIZE] boolValue];
}
......@@ -2986,6 +3123,7 @@ static NSInteger const kFUSPayRoomCompanionPopViewTagLeft = 90917002;
#pragma mark - Other
- (void)dealloc
{
[self fus_stopShowTimeBuyVerifyPolling];
[self fus_stopPayRoomPreviewCountdown];
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
......
......@@ -1011,6 +1011,16 @@ NS_ASSUME_NONNULL_BEGIN
succeed:(void (^)(FUSTicketShowCollectTicketToggleResultModel *model))succeed
failure:(void (^)(NSString *msg, NSInteger code))failure;
/// Ticket Show - 功能 - 校验观众是否仍有购票观看资格
/// 接口:POST /ticketshow/verify/buy/has
/// 说明:观众端进房后延迟轮询,服务端返回下一次校验时间,-1 表示停止校验
/// @param roomId 房间ID
/// @param succeed 成功回调,返回下一次拉取时间(毫秒)
/// @param failure 失败回调,返回错误信息/错误码/下一次拉取时间(毫秒,-1 表示停止)
+ (void)fus_ticketShowVerifyBuyHasWithRoomId:(NSString *)roomId
succeed:(void (^)(NSInteger nextTimes))succeed
failure:(void (^)(NSString *msg, NSInteger code, NSInteger nextTimes))failure;
/// Ticket Show - 功能 - 观众端购买票
/// 接口:POST /ticketshow/user/buy
/// @param roomId 房间ID
......
......@@ -3311,6 +3311,29 @@
}];
}
+ (void)fus_ticketShowVerifyBuyHasWithRoomId:(NSString *)roomId
succeed:(void (^)(NSInteger nextTimes))succeed
failure:(void (^)(NSString *msg, NSInteger code, NSInteger nextTimes))failure {
NSString *uid = FUSCacheDataShare.shareStore.userDetailInfo.uid;
if ([NSString isNull:uid] || [NSString isNull:roomId]) {
if (failure) failure([NSString fus_localString:@"参数错误"], -3, -1);
return;
}
NSDictionary *params = @{
@"uid": uid,
@"roomId": roomId
};
[FUSHttpHelper postRequestBinaryWithUrl:FUSShowRoomURLs.fus_URL_TicketShow_Verify_Buy_Has params:params success:^(NSDictionary * _Nullable dataDict, int code) {
NSInteger nextTimes = [[dataDict[@"nexttimes"] description] integerValue];
if (succeed) succeed(nextTimes);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
NSInteger nextTimes = [[dataDict[@"nexttimes"] description] integerValue];
if (failure) failure(dataDict[@"msg"], code, nextTimes);
}];
}
+ (void)fus_ticketShowUserBuyWithRoomId:(NSString *)roomId
channelId:(NSString *)channelId
roundId:(NSString *)roundId
......
......@@ -35,7 +35,7 @@
}
+ (BOOL)fus_checkConfirm{
NSString *state = [[NSUserDefaults standardUserDefaults] stringForKey:FUSLiveUDKeys.fus_liveAgreementConfirmWithDraw];
NSString *state = [[NSUserDefaults standardUserDefaults] stringForKey:FUSLiveUDKeys.fus_liveAgreementConfirmRedeem];
if (state == nil || state.length <= 0) {
return NO;
}
......@@ -131,7 +131,7 @@
}
-(void)fus_setupData{
self.titleLabel.text = [NSString fus_localString:@"收益提现同意事项"];
self.titleLabel.text = [NSString fus_localString:@"收益兑换同意事项"];
NSString *protocolNameStr1 = [NSString fus_localString:@"《自由職業者服務協定》"];
NSString *protocolNameStr2 = [NSString fus_localString:@"《附件》"];
......@@ -172,7 +172,7 @@
}
-(void)fus_okBtnDidClicked:(UIButton *)btn{
[[NSUserDefaults standardUserDefaults] setValue:@"1" forKey:FUSLiveUDKeys.fus_liveAgreementConfirmWithDraw];
[[NSUserDefaults standardUserDefaults] setValue:@"1" forKey:FUSLiveUDKeys.fus_liveAgreementConfirmRedeem];
if (self.clickHandler) {
self.clickHandler(FUSIncomeAgreementClickedOK);
......
......@@ -114,7 +114,7 @@
__weak typeof(self) weakSelf = self;
if (@available(iOS 15.0, *)) {
if (!self.isAnchor) {
if (!self.isAnchor && [self fus_isSmallWindowFeatureEnabled]) {
FUSLiveAnchorSettingModel *minimuze = [[FUSLiveAnchorSettingModel alloc] init];
minimuze.title = [NSString fus_localString:@"自动小窗播放"];
minimuze.subtitle = [NSString fus_localString:@"直播间内切换至App外时,保存直播间小窗播放"];
......@@ -221,8 +221,14 @@
[view fus_showWithAnimate];
}
/// 小窗总开关由后台控制,关闭时不再展示本地设置项。
- (BOOL)fus_isSmallWindowFeatureEnabled {
return FUSCacheDataShare.shareStore.settingInitDataModel.smallWindowSwitch.integerValue == 1;
}
- (void)fus_showWithAnimate {
self.interactionGameItem.switchState = FUSLiveHelper.shareInstance.roomInfoModel.stateSwitch.liveGameState;
self.interactionGameItem.switchState = FUSLiveHelper.shareInstance.roomInfoModel.stateSwitch.liveGameState;
self.bottomBgView.top = UIView.fus_screenH;
self.alpha = 0.0;
[UIView animateWithDuration:0.3 animations:^{
......
......@@ -207,11 +207,11 @@
[FUSLoadingView fus_dismissProgressViewWithView:weakSelf];
if (code == -60) {
// 开启直播需绑定手机
FUSWKWebViewController *webVC = [[FUSWKWebViewController alloc] init];
webVC.webUrlString = FUSShowRoomURLs.fus_URL_SETTING_BIND_PHONE;
webVC.shouldIncludeIdentifyInfo = YES;
[[[weakSelf getViewController] navigationController] pushViewController:webVC animated:YES];
// // 开启直播需绑定手机
// FUSWKWebViewController *webVC = [[FUSWKWebViewController alloc] init];
// webVC.webUrlString = FUSShowRoomURLs.fus_URL_SETTING_BIND_PHONE;
// webVC.shouldIncludeIdentifyInfo = YES;
// [[[weakSelf getViewController] navigationController] pushViewController:webVC animated:YES];
} else if (code == -61) {
// 开启直播需要实名认证
......
......@@ -227,9 +227,6 @@ NS_ASSUME_NONNULL_BEGIN
// 获取首冲信息
+ (NSString *)fus_URL_LIVE_FIRST_CHARGE_INFO;
// 绑定手机号码
+ (NSString *)fus_URL_SETTING_BIND_PHONE;
// 获取指定用户的信息
+ (NSString *)fus_URL_FRIEND_INFO;
......@@ -608,6 +605,9 @@ NS_ASSUME_NONNULL_BEGIN
/// Ticket Show - 视图 - 购票弹窗数据(观众端:购票入口弹窗展示前拉取)
+ (NSString *)fus_URL_TicketShow_Buy_GetData;
/// Ticket Show - 功能 - 校验观众是否仍有购票观看资格
+ (NSString *)fus_URL_TicketShow_Verify_Buy_Has;
/// Ticket Show - 功能 - 观众端购票(观众端:购票弹窗确认购买)
+ (NSString *)fus_URL_TicketShow_User_Buy;
......
......@@ -380,11 +380,6 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/firstcharge/info.html"];
}
// 绑定手机号码
+ (NSString *)fus_URL_SETTING_BIND_PHONE {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/withdraw/phone/readybind.html"];
}
// 获取指定用户的信息
+ (NSString *)fus_URL_FRIEND_INFO {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/sync/getUser.html"];
......@@ -1005,6 +1000,12 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/ticketshow/buy/getdata"];
}
/// Ticket Show - 功能 - 校验观众是否仍有购票观看资格
+ (NSString *)fus_URL_TicketShow_Verify_Buy_Has
{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/ticketshow/verify/buy/has"];
}
/// Ticket Show - 功能 - 观众端购票(观众端:购票弹窗确认购买)
+ (NSString *)fus_URL_TicketShow_User_Buy
{
......
......@@ -895,7 +895,7 @@
NSString *formalBundleIdentifier = @"com.fusi.meet.live.chat.video.among.friends";
// 根据系统当前包名判断播放器配置,正式包走正式 license 与 appid。
BOOL useFormalTTSDKConfig = [currentBundleIdentifier isEqualToString:formalBundleIdentifier];
NSInteger appId = useFormalTTSDKConfig ? 642006 : 100667;
NSInteger appId = useFormalTTSDKConfig ? 642642 : 100667;
NSString *appname = FUSConfig.sharedInstanced.appConfigs.appName;
NSString *channel = [FUSDeviceHelper fus_getChannelId];
NSString *bundleID = currentBundleIdentifier;
......
......@@ -120,13 +120,13 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
[weakSelf.navigationController pushViewController:myZoneVC animated:YES];
}
break;
case FUSImAnchorHeaderButtonTypeWithDraw:{
case FUSImAnchorHeaderButtonTypeRedeem:{
if (FUSConfig.sharedInstanced.devConfigs.appStatus){
// sh不跳
return;
}
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.withdrawAddress;
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.redeemAddress;
[weakSelf.navigationController pushViewController:vc animated:YES];
}
break;
......
......@@ -14,7 +14,7 @@ typedef enum :NSInteger{
/// 个人空间
FUSImAnchorHeaderButtonTypeMyZone = 0,
/// 可提现
FUSImAnchorHeaderButtonTypeWithDraw,
FUSImAnchorHeaderButtonTypeRedeem,
/// vip
FUSImAnchorHeaderButtonTypeVIP,
}FUSImAnchorHeaderButtonType;
......
......@@ -19,7 +19,7 @@
@property (nonatomic, strong) UIButton *ageBtn;
@property (nonatomic, strong) UILabel *idLabel;
@property (nonatomic, strong) UILabel *fireNumLabel;
@property (nonatomic, strong) UIButton *withdrawBtn;
@property (nonatomic, strong) UIButton *redeemBtn;
/// 数据
@property (nonatomic, strong) FUSUserInfosModel *userinfoModel;
......@@ -191,27 +191,27 @@
make.top.equalTo(fireImgView.mas_bottom).offset(6);
}];
UILabel *withdrawTitleLabel = [[UILabel alloc] init];
withdrawTitleLabel.font = [UIFont fus_themeMediumFont:13];
withdrawTitleLabel.textColor = [UIColor fus_textColorLight];
UILabel *redeemTitleLabel = [[UILabel alloc] init];
redeemTitleLabel.font = [UIFont fus_themeMediumFont:13];
redeemTitleLabel.textColor = [UIColor fus_textColorLight];
if (!FUSConfig.sharedInstanced.devConfigs.appStatus) {
// 非sh显示
withdrawTitleLabel.text = [NSString fus_localString:@"可提现"];
redeemTitleLabel.text = [NSString fus_localString:@"可兑换"];
}
[bottomBgImageView addSubview:withdrawTitleLabel];
[withdrawTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
[bottomBgImageView addSubview:redeemTitleLabel];
[redeemTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.offset(-25);
make.top.offset(20);
}];
// 单独独立一个透明button出来好操控空间,不然等下gcp又说要特定区域能点
self.withdrawBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.withdrawBtn.tag = FUSImAnchorHeaderButtonTypeWithDraw;
[bottomBgImageView addSubview:self.withdrawBtn];
[self.withdrawBtn mas_makeConstraints:^(MASConstraintMaker *make) {
self.redeemBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.redeemBtn.tag = FUSImAnchorHeaderButtonTypeRedeem;
[bottomBgImageView addSubview:self.redeemBtn];
[self.redeemBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(bottomBgImageView);
}];
[self.withdrawBtn addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.redeemBtn addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
self.avatorBtn.tag = FUSImAnchorHeaderButtonTypeMyZone;
[self.avatorBtn addTarget:self action:@selector(fus_commondBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
......
......@@ -228,9 +228,12 @@
return;
}
// 组建字典参数
NSDictionary *params = @{@"phone":phone,
@"countrycode":countrycode};
// 组建字典参数;滑动验证通过后需要把 validationId 一并带给后端,否则会重复要求人机验证。
NSMutableDictionary *params = [@{@"phone":phone,
@"countrycode":countrycode} mutableCopy];
if (![NSString isNull:captchaId]) {
params[@"validationId"] = captchaId;
}
// 请求网络上传图片
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_FUS_URL_GET_VERIFY_CODE params:params success:^(NSDictionary *dataDict, int code) {
......
......@@ -7,7 +7,6 @@
//
#import "FUSNewsFeedDetailViewController.h"
#import "FUSZoneTaskCenterViewController.h"
#import "FUSAuthFacePageOneViewController.h"
#import "FUSMyZoneViewController.h"
#import "FUSNewsFeedReplyView.h"
......@@ -317,30 +316,8 @@
// 露水不足
if (code == -116) {
NSMutableArray *otherBtns = [@[[NSString fus_localString:@"去买入"]] mutableCopy];
BOOL showTask = [[[NSUserDefaults standardUserDefaults] objectForKey:FUSUserUDKeys.fus_TASK_SYSTEM_SHOW_SWITCH] boolValue];
if (showTask) {
[otherBtns addObject:[NSString fus_localString:@"任务获取"]];
}
[otherBtns addObject:[NSString fus_localString:@"取消"]];
[FUSAlertView showAlertWithTitle:[NSString fus_localString:@"露水不足"] message:nil cancelButtonTitle:nil otherButtonTitles:otherBtns clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 0) {
FUSHalfWebViewModel *halfWebModel = [[FUSHalfWebViewModel alloc] init];
halfWebModel.popupType = FUSHalfWebViewPopupTypeHalfWeb;
halfWebModel.url = FUSCacheDataShare.shareStore.settingInitDataModel.fusiConfig.dewHalfAddress;
halfWebModel.clickBlank = YES;
halfWebModel.transparency = YES;
halfWebModel.heightR = @(82).stringValue;
[FUSRouter.liveRouter fus_showHalfWebViewWithModel:halfWebModel needMouted:NO allowScroll:YES userInteractionEnabled:YES];
} else if (buttonIndex == 1) {
FUSZoneTaskCenterViewController *taskCenterVC = [[FUSZoneTaskCenterViewController alloc] init];
[[UIViewController fus_topViewController].navigationController pushViewController:taskCenterVC animated:YES];
}
}];
// 复用动态模块统一的露水不足处理,避免当前场景半屏 H5 无法正常打开购买页。
[FUSNewsFeedDataHelper fus_showDewNoEnoughAlert];
} else if (code == -100) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"宝石不足"]];
......
......@@ -53,6 +53,9 @@ NS_ASSUME_NONNULL_BEGIN
commentModel:(FUSNewsFeedCommentModel * __nullable)commentModel
updateUIHandler:(void(^)(BOOL loadFinish, BOOL succeed, BOOL alertCancel))updateUIHandler;
/// 展示露水不足弹窗,并处理去买入与任务获取跳转
+ (void)fus_showDewNoEnoughAlert;
/// 刷新列表。重新加载第一页
/// @param completeHandler 成功回调
/// @param failedHandler 失败回调
......
......@@ -509,6 +509,7 @@
- (UIImageView *)richImageView {
if (!_richImageView) {
_richImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 28, 14)];
_richImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _richImageView;
}
......
......@@ -285,6 +285,7 @@
- (UIImageView *)richImageView {
if (!_richImageView) {
_richImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 28, 14)];
_richImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _richImageView;
}
......
......@@ -126,7 +126,15 @@
[FUSCacheDataShare shareStore].quickChatShowState = item.switchState;
};
group.items = @[/*_hiddinSettingItem,*/ _minimizeItem, quickChatItem, carAudioItem];
NSMutableArray<FUSCustomSettingItem *> *items = [NSMutableArray array];
// 小窗总开关关闭时,不再向用户暴露本地开关入口。
if ([self fus_isSmallWindowFeatureEnabled]) {
[items addObject:_minimizeItem];
}
[items addObject:quickChatItem];
[items addObject:carAudioItem];
group.items = items.copy;
[self.tableView.allGroups appendObject:group];
[self.tableView reloadData];
......@@ -180,7 +188,7 @@
[FUSSettingHttpRequest fus_getControlConfigState:^(BOOL hasOpenedVirtual, BOOL hasOpenedLocat, BOOL hasOpenedStranger, BOOL hasOpenHiddingInRoom, BOOL minimizeState, CGFloat micTakeDivide, NSInteger liveState) {
self.hiddinSettingItem.switchState = hasOpenHiddingInRoom;
self.minimizeItem.switchState = minimizeState;
self.minimizeItem.switchState = [self fus_isSmallWindowFeatureEnabled] ? minimizeState : NO;
[self.tableView reloadData];
......@@ -191,4 +199,9 @@
}];
}
/// 后台总开关开启后,用户本地小窗偏好才允许生效。
- (BOOL)fus_isSmallWindowFeatureEnabled {
return [FUSCacheDataShare shareStore].settingInitDataModel.smallWindowSwitch.integerValue == 1;
}
@end
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