feat: 3.5版本规划
This commit is contained in:
@@ -4,6 +4,7 @@ export interface DownloadLogRecord {
|
||||
_id: string;
|
||||
userId: string;
|
||||
worksheetId: string;
|
||||
exportId?: string;
|
||||
createdAt: string;
|
||||
worksheet?: {
|
||||
_id: string;
|
||||
@@ -22,13 +23,16 @@ export interface DownloadLogRecord {
|
||||
/**
|
||||
* 记录下载日志
|
||||
*/
|
||||
export async function addDownloadLog(worksheetId: string): Promise<boolean> {
|
||||
export async function addDownloadLog(
|
||||
worksheetId: string,
|
||||
exportId?: string,
|
||||
): Promise<boolean> {
|
||||
if (!worksheetId) return false;
|
||||
try {
|
||||
await getUser();
|
||||
const res = await wx.cloud.callFunction({
|
||||
name: 'userDownloadLogs',
|
||||
data: { action: 'add', worksheetId },
|
||||
data: { action: 'add', worksheetId, exportId },
|
||||
});
|
||||
const result = (res?.result as any) || {};
|
||||
return result.code === 0;
|
||||
|
||||
Reference in New Issue
Block a user