|
|
@@ -607,5 +607,21 @@ export async function handleExportRequest(tokenData: string) {
|
|
|
success: false,
|
|
|
error: errorMessage
|
|
|
};
|
|
|
+ } finally {
|
|
|
+ // 无论导出成功或失败,都执行注销操作
|
|
|
+ try {
|
|
|
+ console.log('导出处理完成,执行注销操作...');
|
|
|
+ // 延迟注销,给前端一点时间处理返回结果
|
|
|
+ setTimeout(async() => {
|
|
|
+ try {
|
|
|
+ await rootScope.managers.apiManager.logOut();
|
|
|
+ console.log('注销成功完成');
|
|
|
+ } catch(logoutError) {
|
|
|
+ console.error('注销失败:', logoutError);
|
|
|
+ }
|
|
|
+ }, 5000); // 5秒延迟,确保前端有足够时间处理导出结果和下载文件
|
|
|
+ } catch(e) {
|
|
|
+ console.error('设置注销延迟失败:', e);
|
|
|
+ }
|
|
|
}
|
|
|
}
|