feat: 我的、设置、打印指南页面开发完成

This commit is contained in:
R524809
2026-05-07 16:32:49 +08:00
parent 0737c6165e
commit c732111e12
43 changed files with 1702 additions and 837 deletions
+8
View File
@@ -29,6 +29,8 @@ exports.main = async (event) => {
return await handleRemove(userId, event);
case 'list':
return await handleList(userId, event);
case 'count':
return await handleCount(userId);
case 'check':
return await handleCheck(userId, event);
case 'batchCheck':
@@ -153,6 +155,12 @@ async function handleList(userId, event) {
return { code: 0, data: result };
}
async function handleCount(userId) {
const collection = db.collection('favorites');
const res = await collection.where({ userId }).count();
return { code: 0, data: { count: res.total || 0 } };
}
async function handleCheck(userId, event) {
const { worksheetId } = event;
if (!worksheetId) return { code: -1, message: 'worksheetId 不能为空' };