语音vip限制ai弹窗
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#import "AiVM.h"
|
||||
#import "KBHUD.h"
|
||||
#import "KBChatLimitPopView.h"
|
||||
#import "KBVipPay.h"
|
||||
#import "KBPayMainVC.h"
|
||||
#import "KBUserSessionManager.h"
|
||||
#import "LSTPopView.h"
|
||||
#import "KBAIMessageVC.h"
|
||||
@@ -764,8 +764,9 @@ static NSString * const KBAISelectedPersonaIdKey = @"KBAISelectedPersonaId";
|
||||
[self.chatLimitPopView dismiss];
|
||||
}
|
||||
|
||||
CGFloat width = KB_SCREEN_WIDTH - 60;
|
||||
KBChatLimitPopView *content = [[KBChatLimitPopView alloc] initWithFrame:CGRectMake(0, 0, width, 180)];
|
||||
CGFloat width = 252.0;
|
||||
CGFloat height = 252.0 + 18.0 + 53.0 + 18.0 + 28.0;
|
||||
KBChatLimitPopView *content = [[KBChatLimitPopView alloc] initWithFrame:CGRectMake(0, 0, width, height)];
|
||||
content.message = message;
|
||||
content.delegate = self;
|
||||
|
||||
@@ -841,7 +842,8 @@ static NSString * const KBAISelectedPersonaIdKey = @"KBAISelectedPersonaId";
|
||||
[[KBUserSessionManager shared] goLoginVC];
|
||||
return;
|
||||
}
|
||||
KBVipPay *vc = [[KBVipPay alloc] init];
|
||||
KBPayMainVC *vc = [[KBPayMainVC alloc] init];
|
||||
vc.initialSelectedIndex = 1; // SVIP
|
||||
[KB_CURRENT_NAV pushViewController:vc animated:true];
|
||||
}
|
||||
|
||||
@@ -1051,8 +1053,21 @@ static NSString * const KBAISelectedPersonaIdKey = @"KBAISelectedPersonaId";
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
KBPersonaChatCell *cell = [strongSelf currentPersonaCell];
|
||||
|
||||
// 处理次数用尽(与聊天接口保持一致)
|
||||
if (error) {
|
||||
NSInteger bizCode = [error.userInfo[@"code"] integerValue];
|
||||
NSString *messageError = error.localizedDescription;
|
||||
if (bizCode == 50030) {
|
||||
if (cell) {
|
||||
[cell removeLoadingUserMessage];
|
||||
}
|
||||
NSString *message = messageError ?: @"";
|
||||
strongSelf.isVoiceProcessing = NO;
|
||||
[strongSelf updateCollectionViewScrollState];
|
||||
[strongSelf showChatLimitPopWithMessage:message];
|
||||
return;
|
||||
}
|
||||
|
||||
NSLog(@"[KBAIHomeVC] 语音转文字失败:%@", error.localizedDescription);
|
||||
[KBHUD showError:KBLocalized(@"语音转文字失败,请重试")];
|
||||
if (cell) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#import "KBAiRecordButton.h"
|
||||
#import "KBHUD.h"
|
||||
#import "KBChatLimitPopView.h"
|
||||
#import "KBVipPay.h"
|
||||
#import "KBPayMainVC.h"
|
||||
#import "LSTPopView.h"
|
||||
#import "VoiceChatStreamingManager.h"
|
||||
#import "KBUserSessionManager.h"
|
||||
@@ -430,9 +430,10 @@
|
||||
[self.limitPopView dismiss];
|
||||
}
|
||||
|
||||
CGFloat width = KB_SCREEN_WIDTH - 60;
|
||||
CGFloat width = 252.0;
|
||||
CGFloat height = 252.0 + 18.0 + 53.0 + 18.0 + 28.0;
|
||||
KBChatLimitPopView *content =
|
||||
[[KBChatLimitPopView alloc] initWithFrame:CGRectMake(0, 0, width, 180)];
|
||||
[[KBChatLimitPopView alloc] initWithFrame:CGRectMake(0, 0, width, height)];
|
||||
content.message = message;
|
||||
content.delegate = self;
|
||||
|
||||
@@ -461,7 +462,8 @@
|
||||
[[KBUserSessionManager shared] goLoginVC];
|
||||
return;
|
||||
}
|
||||
KBVipPay *vc = [[KBVipPay alloc] init];
|
||||
KBPayMainVC *vc = [[KBPayMainVC alloc] init];
|
||||
vc.initialSelectedIndex = 1; // SVIP
|
||||
[KB_CURRENT_NAV pushViewController:vc animated:true];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user