feat: 新增AI创作中心场景,支持改写/续写/创作

This commit is contained in:
2026-03-03 17:06:08 +08:00
parent cc0e39cccc
commit 699362cc7d
6 changed files with 1290 additions and 1 deletions

View File

@@ -131,4 +131,40 @@ export default class UserManager {
if (!this.isLoggedIn) return [];
return await get('/user/collections', { userId: this.userId });
}
/**
* 获取最近游玩的故事
*/
async getRecentPlayed() {
if (!this.isLoggedIn) return [];
try {
return await get('/user/recent-played', { userId: this.userId, limit: 10 });
} catch (e) {
return [];
}
}
/**
* 获取AI创作历史
*/
async getAIHistory() {
if (!this.isLoggedIn) return [];
try {
return await get('/user/ai-history', { userId: this.userId, limit: 20 });
} catch (e) {
return [];
}
}
/**
* 获取AI配额
*/
async getAIQuota() {
if (!this.isLoggedIn) return { daily: 3, used: 0, purchased: 0 };
try {
return await get('/user/ai-quota', { userId: this.userId });
} catch (e) {
return { daily: 3, used: 0, purchased: 0 };
}
}
}