feat: 个人中心支持我的作品、草稿箱、创作者统计
This commit is contained in:
@@ -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 [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user