提交
This commit is contained in:
@@ -17,7 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UIButton *commitBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *closeBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIView *bgView;
|
||||
+(void)showInView:(UIView*)view;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *bodyPriceLabel;
|
||||
+(void)showInView:(UIView*)view currentBodyValue:(NSString*)currentBodyValue coin:(NSString*)coin bodyValue:(NSString*)bodyValue;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
@implementation QXBodyPriceRuleView
|
||||
|
||||
|
||||
+(void)showInView:(UIView*)view{
|
||||
+(void)showInView:(UIView *)view currentBodyValue:(NSString *)currentBodyValue coin:(NSString *)coin bodyValue:(NSString *)bodyValue{
|
||||
UINib *nib = [UINib nibWithNibName:@"QXBodyPriceRuleView" bundle:[NSBundle mainBundle]];
|
||||
QXBodyPriceRuleView *ruleView = [nib instantiateWithOwner:nil options:nil].firstObject;
|
||||
ruleView.frame = UIScreen.mainScreen.bounds;
|
||||
ruleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
ruleView.bgView.alpha = 0;
|
||||
ruleView.currentPriceLabel.text = currentBodyValue;
|
||||
ruleView.bodyPriceLabel.text = [NSString stringWithFormat:@"收礼身价,等于通过累计收礼的价值,每%@个金币等于%@身价",coin,bodyValue];
|
||||
[view addSubview:ruleView];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
ruleView.bgView.alpha = 1;
|
||||
@@ -23,6 +25,8 @@
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)closeAction:(id)sender {
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
self.bgView.alpha = 0;
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="16p-zb-VAB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="117" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="竞拍溢价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DfF-lh-oXh">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DfF-lh-oXh">
|
||||
<rect key="frame" x="34.333333333333343" y="4.3333333333333144" width="48" height="15"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.72549019607843135" green="0.57647058823529407" blue="0.11372549019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
@@ -251,7 +251,7 @@
|
||||
<constraint firstAttribute="height" constant="24" id="Oeu-V9-5eq"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签约竞拍次数越多,签约成交比签约时身价更高,则竞拍溢价就越高" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4h-lx-wJ4">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价,等于 通过累计收礼的价值,每1000个金币等于1身价" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4h-lx-wJ4">
|
||||
<rect key="frame" x="8" y="32" width="101" height="79"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.92941176470588238" green="0.66666666666666663" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
@@ -368,6 +368,7 @@
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="bgView" destination="bjS-Eu-Wht" id="7GC-AR-cpg"/>
|
||||
<outlet property="bodyPriceLabel" destination="M4h-lx-wJ4" id="jHS-JF-ix4"/>
|
||||
<outlet property="closeBtn" destination="ag3-iq-BzI" id="a0h-Fk-P2z"/>
|
||||
<outlet property="commitBtn" destination="PHh-tS-kNh" id="iOS-08-gnl"/>
|
||||
<outlet property="currentPriceLabel" destination="yoB-8g-xXJ" id="ZmR-gN-kho"/>
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
[weakSelf.delegate didClickOptionType:QXMainHeaderOptionTypeNobility];
|
||||
}
|
||||
}];
|
||||
self.nobilityBgView.hidden = YES;
|
||||
[self addSubview:self.nobilityBgView];
|
||||
|
||||
self.nobilityImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_nobility_bg"]];
|
||||
@@ -347,13 +348,17 @@
|
||||
}
|
||||
|
||||
-(void)reloadData{
|
||||
if ([self.toolsArray containsObject:self.rechargeModel]) {
|
||||
return;
|
||||
}
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
self.nobilityBgView.hidden = NO;
|
||||
if ([self.toolsArray containsObject:self.rechargeModel]) {
|
||||
return;
|
||||
}
|
||||
[self.toolsArray insertObject:self.rechargeModel atIndex:0];
|
||||
[self.collectionView reloadData];
|
||||
}else{
|
||||
self.nobilityBgView.hidden = YES;
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.toolsArray.count;
|
||||
@@ -410,6 +415,7 @@
|
||||
self.nameLabel.shimmerColor = [UIColor colorWithHexString:userModel.nickname_color];
|
||||
[self.nameLabel startShimmer];
|
||||
}else{
|
||||
self.nameLabel.shimmerColor = [UIColor clearColor];
|
||||
[self.nameLabel stopShimmer];
|
||||
}
|
||||
self.nameLabel.text = userModel.nickname;
|
||||
|
||||
@@ -43,6 +43,7 @@ typedef NS_ENUM(NSInteger) {
|
||||
@interface QXMineServiceCell : UITableViewCell
|
||||
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
|
||||
@property (nonatomic,assign)BOOL isMore;
|
||||
@property (nonatomic,assign)BOOL singerIsAuth;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
@property (nonatomic,strong)NSMutableArray *serviceArray;
|
||||
@property (nonatomic,strong)NSMutableArray *moreArray;
|
||||
@property (nonatomic,strong)QXServiceModel *inviteModel;
|
||||
@property (nonatomic,strong)QXServiceModel *singerAuthModel;
|
||||
@property (nonatomic,strong)QXServiceModel *songListModel;
|
||||
@end
|
||||
|
||||
@implementation QXMineServiceCell
|
||||
@@ -109,14 +111,40 @@
|
||||
self.titleLabel.text = isMore?@"更多":@"常用服务";
|
||||
if (isMore) {
|
||||
if ([self.moreArray containsObject:self.inviteModel]) {
|
||||
return;
|
||||
|
||||
}else{
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
[self.moreArray insertObject:self.inviteModel atIndex:1];
|
||||
}
|
||||
}
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
[self.moreArray insertObject:self.inviteModel atIndex:1];
|
||||
if (self.singerIsAuth) {
|
||||
if ([self.moreArray containsObject:self.singerAuthModel]) {
|
||||
[self.moreArray removeObject:self.singerAuthModel];
|
||||
}
|
||||
if ([self.moreArray containsObject:self.songListModel]) {
|
||||
|
||||
}else{
|
||||
NSInteger index = self.moreArray.count-1;
|
||||
[self.moreArray insertObject:self.songListModel atIndex:index];
|
||||
}
|
||||
}else{
|
||||
if ([self.moreArray containsObject:self.songListModel]) {
|
||||
[self.moreArray removeObject:self.songListModel];
|
||||
}
|
||||
if ([self.moreArray containsObject:self.singerAuthModel]) {
|
||||
|
||||
}else{
|
||||
NSInteger index = self.moreArray.count-1;
|
||||
[self.moreArray insertObject:self.singerAuthModel atIndex:index];
|
||||
}
|
||||
}
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
-(void)setSingerIsAuth:(BOOL)singerIsAuth{
|
||||
_singerIsAuth = singerIsAuth;
|
||||
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.isMore?self.moreArray.count:self.serviceArray.count;
|
||||
}
|
||||
@@ -160,22 +188,17 @@
|
||||
md3.icon = @"service_bag";
|
||||
md3.type = QXMineServiceTypeBackpack;
|
||||
|
||||
QXServiceModel *md4 = [[QXServiceModel alloc] init];
|
||||
md4.title = @"设置";
|
||||
md4.icon = @"service_setting";
|
||||
md4.type = QXMineServiceTypeSetting;
|
||||
|
||||
QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
||||
md5.title = @"家族";
|
||||
md5.icon = @"service_my_family";
|
||||
md5.type = QXMineServiceTypeFamily;
|
||||
QXServiceModel *md4 = [[QXServiceModel alloc] init];
|
||||
md4.title = @"家族";
|
||||
md4.icon = @"service_my_family";
|
||||
md4.type = QXMineServiceTypeFamily;
|
||||
|
||||
_serviceArray = [NSMutableArray arrayWithArray:@[
|
||||
md4,
|
||||
md1,
|
||||
md2,
|
||||
md3,
|
||||
md4,
|
||||
md5
|
||||
]];
|
||||
}
|
||||
return _serviceArray;
|
||||
@@ -202,23 +225,29 @@
|
||||
md4.icon = @"service_customer_service";
|
||||
md4.type = QXMineServiceTypeCustomerService;
|
||||
|
||||
QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
||||
md5.title = @"歌手认证";
|
||||
md5.icon = @"service_singer_auth";
|
||||
md5.type = QXMineServiceTypeSingerAuth;
|
||||
// QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
||||
// md5.title = @"歌手认证";
|
||||
// md5.icon = @"service_singer_auth";
|
||||
// md5.type = QXMineServiceTypeSingerAuth;
|
||||
//
|
||||
// QXServiceModel *md6 = [[QXServiceModel alloc] init];
|
||||
// md6.title = @"我的歌单";
|
||||
// md6.icon = @"service_songlist";
|
||||
// md6.type = QXMineServiceTypeSongList;
|
||||
|
||||
QXServiceModel *md6 = [[QXServiceModel alloc] init];
|
||||
md6.title = @"我的歌单";
|
||||
md6.icon = @"service_songlist";
|
||||
md6.type = QXMineServiceTypeSongList;
|
||||
QXServiceModel *md7 = [[QXServiceModel alloc] init];
|
||||
md7.title = @"设置";
|
||||
md7.icon = @"service_setting";
|
||||
md7.type = QXMineServiceTypeSetting;
|
||||
|
||||
_moreArray = [NSMutableArray arrayWithArray:@[
|
||||
md1,
|
||||
md2,
|
||||
md3,
|
||||
md4,
|
||||
md5,
|
||||
md6,
|
||||
// md5,
|
||||
// md6,
|
||||
md7
|
||||
]];
|
||||
}
|
||||
|
||||
@@ -233,6 +262,25 @@
|
||||
}
|
||||
return _inviteModel;
|
||||
}
|
||||
-(QXServiceModel *)singerAuthModel{
|
||||
if (!_singerAuthModel) {
|
||||
_singerAuthModel = [[QXServiceModel alloc] init];
|
||||
_singerAuthModel.title = @"歌手认证";
|
||||
_singerAuthModel.icon = @"service_singer_auth";
|
||||
_singerAuthModel.type = QXMineServiceTypeSingerAuth;
|
||||
}
|
||||
return _singerAuthModel;
|
||||
}
|
||||
|
||||
-(QXServiceModel *)songListModel{
|
||||
if (!_songListModel) {
|
||||
_songListModel = [[QXServiceModel alloc] init];
|
||||
_songListModel.title = @"我的歌单";
|
||||
_songListModel.icon = @"service_songlist";
|
||||
_songListModel.type = QXMineServiceTypeSongList;
|
||||
}
|
||||
return _songListModel;
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
self.dayLabel.text = [NSString stringWithFormat:@"剩余租期:%@",model.end_day];
|
||||
self.timesLabel.text = [NSString stringWithFormat:@"免费续约次数:%@",model.free_renewal];
|
||||
self.nameLabel.text = model.nickname;
|
||||
[self.todayPriceBtn setTitle:model.today_earnings forState:(UIControlStateNormal)];
|
||||
[self.yestodayPriceBtn setTitle:model.yesterday_earnings forState:(UIControlStateNormal)];
|
||||
[self.todayPriceBtn setTitle:[NSString stringWithFormat:@"%.4f",model.today_earnings.doubleValue] forState:(UIControlStateNormal)];
|
||||
[self.yestodayPriceBtn setTitle:[NSString stringWithFormat:@"%.4f",model.yesterday_earnings.doubleValue] forState:(UIControlStateNormal)];
|
||||
[self.priceBtn setTitle:model.market_value forState:(UIControlStateNormal)];
|
||||
self.onlineLabel.text = model.is_online==1?@"当前在线":@"当前离线";
|
||||
self.continueBtn.hidden = model.is_show_sign.intValue==1?NO:YES;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// Initialization code
|
||||
}
|
||||
- (IBAction)familyGroupAction:(id)sender {
|
||||
if (self.model.group_members_lists.count == 0) {
|
||||
if (![self.model.group_id isExist]) {
|
||||
showToast(@"家族群至少需要签约一位徒弟");
|
||||
}else{
|
||||
[[QXGlobal shareGlobal] chatWithFamilyGroupId:self.model.group_id cover:self.model.group_owner_info.avatar name:[NSString stringWithFormat:@"%@的家族",self.model.group_owner_info.nickname] navagationController:self.viewController.navigationController];
|
||||
@@ -38,11 +38,12 @@
|
||||
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.group_owner_info.nobility_image]];
|
||||
self.nameLabel.text = model.group_owner_info.nickname;
|
||||
self.IdLabel.text = [NSString stringWithFormat:@"ID:%@",model.group_owner_info.user_code];
|
||||
self.priceLabel.text = model.group_earnings;
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.4f",model.group_earnings.doubleValue];
|
||||
[self.timesBtn setTitle:[NSString stringWithFormat:@"签约次数:%@",model.group_members_num] forState:(UIControlStateNormal)];
|
||||
}
|
||||
- (IBAction)moreAction:(id)sender {
|
||||
QXFamilyPriceRecordViewController *vc = [[QXFamilyPriceRecordViewController alloc] init];
|
||||
vc.userId = self.model.user_id;
|
||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
-(void)setModel:(QXUserSongListModel *)model{
|
||||
_model = model;
|
||||
[self.giftImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
self.giftInfoLabel.text = [NSString stringWithFormat:@"x%@%@",model.gift_num,model.gift_name];
|
||||
self.giftInfoLabel.text = [NSString stringWithFormat:@"x%@ %@",model.gift_num,model.gift_name];
|
||||
self.songNameLabel.text = model.song_name;
|
||||
self.giftPriceLabel.text = model.gift_price;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="148" id="KGk-i7-Jjw" customClass="QXMineSongListCell">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="148" id="KGk-i7-Jjw" customClass="QXMineSongListCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="520" height="148"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
|
||||
@@ -33,6 +33,9 @@ typedef NS_ENUM(NSInteger, AudioRecorderState) {
|
||||
/// 录音进度更新
|
||||
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didUpdateProgress:(NSTimeInterval)progress totalDuration:(NSTimeInterval)totalDuration;
|
||||
|
||||
/// 开始认证
|
||||
-(void)didClickAuthWithFileUrl:(NSURL*)audioFileUrl;
|
||||
|
||||
@end
|
||||
|
||||
@interface QXAudioRecorderView : UIView
|
||||
|
||||
@@ -224,33 +224,24 @@
|
||||
|
||||
-(void)authAction{
|
||||
///去认证
|
||||
///去认证
|
||||
if ((int)self.totalDuration < 5) {
|
||||
showToast(@"录音时长不得小于60秒");
|
||||
NSInteger minSecond = 60;
|
||||
#if DEBUG
|
||||
minSecond = 5;
|
||||
# else
|
||||
minSecond = 60;
|
||||
#endif
|
||||
if ((int)self.totalDuration < minSecond) {
|
||||
NSString *toast = [NSString stringWithFormat:@"录音时长不得小于%ld秒",minSecond];
|
||||
showToast(toast);
|
||||
return;
|
||||
}
|
||||
if (self.originalAudioFileURL==nil) {
|
||||
showToast(@"录制文件不存在");
|
||||
return;
|
||||
}
|
||||
NSData *data = [NSData dataWithContentsOfURL:self.originalAudioFileURL];
|
||||
@weakify(self)
|
||||
showLoadingInView(self.viewController.view);
|
||||
[[QXCOSUploadManager shareManager] audioUploadFile:data withObjectKey:self.originalAudioFileURL.lastPathComponent complete:^(NSString * _Nonnull fileUrl, QXCOSUploadImageState state) {
|
||||
@strongify(self);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
hideLoadingInView(self.viewController.view);
|
||||
if ([fileUrl isExist]) {
|
||||
[QXMineNetwork singerAuthWithSong:fileUrl successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"上传成功");
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(@"上传失败");
|
||||
}];
|
||||
}else{
|
||||
showToast(@"上传失败");
|
||||
}
|
||||
});
|
||||
}];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickAuthWithFileUrl:)]) {
|
||||
[self.delegate didClickAuthWithFileUrl:self.originalAudioFileURL];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Gesture Handlers
|
||||
|
||||
Reference in New Issue
Block a user