提交
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#import "QXSingerSongListCell.h"
|
||||
#import "QXMineNetwork.h"
|
||||
|
||||
#import "QXCustomAlertView.h"
|
||||
@implementation QXSingerSongListCell
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
static NSString *cellId = @"QXSingerSongListCell";
|
||||
@@ -84,12 +84,18 @@
|
||||
self.bossLabel.text = [NSString stringWithFormat:@"老板:%@",model.boss_nickname];
|
||||
}
|
||||
- (IBAction)requestAction:(UIButton*)sender {
|
||||
|
||||
if ([sender.titleLabel.text isEqualToString:@"点歌"]) {
|
||||
[QXMineNetwork requestSongWithSongId:self.model.id roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"点歌成功");
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
QXCustomAlertView *alert = [[QXCustomAlertView alloc] init];
|
||||
NSString *message = [NSString stringWithFormat:@"您是否确认点歌\"%@\" \n演唱者:%@ \n礼物价值:%@金币",self.model.song_name,self.model.singer_nickname,self.model.gift_price];
|
||||
[alert showInView:KEYWINDOW title:@"温馨提示" message:message cancleTitle:@"取消" commitTitle:@"确定"];
|
||||
alert.commitBlock = ^{
|
||||
[QXMineNetwork requestSongWithSongId:self.model.id roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"点歌成功");
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
};
|
||||
}else{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork requestSongToTopWithId:self.model.id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
Reference in New Issue
Block a user