feat: 个人中心支持我的作品、草稿箱、创作者统计

This commit is contained in:
2026-03-03 17:21:53 +08:00
parent 2cca60b0d8
commit 5baa95f514
2 changed files with 424 additions and 181 deletions

View File

@@ -167,4 +167,28 @@ export default class UserManager {
return { daily: 3, used: 0, purchased: 0 };
}
}
/**
* 获取我的作品
*/
async getMyWorks() {
if (!this.isLoggedIn) return [];
try {
return await get('/user/my-works', { userId: this.userId });
} catch (e) {
return [];
}
}
/**
* 获取草稿箱
*/
async getDrafts() {
if (!this.isLoggedIn) return [];
try {
return await get('/user/drafts', { userId: this.userId });
} catch (e) {
return [];
}
}
}