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
+18
View File
@@ -54,3 +54,21 @@ export async function getDownloadLogs(
return [];
}
}
/**
* 获取当前用户下载(打印)总数
*/
export async function getDownloadLogCount(): Promise<number> {
try {
await getUser();
const res = await wx.cloud.callFunction({
name: 'userDownloadLogs',
data: { action: 'count' },
});
const result = (res?.result as any) || {};
return result.code === 0 ? Number(result.data?.count || 0) : 0;
} catch (e) {
console.error('getDownloadLogCount failed', e);
return 0;
}
}