feat: 新增AI创作中心场景,支持改写/续写/创作
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user