语音vip限制ai弹窗

This commit is contained in:
2026-02-04 20:23:20 +08:00
parent dd59094a16
commit b73f225d15
15 changed files with 164 additions and 98 deletions

View File

@@ -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) {