Commit 4ec51edf by ludi

完成通话设置的页面

parent c15e3d74
Showing with 969 additions and 112 deletions
//
// FUSCallTimeIncomeModel.h
// FUSCommon
//
// Created by aaa on 2024/11/21.
//
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSCallTimeIncomeModel : FUSBaseModel
/// 货币类型(3:宝石、4:萤火、5:露水、6:宝箱)
@property (nonatomic, assign) NSInteger currency;
/// 数量
@property (nonatomic, assign) NSInteger total;
/// 获取对应收入的icon
-(UIImage *)fus_getCurrencyIcon;
/// 获取对应的颜色
-(UIColor *)fus_getCurrencyTextColor;
@end
NS_ASSUME_NONNULL_END
//
// FUSCallTimeIncomeModel.m
// FUSCommon
//
// Created by aaa on 2024/11/21.
//
#import "FUSCallTimeIncomeModel.h"
@implementation FUSCallTimeIncomeModel
- (UIImage *)fus_getCurrencyIcon{
switch (self.currency) {
case 3:
return [UIImage fus_diamonIcon];
break;
case 4:
return [UIImage fus_fireIcon];
case 5:
return [UIImage fus_dewIcon];
default:
return nil;
break;
}
}
- (UIColor *)fus_getCurrencyTextColor{
switch (self.currency) {
case 3:
return [UIColor fus_diamondBlue];
break;
case 4:
return [UIColor fus_fireGreen];
break;
case 5:
return [UIColor fus_dewBlue];
break;
default:
return [UIColor whiteColor];
break;
}
}
@end
//
// FUSOnetoOneCheckQualificationModel.h
// FUSCommon
//
// Created by aaa on 2024/11/21.
//
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSOnetoOneCheckQualificationModel : FUSBaseModel
///更新资源状态 1:已更新 0:未更新
@property (nonatomic, assign) NSInteger status;
/// 更新昵称状态 1:已更新 0:未更新
@property (nonatomic, assign) NSInteger nickUpdate;
@end
NS_ASSUME_NONNULL_END
//
// FUSOnetoOneCheckQualificationModel.m
// FUSCommon
//
// Created by aaa on 2024/11/21.
//
#import "FUSOnetoOneCheckQualificationModel.h"
@implementation FUSOnetoOneCheckQualificationModel
@end
......@@ -18,6 +18,7 @@ typedef NS_ENUM(NSInteger,FUSPushNoticeViewType){
FUSPushNoticeViewTypeNewsFeed = 6,
FUSPushNoticeViewTypeLinkMic = 7,
FUSPushNoticeViewTypeCheckIn = 8,
FUSPushNoticeViewTypeOneToOneChatReceive = 9,
};
@interface FUSRoomPushNoticeView : UIView
......
......@@ -81,6 +81,10 @@
_noticeWordsLabel.text = [NSString fus_localString:@"开启系统通知权限,不再错过每天的连续签到奖励"];
break;
}
case FUSPushNoticeViewTypeOneToOneChatReceive:
{
_noticeWordsLabel.text = [NSString fus_versionLocalString:@"开启通知权限,可以帮助您提升接通率,增加通话收入"];
}
default:
break;
}
......
......@@ -20,6 +20,7 @@
#import "FUSUserTradeRemindModel.h"
#import "FUSLiveStartConfigModel.h"
#import "FUSZoneInfosModel.h"
#import "FUSOnetoOneCheckQualificationModel.h"
@interface FUSCacheDataShare : NSObject
......@@ -37,6 +38,9 @@
/// 记录当前最新的myZoneInfoModel,网络请求的总会覆盖掉缓存的
@property (nonatomic, strong) FUSZoneInfosModel *myZoneInfoModel;
/// 校验是否已更新账号资料
@property (nonatomic, strong) FUSOnetoOneCheckQualificationModel *onetoOneCheckQualificationModel;
@property (nonatomic, strong) FUSLangAreaCountryModel *areaCountryInfo; // 語言、語區、註冊國家相關信息
......
......@@ -59,6 +59,8 @@
#import "FUSRechargeDataModel.h"
#import "FUSShareTipsModel.h"
#import "FUSUserInfosModel.h"
#import "FUSOnetoOneCheckQualificationModel.h"
#import "FUSCallTimeIncomeModel.h"
#import "FUSAliOSSModel.h"
#import "FUSAliOSSUploadFileModel.h"
#import "FUSMomentCreateModel.h"
......
......@@ -18,10 +18,12 @@
@property (nonatomic,copy) NSString *audioPrice;
@property (nonatomic,copy) NSString *videoPrice; // 视讯收费价格
@property (nonatomic, copy) NSString *callPrice;
@property (nonatomic,copy) NSString *defaultType;
@property (nonatomic,copy) NSString *avgLevel; // 评分(0.00)
@property (nonatomic,copy) NSString *succRatio; // 接听率(0.00)
@property (nonatomic, assign) BOOL auth;
@end
......@@ -7,6 +7,7 @@
//
#import "FUSBaseModel.h"
#import "FUSCallTimeIncomeModel.h"
@interface FUSPrivateLivePriceItemModel : FUSBaseModel
......@@ -31,6 +32,9 @@
// 状态(0:不可选、1:可选)
@property (nonatomic, assign) NSInteger status;
/// 对应收益
@property (nonatomic, strong) FUSCallTimeIncomeModel *income;
@end
@interface FUSPrivateLivePriceModel : FUSBaseModel
......
......@@ -70,6 +70,9 @@ NS_ASSUME_NONNULL_BEGIN
+ (NSString *)fus_SHOULD_REMOTE_NOTIFICATION_TIP;
/// 是否已经显示过私房童话接收的通知
+ (NSString *)fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP;
// 是否已经显示过包房滑动引导 View
+ (NSString *)fus_HAVE_SHOW_ROOM_GUIDE_VIEW;
......
......@@ -105,6 +105,11 @@
return @"remoteNotificationTip";
}
/// 是否已经显示过私房童话接收的通知
+ (NSString *)fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP {
return @"fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP";
}
// 是否已经显示过包房滑动引导 View
+ (NSString *)fus_HAVE_SHOW_ROOM_GUIDE_VIEW {
return @"haveShowRoomGuideView";
......
......@@ -227,6 +227,7 @@ static NSString *const kGtAppSecret = @"OSSSWqbWY0ACJiUv4AHdW7";
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:FUSUserUDKeys.fus_SETTING_LAUNCH_SOUND_SWITCH_BOOL];
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:kFUSConfigAppStatusUDKey];
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:FUSLiveUDKeys.fus_SHOULD_REMOTE_NOTIFICATION_TIP];
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:FUSLiveUDKeys.fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP];
[[NSUserDefaults standardUserDefaults] setObject:@([NSDate date].timeIntervalSince1970) forKey:FirstLaunchTimeUDKey];
}
......
......@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>72</integer>
<integer>71</integer>
</dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>76</integer>
<integer>72</integer>
</dict>
</dict>
</dict>
......
......@@ -21,21 +21,21 @@
typedef NS_ENUM(NSInteger,FUSVoiceViewShowState){
FUSVoiceViewShowStateShowInMainScreen = 0, // 正在语音通话
FUSVoiceViewShowStateShowInWindow // 最小化到窗口上(UIWindow)
};
typedef NS_ENUM(NSInteger,FUSVideoViewShowState){
FUSVideoViewShowStateChatMainScreenIsOther = 0, // 正在视频通话 主屏幕是别人
FUSVideoViewShowStateChatMainScreenIsMe, // 正在视频通话 主屏幕是自己
FUSVideoViewShowStateShowInWindow // 最小化到窗口上(UIWindow)
};
typedef enum: NSUInteger {
FUSRemoveTypeUpToTop = 0,//从下至上
FUSRemoveTypeAlphaGradulToZero,//可见度渐变
}FUSRemoveType;
//typedef NS_ENUM(NSInteger,FUSVoiceViewShowState){
// FUSVoiceViewShowStateShowInMainScreen = 0, // 正在语音通话
// FUSVoiceViewShowStateShowInWindow // 最小化到窗口上(UIWindow)
//};
//
//typedef NS_ENUM(NSInteger,FUSVideoViewShowState){
// FUSVideoViewShowStateChatMainScreenIsOther = 0, // 正在视频通话 主屏幕是别人
// FUSVideoViewShowStateChatMainScreenIsMe, // 正在视频通话 主屏幕是自己
// FUSVideoViewShowStateShowInWindow // 最小化到窗口上(UIWindow)
//};
//
//typedef enum: NSUInteger {
// FUSRemoveTypeUpToTop = 0,//从下至上
// FUSRemoveTypeAlphaGradulToZero,//可见度渐变
//}FUSRemoveType;
@interface FUSIMConversationViewHelper ()
//other
......
......@@ -7,12 +7,12 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>71</integer>
<integer>75</integer>
</dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>74</integer>
<integer>76</integer>
</dict>
</dict>
</dict>
......
......@@ -7,6 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
008FF10D2CEF3675002974EA /* FUSUserManagerVoiceSignModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 008FF10C2CEF3675002974EA /* FUSUserManagerVoiceSignModel.m */; };
008FF10E2CEF3675002974EA /* FUSUserManagerVoiceSignModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FF10B2CEF3675002974EA /* FUSUserManagerVoiceSignModel.h */; };
008FF1112CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FF10F2CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.h */; };
008FF1122CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 008FF1102CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.m */; };
008FF1152CEF45FA002974EA /* FUSOneToOnePriceGetListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 008FF1142CEF45FA002974EA /* FUSOneToOnePriceGetListModel.m */; };
008FF1162CEF45FA002974EA /* FUSOneToOnePriceGetListModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 008FF1132CEF45FA002974EA /* FUSOneToOnePriceGetListModel.h */; };
9E8D0BED6061C8C88FBF8686 /* Pods_FUSUserCenterModule.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BED3EAC4EA2F921CB5B2FEE8 /* Pods_FUSUserCenterModule.framework */; };
BE189A2D2C7323FE0008418B /* FSRDynamicImModel.h in Headers */ = {isa = PBXBuildFile; fileRef = BE1899A72C7323FE0008418B /* FSRDynamicImModel.h */; };
BE189A2E2C7323FE0008418B /* FSRDynamicImModel.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1899A82C7323FE0008418B /* FSRDynamicImModel.m */; };
......@@ -835,6 +841,12 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
008FF10B2CEF3675002974EA /* FUSUserManagerVoiceSignModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSUserManagerVoiceSignModel.h; sourceTree = "<group>"; };
008FF10C2CEF3675002974EA /* FUSUserManagerVoiceSignModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSUserManagerVoiceSignModel.m; sourceTree = "<group>"; };
008FF10F2CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSChatSettingOneToOneHeaderView.h; sourceTree = "<group>"; };
008FF1102CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSChatSettingOneToOneHeaderView.m; sourceTree = "<group>"; };
008FF1132CEF45FA002974EA /* FUSOneToOnePriceGetListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSOneToOnePriceGetListModel.h; sourceTree = "<group>"; };
008FF1142CEF45FA002974EA /* FUSOneToOnePriceGetListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSOneToOnePriceGetListModel.m; sourceTree = "<group>"; };
29DC17A1A1D4B29CA3BB6003 /* Pods-FUSUserCenterModule.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FUSUserCenterModule.debug.xcconfig"; path = "Target Support Files/Pods-FUSUserCenterModule/Pods-FUSUserCenterModule.debug.xcconfig"; sourceTree = "<group>"; };
BE1899A72C7323FE0008418B /* FSRDynamicImModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSRDynamicImModel.h; sourceTree = "<group>"; };
BE1899A82C7323FE0008418B /* FSRDynamicImModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSRDynamicImModel.m; sourceTree = "<group>"; };
......@@ -2559,6 +2571,10 @@
BE78C9E92C538D7D00F38855 /* FUSBlackListModel.m */,
BE78C9EA2C538D7D00F38855 /* FUSSettingChatInviteModel.h */,
BE78C9EB2C538D7D00F38855 /* FUSSettingChatInviteModel.m */,
008FF10B2CEF3675002974EA /* FUSUserManagerVoiceSignModel.h */,
008FF10C2CEF3675002974EA /* FUSUserManagerVoiceSignModel.m */,
008FF1132CEF45FA002974EA /* FUSOneToOnePriceGetListModel.h */,
008FF1142CEF45FA002974EA /* FUSOneToOnePriceGetListModel.m */,
);
path = Models;
sourceTree = "<group>";
......@@ -2584,6 +2600,8 @@
BE78CA032C538D7D00F38855 /* FUSChatSettingHeaderView.h */,
BE78CA042C538D7D00F38855 /* FUSChatSettingHeaderView.m */,
BE78CA052C538D7D00F38855 /* FUSChatSettingHeaderView.xib */,
008FF10F2CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.h */,
008FF1102CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.m */,
BE78CA062C538D7D00F38855 /* FUSChatSettingPriceCell.h */,
BE78CA072C538D7D00F38855 /* FUSChatSettingPriceCell.m */,
BE78CA082C538D7D00F38855 /* FUSChatSettingPriceCell.xib */,
......@@ -3416,6 +3434,7 @@
BE78CCE52C538D8000F38855 /* FUSImAnchorHeaderView.h in Headers */,
BE78CCA72C538D8000F38855 /* FUSNewsFeedUnlockPriceView.h in Headers */,
BE78CCC82C538D8000F38855 /* TZGifPhotoPreviewController.h in Headers */,
008FF10E2CEF3675002974EA /* FUSUserManagerVoiceSignModel.h in Headers */,
BED65B472C5B990400668116 /* FUSMyView.h in Headers */,
BE78CBFD2C538D7F00F38855 /* FUSCheckNetworkWebController.h in Headers */,
BE78CC802C538D7F00F38855 /* FUSNewsFeedDetailVideoHeaderView.h in Headers */,
......@@ -3430,6 +3449,7 @@
BE78CCEB2C538D8000F38855 /* FUSImagePickerViewController.h in Headers */,
BE78CC3A2C538D7F00F38855 /* FUSNewsFeedLikeListViewController.h in Headers */,
BE78CB112C538D7E00F38855 /* FUSLoginViewController.h in Headers */,
008FF1162CEF45FA002974EA /* FUSOneToOnePriceGetListModel.h in Headers */,
BE78CB5C2C538D7E00F38855 /* FUSReportOptionModel.h in Headers */,
BE189A4F2C7323FE0008418B /* FSRImViewController.h in Headers */,
BE78CC0A2C538D7F00F38855 /* FUSSettingViewController.h in Headers */,
......@@ -3461,6 +3481,7 @@
BE78CD022C538D8000F38855 /* FUSNumberView.h in Headers */,
BE78CBCC2C538D7F00F38855 /* FUSTaskCenterHeaderSimpleTableViewCell.h in Headers */,
BE78CC032C538D7F00F38855 /* FUSNoticeSettingViewController.h in Headers */,
008FF1112CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.h in Headers */,
BEDEDC492C66075400B4B0B0 /* FUSSingleDailyCheckInView.h in Headers */,
BE78CCA22C538D8000F38855 /* FUSNewsFeedReplyView.h in Headers */,
BE189A5B2C7323FE0008418B /* FSRPrivacyMineViewController.h in Headers */,
......@@ -4075,6 +4096,7 @@
BE189AA22C7323FE0008418B /* FSRSettingdictDynamicImView.m in Sources */,
BE78CBCD2C538D7F00F38855 /* FUSTaskCenterHeaderSimpleTableViewCell.m in Sources */,
BE78CC572C538D7F00F38855 /* ResultViewController.m in Sources */,
008FF1122CEF42A1002974EA /* FUSChatSettingOneToOneHeaderView.m in Sources */,
BE78CBAE2C538D7E00F38855 /* FUSMyZoneHeaderView.m in Sources */,
BE78CB122C538D7E00F38855 /* FUSLoginViewController.m in Sources */,
BE78CC992C538D8000F38855 /* FUSNewsFeedMessageCell.m in Sources */,
......@@ -4110,10 +4132,12 @@
BE78CCF22C538D8000F38855 /* FUSAlbumModel.m in Sources */,
BE78CC6D2C538D7F00F38855 /* FUSNewsFeedDetailToolView.m in Sources */,
BED65B1D2C5B795900668116 /* FUSChatInputTaskListTableViewCell.swift in Sources */,
008FF1152CEF45FA002974EA /* FUSOneToOnePriceGetListModel.m in Sources */,
BE189A702C7323FE0008418B /* FSRMinePrivacySearchCollectionViewCell.m in Sources */,
BE78CC922C538D8000F38855 /* FUSNewsFeedLikeCell.m in Sources */,
BE78CCC52C538D8000F38855 /* TZAssetCell.m in Sources */,
BE78CD032C538D8000F38855 /* FUSNumberView.m in Sources */,
008FF10D2CEF3675002974EA /* FUSUserManagerVoiceSignModel.m in Sources */,
BE78CBC52C538D7E00F38855 /* FUSGotBackpackItemAnimView.m in Sources */,
BE189A9E2C7323FE0008418B /* FSRMotordictStartView.m in Sources */,
BE189A382C7323FE0008418B /* FSRMinePrivacySearchModel.m in Sources */,
......
......@@ -12,7 +12,7 @@
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>75</integer>
<integer>74</integer>
</dict>
</dict>
</dict>
......
......@@ -9,10 +9,12 @@
#import "FUSImAnchorViewController.h"
#import "FUSImAnchorHeaderView.h"
#import "FUSSettingTableView.h"
#import "FUSChatSettingViewController.h"
#import "FUSMyZoneViewController.h"
#import "FUSNewsFeedHelper.h"
#import "FUSLoginCacheOperate.h"
#import "FUSSettingHttpRequest.h"
#import <Masonry/Masonry.h>
......@@ -22,6 +24,7 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
FUSImAnchorItemTypePopular,
FUSImAnchorItemTypeLiveTime,
FUSImAnchorItemTypeTotalFire,
/// 私房设置
FUSImAnchorItemTypePrivacyRoomSetting,
FUSImAnchorItemTypeBroadcastBuild,
FUSImAnchorItemTypeActivity,
......@@ -135,13 +138,13 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
section2 = @[@(FUSImAnchorItemTypeLiveTime)];
}
// 暂时不要私房设置
// NSArray *section3 = @[@(FUSImAnchorItemTypePrivacyRoomSetting)];
NSArray *section3 = @[@(FUSImAnchorItemTypePrivacyRoomSetting)];
NSArray *section4 = @[@(FUSImAnchorItemTypeBroadcastBuild), @(FUSImAnchorItemTypeActivity)];
if ([NSString isNullWithString:[FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.activitiesAddress]
|| FUSConfig.sharedInstanced.devConfigs.appStatus) {
section4 = @[@(FUSImAnchorItemTypeBroadcastBuild)];
}
NSArray *itemTypeSectionList = @[section1, section2, section4];
NSArray *itemTypeSectionList = @[section1, section2, section3, section4];
[self.allGroups removeAllObjects];
for (NSArray *evSection in itemTypeSectionList) {
......@@ -167,7 +170,8 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
break;
case FUSImAnchorItemTypePrivacyRoomSetting:
itemModel.rightShowTextColor = [UIColor fus_textColorLight];
itemModel.redCircleColor = [UIColor fus_diamondBlue];
itemModel.redCircleColor = [UIColor fus_themeColor];
itemModel.isShowRedCirclePoint = YES;
break;
default:
break;
......@@ -256,9 +260,15 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
}
}
break;
case FUSImAnchorItemTypePrivacyRoomSetting:
// itemModel.rightShowText =
case FUSImAnchorItemTypePrivacyRoomSetting:{
NSInteger callPirce = [[FUSCacheDataShare shareStore].myZoneInfoModel.chatWith[@"callPrice"] integerValue];
if (callPirce > 0) {
itemModel.rightShowText = [NSString stringWithFormat:@" %ld%@/min",(long)callPirce,[NSString fus_versionLocalString:@"宝石"]];
}else {
itemModel.rightShowText = [NSString stringWithFormat:@" %@",[NSString fus_versionLocalString:@"免费"]];
}
break;
}
default:
break;
}
......@@ -306,6 +316,19 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
[self.navigationController pushViewController:vc animated:YES];
}
break;
case FUSImAnchorItemTypePrivacyRoomSetting: {
MJWeakSelf
[FUSLoadingView fus_showProgressViewWithMessage:@"" canTouchBottomView:NO];
[FUSSettingHttpRequest fus_oneToOneCheckQualificationSuccess:^(FUSOnetoOneCheckQualificationModel *model) {
[FUSLoadingView fus_dismissProgressView];
FUSChatSettingViewController *vc = [[FUSChatSettingViewController alloc] init];
[weakSelf.navigationController pushViewController:vc animated:YES];
} failure:^(NSString *msg, int code) {
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:msg];
}];
}
break;
default:
break;
}
......
......@@ -12,12 +12,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface FUSChatSettingViewController : FUSBaseViewController
// 自动弹出声讯价格设置弹窗
@property (nonatomic, assign) BOOL autoShowVoiceChatPriceView;
// 自动弹出视讯价格设置弹窗
@property (nonatomic, assign) BOOL autoShowVideoChatPriceView;
@end
NS_ASSUME_NONNULL_END
......@@ -12,6 +12,7 @@
#import "FUSChatSettingExtraCell.h"
#import "FUSChatSettingHeaderView.h"
#import "FUSChatSettingOneToOneHeaderView.h"
#import "FUSSettingHttpRequest.h"
#import "FUSNewsFeedHttpHelper.h"
......@@ -25,7 +26,7 @@
@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
// 头部的View
@property (nonatomic, strong) FUSChatSettingHeaderView *headerView;
@property (nonatomic, strong) FUSChatSettingOneToOneHeaderView *headerView;
@property (nonatomic,strong) FUSPrivateLiveConfigModel *userConfigModel;
......@@ -41,6 +42,11 @@
// 签名状态(0:未填写,1:已填写)
@property (nonatomic, assign) BOOL signState;
/// 语音签名状态模型
@property (nonatomic, strong) FUSUserManagerVoiceSignModel *voiceSignModel;
/// 资料完善程度 -1.未完善,0.待完善。1.完善
@property (nonatomic, assign) NSInteger detailCompleteStage;
@end
@implementation FUSChatSettingViewController
......@@ -54,34 +60,25 @@
self.hiddenNavigationBar = YES;
self.titleLabel.text = [NSString fus_localString:@"通话设置"];
[self.backBtn setImage:UIImage.fus_backWhiteImage forState:UIControlStateNormal];
self.titleLabel.font = [UIFont fus_themeFont:18];
[self.backBtn setImage:UIImage.fus_backImage forState:UIControlStateNormal];
[self.backBtn addTarget:self action:@selector(popViewController) forControlEvents:UIControlEventTouchUpInside];
[self fus_updateBottomTableView];
[self fus_updateVideoSetting];
// [self fus_updateVideoSetting];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self fus_getControlConfigState];
[self fus_updateVideoSetting];
[self fus_loadUserManagerVoiceSignGet];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
if (self.autoShowVoiceChatPriceView) {
self.autoShowVoiceChatPriceView = NO;
// [self fus_startToSetSingleLivePrice:NO];
} else if (self.autoShowVideoChatPriceView) {
self.autoShowVideoChatPriceView = NO;
// [self fus_startToSetSingleLivePrice:YES];
[self.headerView fus_showVideoPrice];
}
}
- (void)fus_updateBottomTableView {
self.headerView = [[FUSChatSettingHeaderView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, 411)];
self.headerView = [[FUSChatSettingOneToOneHeaderView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, [FUSChatSettingOneToOneHeaderView fus_viewHeight])];
self.bottomTableView.tableHeaderView = self.headerView;
self.bottomTableView.delegate = self;
......@@ -92,19 +89,31 @@
}
- (void)fus_updateVideoSetting {
MJWeakSelf
[FUSSettingHttpRequest fus_getUserPrivateLiveConfigWithUid:[FUSCacheDataShare shareStore].userDetailInfo.uid success:^(FUSPrivateLiveConfigModel *configModel) {
//获取用户视讯设置模型
_userConfigModel = configModel;
self.headerView.configModel = configModel;
weakSelf.userConfigModel = configModel;
weakSelf.headerView.configModel = configModel;
} failure:^(NSString *errorMsg) {
}];
}
-(void)fus_loadUserManagerVoiceSignGet{
MJWeakSelf
[FUSSettingHttpRequest fus_userManagerVoiceSignGetSuccess:^(FUSUserManagerVoiceSignModel *model) {
weakSelf.voiceSignModel = model;
weakSelf.headerView.voiceSignModel = model;
[weakSelf.bottomTableView reloadData];
} failure:^(NSString *msg, int code) {
}];
}
#pragma mark - UITableViewDelegate && UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 3;
return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
......@@ -114,49 +123,54 @@
switch (indexPath.row) {
case 0: {
cell.titleLabel.text = [NSString fus_localString:@"完善资料"];
cell.detailLabel.text = [NSString fus_localString:@"完善个人资料可获得更多的曝光"];
cell.titleLabel.text = [NSString fus_versionLocalString:@"完善资料"];
cell.detailLabel.text = [NSString fus_versionLocalString:@"完善个人资料可获得更多的曝光"];
self.detailCompleteStage = -1;
FUSUserInfosModel *user = [FUSCacheDataShare shareStore].userDetailInfo;
if ([NSString isNull:user.face]
if ([NSString isNullWithString:user.face]
|| [user.face containsString:@"boy"]
|| [user.face containsString:@"girl"]) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755"];
cell.rightTipLabel.text = [NSString fus_localString:@"头像未更换"];
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755" alpha:1];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"未完善"];
} else if (!self.signState) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755"];
cell.rightTipLabel.text = [NSString fus_localString:@"个性签名未完善"];
} else if ([NSDictionary isNull:user.voiceChat] || [NSString isNull:user.voiceChat[@"url"]]) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755"];
cell.rightTipLabel.text = [NSString fus_localString:@"语音签名未完善"];
} else if ([NSString isNull:user.addr]) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755"];
cell.rightTipLabel.text = [NSString fus_localString:@"位置未开启"];
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755" alpha:1];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"未完善"];
} else if (user.voiceChat == nil || [NSString isNullWithString:[user.voiceChat valueForKey:@"url"]]) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755" alpha:1];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"未完善"];
} else if ([NSString isNullWithString:user.addr]) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755" alpha:1];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"未完善"];
} else {
cell.rightTipLabel.text = [NSString fus_localString:@"已完善"];
if (self.voiceSignModel.status == -1){
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755" alpha:1];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"未完善"];
}else if (self.voiceSignModel.status == 0) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755" alpha:1];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"审核中"];
self.detailCompleteStage = 0;
}else if (self.voiceSignModel.status == 1) {
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"已完善"];
self.detailCompleteStage = 1;
}
}
break;
}
case 1: {
cell.titleLabel.text = [NSString fus_localString:@"打开通知"];
cell.detailLabel.text = [NSString fus_localString:@"打开通知不再错过来电"];
cell.titleLabel.text = [NSString fus_versionLocalString:@"打开通知"];
cell.detailLabel.text = [NSString fus_versionLocalString:@"打开通知不再错过来电"];
if ([UIApplication sharedApplication].currentUserNotificationSettings.types == UIUserNotificationTypeNone) {
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755"];
cell.rightTipLabel.text = [NSString fus_localString:@"去打开"];
cell.rightTipLabel.textColor = [UIColor colorWithHex:@"#F65755" alpha:1];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"去打开"];
} else {
cell.rightTipLabel.text = [NSString fus_localString:@"已打开"];
cell.rightTipLabel.text = [NSString fus_versionLocalString:@"已打开"];
}
break;
}
case 2: {
cell.titleLabel.text = [NSString fus_localString:@"匹配优质用户"];
cell.detailLabel.text = [NSString fus_localString:@"匹配优质用户可增加通话几率哦"];
NSString *rightTip = [NSString stringWithFormat:[NSString fus_localString:@"剩 %zd 次"],self.shareTotal];
cell.rightTipLabel.text = rightTip;
break;
}
default:
break;
......@@ -171,24 +185,21 @@
case 0: {
FUSUserInfosModel *user = [FUSCacheDataShare shareStore].userDetailInfo;
if ([NSString isNull:user.face]
|| [user.face containsString:@"boy"]
|| [user.face containsString:@"girl"]
|| !self.signState
|| [NSDictionary isNull:user.voiceChat]
|| [NSString isNull:user.voiceChat[@"url"]]
|| [NSString isNull:user.addr]) {
FUSZoneUserInfoEditViewController *editUserInfosVC = [[FUSZoneUserInfoEditViewController alloc] init];
[self.navigationController pushViewController:editUserInfosVC animated:YES];
if (self.detailCompleteStage == -1) {
//TODO: 这里要写FFCompleteUserInfoViewController
// FFCompleteUserInfoViewController *vc = [[FFCompleteUserInfoViewController alloc] init];
// [vc ff_setControllerTypeWithType:1];
// [[UIViewController topViewController].navigationController pushViewController:vc animated:YES];
}else if ( self.detailCompleteStage == 0) {
[FUSAlertView showAlertWithTitle:[NSString fus_versionLocalString:@"私房价格"] message:[NSString fus_versionLocalString:@"个人资料正在审核中,请耐心等候"] cancelButtonTitle:nil otherButtonTitles:@[[NSString fus_versionLocalString:@"我知道了"]] clickBlock:^(NSInteger buttonIndex) {
}];
}
break;
}
case 1: {
if ([UIApplication sharedApplication].currentUserNotificationSettings.types == UIUserNotificationTypeNone) {
// 跳转到FuSi设置界面
// 跳转到Firefly设置界面
NSURL *pushSettingUrl = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:pushSettingUrl]) {
[[UIApplication sharedApplication] openURL:pushSettingUrl];
......@@ -196,21 +207,19 @@
}
break;
}
case 2: {
if (_userConfigModel.videoAuthState.integerValue == 2) {
FUSSettingChatInviteUserViewController *vc = [[FUSSettingChatInviteUserViewController alloc] initWithShareTotal:self.shareTotal];
[self.navigationController pushViewController:vc animated:YES];
} else {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"请先认证才可以使用此功能。"]];
}
break;
}
default:
break;
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 3) {
return 78;
}
return 68;
}
/**
获取控制配置信息
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -22,18 +22,18 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="setting_chat_bg" translatesAutoresizingMaskIntoConstraints="NO" id="ZqJ-t0-EIU">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ZqJ-t0-EIU">
<rect key="frame" x="0.0" y="0.0" width="414" height="310"/>
<constraints>
<constraint firstAttribute="width" secondItem="ZqJ-t0-EIU" secondAttribute="height" multiplier="375:281" id="CKE-LE-AAx"/>
</constraints>
</imageView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="6V3-zH-yez">
<rect key="frame" x="0.0" y="88" width="414" height="774"/>
<rect key="frame" x="0.0" y="92" width="414" height="770"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vmU-W5-IPB">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<rect key="frame" x="0.0" y="48" width="414" height="44"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bI8-P2-j3R">
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
......@@ -41,12 +41,12 @@
<constraint firstAttribute="width" secondItem="bI8-P2-j3R" secondAttribute="height" id="3yL-vZ-Oa6"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="common_navigation_back_white"/>
<state key="normal" image="fus_common_navigation_back_black"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="通话设置" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bKz-WV-Lkx">
<rect key="frame" x="177" y="11.5" width="60" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
......@@ -79,8 +79,7 @@
</view>
</objects>
<resources>
<image name="common_navigation_back_white" width="9" height="15.5"/>
<image name="setting_chat_bg" width="375" height="281.5"/>
<image name="fus_common_navigation_back_black" width="8" height="14.5"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
......
//
// FUSOneToOnePriceGetListModel.h
// FUSUserCenterModule
//
// Created by aaa on 2024/11/21.
//
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSOneToOnePriceGetListModel : FUSBaseModel
@property (nonatomic, strong) NSMutableArray<FUSPrivateLivePriceItemModel *> *priceList;
/// 分成比例
@property (nonatomic, assign) CGFloat divideRatio;
/// 分成文案
@property (nonatomic, copy) NSString *divideRatioTxt;
@end
NS_ASSUME_NONNULL_END
//
// FUSOneToOnePriceGetListModel.m
// FUSUserCenterModule
//
// Created by aaa on 2024/11/21.
//
#import "FUSOneToOnePriceGetListModel.h"
@implementation FUSOneToOnePriceGetListModel
//嵌套的 model
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{
@"priceList" : FUSPrivateLivePriceItemModel.class
};
}
@end
//
// FUSUserManagerVoiceSignModel.h
// FUSUserCenterModule
//
// Created by aaa on 2024/11/21.
//
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSUserManagerVoiceSignModel : FUSBaseModel
/// 语音签名URL
@property (nonatomic, copy) NSString *url;
/// 语音时长(秒)
@property (nonatomic, assign) CGFloat duration;
/// 语音审核状态 -1:未通过 0:待审核 1:已审核
@property (nonatomic, assign) int status;
@end
NS_ASSUME_NONNULL_END
//
// FUSUserManagerVoiceSignModel.m
// FUSUserCenterModule
//
// Created by aaa on 2024/11/21.
//
#import "FUSUserManagerVoiceSignModel.h"
@implementation FUSUserManagerVoiceSignModel
@end
......@@ -10,6 +10,9 @@
#import <UIKit/UIKit.h>
#import "FUSPrivateLiveConfigModel.h"
#import "FUSPrivateLivePriceModel.h"
#import "FUSCommon.h"
#import "FUSUserManagerVoiceSignModel.h"
#import "FUSOneToOnePriceGetListModel.h"
@class FUSSettingChatInviteModel;
......@@ -220,4 +223,30 @@
success:(void(^)(void))success
failure:(void(^)(NSString *msg, int code))failure;
/// 校验是否已更新账号资料
/// @param success 成功
/// @param failure 失败
+ (void)fus_oneToOneCheckQualificationSuccess:(void (^)(FUSOnetoOneCheckQualificationModel *model))success
failure:(void (^)(NSString *msg, int code))failure;
/// 获取语音签名信息及状态
/// @param success 成功
/// @param failure 失败
+ (void)fus_userManagerVoiceSignGetSuccess:(void (^)(FUSUserManagerVoiceSignModel *model))success
failure:(void (^)(NSString *msg, int code))failure;
/// 1对1私房价格选项列表
/// @param success 成功
/// @param failure 失败
+ (void)fus_onetoonePriceGetListSuccess:(void (^)(FUSOneToOnePriceGetListModel *model))success
failure:(void (^)(NSString *msg, int code))failure;
/// 1对1私房设置价格
/// @param pid id
/// @param success 成功
/// @param failure 失败
+(void)fus_oneToOnePriceSetWithPid:(NSString *)pid
success:(void (^)(NSDictionary *dataDict))success
failure:(void (^)(NSString *msg, int code))failure;
@end
......@@ -535,4 +535,49 @@
}];
}
/// 校验是否已更新账号资料
+ (void)fus_oneToOneCheckQualificationSuccess:(void (^)(FUSOnetoOneCheckQualificationModel *))success failure:(void (^)(NSString *, int))failure{
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_OneToOneCheckQualification params:nil success:^(NSDictionary * _Nullable dataDict, int code) {
FUSOnetoOneCheckQualificationModel *model = [FUSOnetoOneCheckQualificationModel fus_modelWithDict:dataDict];
[FUSCacheDataShare shareStore].onetoOneCheckQualificationModel = model;
success(model);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE,code);
}
}];
}
/// 获取语音签名信息及状态
+ (void)fus_userManagerVoiceSignGetSuccess:(void (^)(FUSUserManagerVoiceSignModel *))success failure:(void (^)(NSString *, int))failure{
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_userManagerVoiceSignGet params:nil success:^(NSDictionary * _Nullable dataDict, int code) {
FUSUserManagerVoiceSignModel *model = [FUSUserManagerVoiceSignModel fus_modelWithDict:dataDict];
success(model);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE,code);
}
}];
}
/// 1对1私房价格选项列表
+ (void)fus_onetoonePriceGetListSuccess:(void (^)(FUSOneToOnePriceGetListModel *))success failure:(void (^)(NSString *, int))failure{
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_oneToOnePriceGetList params:nil success:^(NSDictionary * _Nullable dataDict, int code) {
FUSOneToOnePriceGetListModel *model = [FUSOneToOnePriceGetListModel fus_modelWithDict:dataDict];
success(model);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE,code);
}
}];
}
/// 1对1私房设置价格
+ (void)fus_oneToOnePriceSetWithPid:(NSString *)pid success:(void (^)(NSDictionary *))success failure:(void (^)(NSString *, int))failure{
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_oneToOnePriceSet params:@{@"priceId": pid} success:^(NSDictionary * _Nullable dataDict, int code) {
success(dataDict);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) {
failure(FAILURE_MESSAGE,code);
}
}];
}
@end
......@@ -17,6 +17,9 @@
self.selectedBackgroundView = [[UIView alloc] init];
self.selectedBackgroundView.backgroundColor = UIColor.fus_appBGPressColor;
self.arrowImageView.image = UIImage.fus_rightArrowIcon;
self.titleLabel.textColor = [UIColor fus_textColorRich];
self.detailLabel.textColor = [UIColor fus_textColorLight2];
}
/**
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -43,7 +43,7 @@
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.070588235294117646" green="0.070588235294117646" blue="0.086274509803921567" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="i0P-UN-dUJ" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="12e-hB-Nb7"/>
<constraint firstItem="CQQ-zp-zt3" firstAttribute="top" secondItem="qqh-H2-4Tm" secondAttribute="bottom" constant="8" id="9fm-Up-FBO"/>
......
......@@ -5,6 +5,7 @@
// Created by pierce on 2022/1/14.
// Copyright © 2024年 FusiClub. All rights reserved.
//
//TODO: 7600以后版本这个类废弃,使用FUSChatSettingOneToOneHeaderView替代,后续如无意外删除此类
#import <UIKit/UIKit.h>
......
//
// FUSChatSettingOneToOneHeaderView.h
// FUSUserCenterModule
//
// Created by aaa on 2024/11/21.
//
#import <UIKit/UIKit.h>
#import "FUSPrivateLiveConfigModel.h"
#import "FUSUserManagerVoiceSignModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSChatSettingOneToOneHeaderView : UIView
@property (nonatomic, strong) FUSPrivateLiveConfigModel *configModel;
/// 语音签名状态模型
@property (nonatomic, strong) FUSUserManagerVoiceSignModel *voiceSignModel;
+(CGFloat)fus_viewHeight;
@end
NS_ASSUME_NONNULL_END
//
// FUSChatSettingOneToOneHeaderView.m
// FUSUserCenterModule
//
// Created by aaa on 2024/11/21.
//
#import "FUSChatSettingOneToOneHeaderView.h"
#import "FUSOneToOnePriceGetListModel.h"
#import <Masonry/Masonry.h>
#import "FUSChatSettingPriceCell.h"
#import "FUSSettingHttpRequest.h"
#import <SJAttributesFactory/SJAttributesFactory.h>
#import "FUSAuthFacePageOneViewController.h"
// 导入通知框架
#import <UserNotifications/UserNotifications.h>
@interface FUSChatSettingOneToOneHeaderView()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
@property (nonatomic, strong) UISwitch *chatSwitch;
@property (nonatomic, strong) UILabel *incomeDescLabel;
@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) UILabel *commissionRateTitleLabel;
@property (nonatomic, strong) UILabel *commissionRateLabel;
@property (nonatomic, strong) UIView *chatSelectedMaskView;
/// 总模型
@property (nonatomic, strong) FUSOneToOnePriceGetListModel *priceModel;
// 选中的视讯价格
@property (nonatomic, strong) FUSPrivateLivePriceItemModel *selectedPriceModel;
@end
@implementation FUSChatSettingOneToOneHeaderView
- (instancetype)init
{
self = [super init];
if (self) {
[self makeUI];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self makeUI];
}
return self;
}
-(void)makeUI{
self.backgroundColor = [UIColor whiteColor];
UILabel *chatReceiveTitleLabel = [[UILabel alloc] init];
chatReceiveTitleLabel.text = [NSString fus_versionLocalString:@"私房通话接听"];
chatReceiveTitleLabel.font = [UIFont fus_themeFont:17];
chatReceiveTitleLabel.textColor = [UIColor fus_textColorRich];
[self addSubview:chatReceiveTitleLabel];
[chatReceiveTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(22);
make.top.offset(18);
}];
self.chatSwitch = [[UISwitch alloc] init];
self.chatSwitch.onTintColor = [UIColor fus_themeColor];
[self addSubview:self.chatSwitch];
[self.chatSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.offset(-17);
make.centerY.equalTo(chatReceiveTitleLabel.mas_centerY);
make.size.mas_equalTo(CGSizeMake(54, 32));
}];
UIView *lineView = [[UIView alloc] init];
lineView.backgroundColor = [UIColor fus_lineColor];
[self addSubview:lineView];
[lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.inset(22);
make.top.equalTo(chatReceiveTitleLabel.mas_bottom).offset(24);
make.height.offset(0.5);
}];
UILabel *roomPriceStrLabel = [[UILabel alloc] init];
roomPriceStrLabel.font = [UIFont fus_themeFont:17];
roomPriceStrLabel.textColor = [UIColor fus_textColorRich];
roomPriceStrLabel.text = [NSString fus_versionLocalString:@"私房价格"];
[self addSubview:roomPriceStrLabel];
[roomPriceStrLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(22);
make.top.equalTo(lineView.mas_bottom).offset(16);
}];
self.incomeDescLabel = [[UILabel alloc] init];
[self addSubview:self.incomeDescLabel];
[self.incomeDescLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(roomPriceStrLabel.mas_left);
make.top.equalTo(roomPriceStrLabel.mas_bottom).offset(9);
}];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(100, 110);
// layout.minimumLineSpacing = 10;
layout.minimumInteritemSpacing = 10;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, layout.itemSize.height + 20) collectionViewLayout:layout];
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.showsVerticalScrollIndicator = NO;
_collectionView.showsHorizontalScrollIndicator = NO;
_collectionView.backgroundColor = [UIColor clearColor];
[self addSubview:_collectionView];
[_collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.offset(0);
make.top.equalTo(self.incomeDescLabel.mas_bottom).offset(7);
make.height.offset(layout.itemSize.height + 20);
}];
[_collectionView registerNib:[FUSChatSettingPriceCell cellNib] forCellWithReuseIdentifier:[FUSChatSettingPriceCell cellIdentifer]];
_collectionView.contentInset = UIEdgeInsetsMake(0, 13, 0, 13);
self.commissionRateTitleLabel = [[UILabel alloc] init];
self.commissionRateTitleLabel.font = [UIFont fus_themeFont:15];
self.commissionRateTitleLabel.textColor = [UIColor colorWithHex:@"#A7A7A7"];
self.commissionRateTitleLabel.text = [NSString fus_versionLocalString:@"宝石分成:"];
[self addSubview:self.commissionRateTitleLabel];
[self.commissionRateTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(chatReceiveTitleLabel.mas_left);
make.top.equalTo(self.collectionView.mas_bottom).offset(15);
}];
self.commissionRateLabel = [[UILabel alloc] init];
self.commissionRateLabel.font = [UIFont fus_themeFont:15];
self.commissionRateLabel.textColor = [UIColor fus_textColorRich];
[self addSubview:self.commissionRateLabel];
[self.commissionRateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.commissionRateTitleLabel.mas_right);
make.top.equalTo(self.commissionRateTitleLabel.mas_top);
}];
UIView *lineView2 = [[UIView alloc] init];
lineView2.backgroundColor = [UIColor fus_lineColor];
[self addSubview:lineView2];
[lineView2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.inset(22);
make.top.equalTo(self.commissionRateTitleLabel.mas_bottom).offset(20);
make.height.offset(0.5);
}];
self.chatSelectedMaskView = [[UIView alloc] init];
self.chatSelectedMaskView.backgroundColor = [self.backgroundColor colorWithAlphaComponent:0.7];
[self addSubview:self.chatSelectedMaskView];
[self.chatSelectedMaskView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.inset(0);
make.top.equalTo(roomPriceStrLabel.mas_top);
make.bottom.equalTo(lineView2.mas_top);
}];
self.chatSelectedMaskView.hidden = YES;
[self.chatSwitch addTarget:self action:@selector(switchValueDidChangedAction:) forControlEvents:UIControlEventValueChanged];
}
#pragma mark - button did clicked
-(void)switchValueDidChangedAction:(UISwitch *)sender{
[FUSTalkingData fus_trackEvent:FUSUserEventTrackParams.fus_EVENT_ME_SETTING_1V1SETTING_SWITCH];
MJWeakSelf
// 每次操作开关都会实时请求服务器
[FUSLoadingView fus_showProgressViewWithMessage:@"" canTouchBottomView:NO];
[FUSSettingHttpRequest fus_setUserPrivateLiveSwitchState:sender.isOn success:^{
[FUSLoadingView fus_dismissProgressView];
// 如果是打开开关的情况
if (sender.isOn == YES) {
[FUSDialogView fus_showDialog:[NSString fus_localString:@"成功开通声视讯"]];
//TODO: 这里还有通知模块还没有迁移过来,太多了,后续看看如何迁移
// 权限检查,弹窗
// NSString *nID = FFNotificationcomeFromSoureView.soundVideo;
// [BFModule(PersonalPageService) showNotificationAlertTipsViewWithNID:nID parentView:[UIViewController topViewController].view title:[NSString localString:@"开启通知权限,可以帮助您提升接通率,增加通话收入"] name:nil imageUrl:nil actionBlock:nil];
[weakSelf fus_showNotificationTips];
} else{
[FUSAlertView showAlertWithTitle:[NSString fus_localString:@"关闭开关将无法接听声讯/视讯,如需要恢复接听功能,需要重新打开"] message:nil cancelButtonTitle:[NSString fus_localString:@"知道了"] otherButtonTitles:nil clickBlock:nil];
}
weakSelf.chatSelectedMaskView.hidden = sender.isOn;
weakSelf.configModel.videoSwitch = [NSNumber numberWithBool:sender.isOn].description;
} failure:^(NSString *errorMsg, int code) {
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:errorMsg];
// 还原开关的状态
sender.on = !sender.isOn;
}];
}
#pragma mark - method
-(void)ff_updataPriceList{
self.commissionRateTitleLabel.text = [NSString stringWithFormat:@"%@: ",self.priceModel.divideRatioTxt];
if (self.selectedPriceModel == nil) {
for (FUSPrivateLivePriceItemModel *price in _priceModel.priceList) {
if ([price.nexttips isEqualToString:self.configModel.callPrice]) {
self.selectedPriceModel = price;
} else if ([price.price isEqualToString:self.configModel.callPrice]) {
self.selectedPriceModel = price;
}
}
}
self.commissionRateLabel.text = [NSString stringWithFormat:@"%.00f%%",_priceModel.divideRatio * 100];
self.incomeDescLabel.attributedText = [NSAttributedString sj_UIKitText:^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
if (self.selectedPriceModel.price.integerValue > 0) {
make.append([NSString fus_versionLocalString:@"接听私房的语音或视讯通话,每分钟将获得"]);
make.appendImage(^(id<SJUTImageAttachment> _Nonnull make) {
make.image = [self.selectedPriceModel.income fus_getCurrencyIcon];
make.alignment = SJUTVerticalAlignmentCenter;
});
make.append([NSString stringWithFormat:@"%ld",self.selectedPriceModel.income.total]).textColor([self.selectedPriceModel.income fus_getCurrencyTextColor]);
}else {
make.append([NSString fus_versionLocalString:@"接听私房的语音或视讯通话,不获得宝石"]);
}
make.textColor([UIColor colorWithHex:@"#666666"]).font([UIFont fus_themeFont:12]);
}];
[self.collectionView reloadData];
}
-(void)fus_showNotificationTips{
if (@available(iOS 11.0, *)) {
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
if (settings.authorizationStatus != UNAuthorizationStatusAuthorized) {
BOOL shouldShowTip = [[[NSUserDefaults standardUserDefaults] objectForKey:FUSLiveUDKeys.fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP] boolValue];
if (shouldShowTip) {
// 只显示一次,主线程执行
dispatch_async(dispatch_get_main_queue(), ^{
[[NSUserDefaults standardUserDefaults] setObject:@(NO) forKey:FUSLiveUDKeys.fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP];
FUSRoomPushNoticeView *noticeView = [[FUSRoomPushNoticeView alloc] initWithXibFileWithShowType:FUSPushNoticeViewTypeOneToOneChatReceive goToSystemSettingVcBlock:^{
NSURL *pushSettingUrl = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:pushSettingUrl]) {
[[UIApplication sharedApplication] openURL:pushSettingUrl];
}
}];
[noticeView fus_showViewWithSuperView:[UIApplication sharedApplication].keyWindow];
});
}
} else {
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:FUSLiveUDKeys.fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP];
}
}];
} else {
if ([UIApplication sharedApplication].currentUserNotificationSettings.types == UIUserNotificationTypeNone) {
// 没有打开推送
BOOL shouldShowTip = [[[NSUserDefaults standardUserDefaults] objectForKey:FUSLiveUDKeys.fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP] boolValue];
if (shouldShowTip) {
// 只显示一次
[[NSUserDefaults standardUserDefaults] setObject:@(NO) forKey:FUSLiveUDKeys.fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP];
FUSRoomPushNoticeView *noticeView = [[FUSRoomPushNoticeView alloc] initWithXibFileWithShowType:FUSPushNoticeViewTypeOneToOneChatReceive goToSystemSettingVcBlock:^{
NSURL *pushSettingUrl = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:pushSettingUrl]) {
[[UIApplication sharedApplication] openURL:pushSettingUrl];
}
}];
[noticeView fus_showViewWithSuperView:[UIApplication sharedApplication].keyWindow];
}
} else {
[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:FUSLiveUDKeys.fus_SHOULD_ONE_TO_ONE_RECEIVE_NOTIFICATION_TIP];
}
}
}
#pragma mark - network
-(void)fus_loadDataSource{
[FUSLoadingView fus_showProgressViewWithMessage:@""];
// 先请求价格列表
[FUSSettingHttpRequest fus_onetoonePriceGetListSuccess:^(FUSOneToOnePriceGetListModel *model) {
[FUSLoadingView fus_dismissProgressView];
self.priceModel = model;
[self ff_updataPriceList];
} failure:^(NSString *msg, int code) {
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:msg];
}];
}
- (void)fus_clickAuthItem {
if ([FUSCacheDataShare shareStore].userDetailInfo.sex != 0) {
[FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"仅限女性用户申请"]];
return;
}
[FUSTalkingData fus_trackEvent:FUSUserEventTrackParams.fus_EVENT_ME_SETTING_1V1SETTING_OFFICIALCERTIFICATION];
// 未认证状态才可以点击
if ([self.configModel.videoAuthState intValue] == 2) {
[FUSAlertView showAlertWithTitle:[NSString fus_versionLocalString:@"重新认证将自动取消当前真人照片认证标签,確定重新认证吗?"] message:nil cancelButtonTitle:[NSString fus_localString:@"取消"] otherButtonTitles:@[[NSString fus_localString:@"确定"]] clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
FUSAuthFacePageOneViewController *authPageVC = [[FUSAuthFacePageOneViewController alloc] init];
[[UIViewController fus_topViewController].navigationController pushViewController:authPageVC animated:YES];
}
}];
} else if ([self.configModel.videoAuthState intValue] == 1) {
[FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"认证中,请耐心等候"]];
} else {
FUSAuthFacePageOneViewController *authPageVC = [[FUSAuthFacePageOneViewController alloc] init];
[[UIViewController fus_topViewController].navigationController pushViewController:authPageVC animated:YES];
}
}
#pragma mark - collection view delegate and datasource
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
if (self.priceModel.priceList.count == 3) {
return CGSizeMake((UIView.fus_screenW - 10*2 - 13*2)/3.0f - indexPath.row%2, 100);
}else {
return CGSizeMake(100, 110);
}
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.priceModel.priceList.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
FUSChatSettingPriceCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:[FUSChatSettingPriceCell cellIdentifer] forIndexPath:indexPath];
FUSPrivateLivePriceItemModel *price = self.priceModel.priceList[indexPath.row];
cell.layer.borderWidth = 0;
if ([price.pid isEqualToString:self.selectedPriceModel.pid]) {
cell.layer.borderWidth = 1;
}
cell.lockImageView.hidden = price.status;
if (price.price.integerValue > 0) {
// cell.priceLabel.text = [NSString stringWithFormat:@"%@%@",price.price,[NSString localString:@"宝石/分钟"]];
cell.priceLabel.attributedText = [NSAttributedString sj_UIKitText:^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
make.appendImage(^(id<SJUTImageAttachment> _Nonnull make) {
make.image = [UIImage fus_diamonIcon];
// make.bounds = CGRectMake(0, 0, 18, 18);
make.alignment = SJUTVerticalAlignmentCenter;
});
make.append(price.price).textColor([UIColor fus_themeColor]);
make.append([NSString stringWithFormat:@"/%@",[NSString fus_localString:@"分钟"]]).textColor([UIColor fus_textColorRich]);
make.font([UIFont fus_themeFont:15]).alignment(NSTextAlignmentCenter);
}];
} else {
cell.priceLabel.attributedText = [NSAttributedString sj_UIKitText:^(id<SJUIKitTextMakerProtocol> _Nonnull make) {
make.append([NSString fus_versionLocalString:@"免费"]).textColor([UIColor fus_textColorRich]);
make.font([UIFont fus_themeFont:15]).alignment(NSTextAlignmentCenter);
}];
}
__block BOOL showTips = NO;
[self.priceModel.priceList enumerateObjectsUsingBlock:^(FUSPrivateLivePriceItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.status == 0) {
showTips = YES;
*stop = YES;
}
}];
if (showTips) {
cell.priceLabelTop.constant = 22;
cell.nexttipsLabel.hidden = NO;
cell.nexttipsLabel.text = price.remark;
}else {
cell.priceLabelTop.constant = 38;
cell.nexttipsLabel.hidden = YES;
}
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
[FUSTalkingData fus_trackEvent:FUSUserEventTrackParams.fus_EVENT_ME_SETTING_1V1SETTING_PRICE];
// 通话过程中无法改价格
if (BFModule(FUSChatRouterProtocol).isCalling) {
[FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"您正在进行通话,结束后再来设置哦~"]];
return;
}
if (self.voiceSignModel.status == 0) {
[FUSAlertView showAlertWithTitle:[NSString fus_versionLocalString:@"私房价格"] message:[NSString fus_versionLocalString:@"个人资料正在审核中,请耐心等候"] cancelButtonTitle:nil otherButtonTitles:@[[NSString fus_versionLocalString:@"我知道了"]] clickBlock:^(NSInteger buttonIndex) {
}];
return;
}
FUSPrivateLivePriceItemModel *price = self.priceModel.priceList[indexPath.row];
MJWeakSelf
// 发起请求以
// 修改自己的视讯价格
[FUSLoadingView fus_showProgressViewWithMessage:@"" canTouchBottomView:YES];
[FUSSettingHttpRequest fus_oneToOnePriceSetWithPid:price.pid success:^(NSDictionary *dataDict) {
[FUSLoadingView fus_dismissProgressView];
// 更新当前选择的价格
weakSelf.selectedPriceModel = price;
[weakSelf ff_updataPriceList];
} failure:^(NSString *msg, int code) {
[FUSLoadingView fus_dismissProgressView];
if (code == -3021) {
if (weakSelf.configModel.videoAuthState.integerValue == 0) {
// 你還未通過認證,無法設置此價格
[FUSAlertView showAlertWithTitle:msg message:nil cancelButtonTitle:[NSString fus_localString:@"取消"] otherButtonTitles:@[[NSString fus_versionLocalString:@"去认证"]] clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
[weakSelf fus_clickAuthItem];
}
}];
} else if (weakSelf.configModel.videoAuthState.integerValue == 1) {
[FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"认证中,请耐心等候"]];
}
} else if (code == -3022) {
// 你還未開通VIP,無法設置此價格
[FUSAlertView showAlertWithTitle:msg message:nil cancelButtonTitle:[NSString fus_localString:@"取消"] otherButtonTitles:@[[NSString fus_versionLocalString:@"去开通"]] clickBlock:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
// FFVIPCenterController *vipVC = [[FFVIPCenterController alloc] initWithNibName:@"FFVIPCenterController" bundle:[PersonalPageBundle bundle]];
// [[UIViewController topViewController].navigationController pushViewController:vipVC animated:YES];
[FUSRouter.userRouter fus_pushToBuyVIPControllerWithAnimate:YES];
}
}];
}
else if (code == -3035) {
[FUSAlertView showAlertWithTitle:msg message:nil cancelButtonTitle:[NSString fus_localString:@"取消"] otherButtonTitles:@[[NSString fus_versionLocalString:@"确定"]] clickBlock:^(NSInteger buttonIndex) {
//TODO: 这里要写FFCompleteUserInfoViewController
// if (buttonIndex == 1) {
// FFCompleteUserInfoViewController *vc = [[FFCompleteUserInfoViewController alloc] init];
// [vc ff_setControllerTypeWithType:1];
// [[UIViewController topViewController].navigationController pushViewController:vc animated:YES];
// }
}];
}
else {
[FUSAlertView showAlertWithTitle:msg message:nil cancelButtonTitle:[NSString fus_versionLocalString:@"知道了"] otherButtonTitles:nil clickBlock:nil];
}
}];
}
#pragma mark - getter and setter
- (void)setConfigModel:(FUSPrivateLiveConfigModel *)configModel{
_configModel = configModel;
self.chatSwitch.on = configModel.videoSwitch;
self.chatSelectedMaskView.hidden = configModel.videoSwitch;
[self fus_loadDataSource];
}
+ (CGFloat)fus_viewHeight{
return 327;
}
@end
......@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
cell 的Nib对象
*/
+ (UINib *)cellNib;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceLabelTop;
@property (strong, nonatomic) IBOutlet UILabel *priceLabel;
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -31,7 +31,7 @@
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="setting_price_lock" translatesAutoresizingMaskIntoConstraints="NO" id="gJ0-X0-4m2">
<rect key="frame" x="0.0" y="0.0" width="357" height="215"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.60072951158940402" colorSpace="custom" customColorSpace="calibratedRGB"/>
</imageView>
</subviews>
</view>
......@@ -54,6 +54,7 @@
<outlet property="lockImageView" destination="gJ0-X0-4m2" id="MgX-wr-lIN"/>
<outlet property="nexttipsLabel" destination="uQV-Z1-wW6" id="OZF-Sa-B7B"/>
<outlet property="priceLabel" destination="Eck-0t-3tl" id="aUf-mv-2cQ"/>
<outlet property="priceLabelTop" destination="XXm-QD-fDV" id="wUQ-Sx-DsF"/>
</connections>
<point key="canvasLocation" x="221.01449275362322" y="180.46875"/>
</collectionViewCell>
......
......@@ -65,6 +65,18 @@ NS_ASSUME_NONNULL_BEGIN
// 获取用户信息
+ (NSString *)fus_URL_USER_INFO;
/// 校验是否已更新账号资料
+ (NSString *)fus_URL_OneToOneCheckQualification;
/// 获取语音签名信息及状态
+ (NSString *)fus_URL_userManagerVoiceSignGet;
/// 1对1私房价格选项列表
+ (NSString *)fus_URL_oneToOnePriceGetList;
/// 1对1私房设置价格
+ (NSString *)fus_URL_oneToOnePriceSet;
// 获取用户头像认证状态
+ (NSString *)fus_URL_USER_FACE_AUTH_STATUS;
......
......@@ -94,6 +94,22 @@
+ (NSString *)fus_URL_USER_INFO {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/sync/me.html"];
}
/// 校验是否已更新账号资料
+ (NSString *)fus_URL_OneToOneCheckQualification {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/onetoone/check/qualification"];
}
/// 获取语音签名信息及状态
+ (NSString *)fus_URL_userManagerVoiceSignGet {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/userManager/voice/sign/get"];
}
/// 1对1私房价格选项列表
+ (NSString *)fus_URL_oneToOnePriceGetList{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/onetoone/price/getList"];
}
/// 1对1私房设置价格
+ (NSString *)fus_URL_oneToOnePriceSet{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/onetoone/price/set"];
}
// 获取用户头像认证状态
+ (NSString *)fus_URL_USER_FACE_AUTH_STATUS {
......
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