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
@@ -27,6 +27,8 @@ exports.main = async (event) => {
return await handleAdd(userId, event);
case 'list':
return await handleList(userId, event);
case 'count':
return await handleCount(userId);
default:
return { code: -1, message: '未知操作' };
}
@@ -96,3 +98,9 @@ async function handleList(userId, event) {
return { code: 0, data: result };
}
async function handleCount(userId) {
const collection = db.collection('download_logs');
const res = await collection.where({ userId }).count();
return { code: 0, data: { count: res.total || 0 } };
}