feat: 完成全部接口替换为新后端接口

This commit is contained in:
R524809
2026-10-19 13:19:07 +08:00
parent 8de06ce66b
commit 997042789d
40 changed files with 1946 additions and 785 deletions
+10 -2
View File
@@ -1,3 +1,4 @@
import { getCachedUser } from './auth';
/**
* 下载打印通用工具
* 支持下载次数限制和激励广告
@@ -67,7 +68,9 @@ function showVideoAd(): Promise<boolean> {
mask: true,
});
const onClose: WechatMiniprogram.RewardedVideoAdOnCloseCallback = (res) => {
const onClose: WechatMiniprogram.RewardedVideoAdOnCloseCallback = (
res,
) => {
videoAd.offClose(onClose);
wx.hideLoading();
resolve(!!(res && res.isEnded));
@@ -137,6 +140,7 @@ function doDownload(
},
): Promise<boolean> {
const exportId = generateUUID();
const expectedUserId = getCachedUser()?.id;
const trackerPage = options.trackerPage || options.trackerName || '';
const trackerParams = {
export_id: exportId,
@@ -154,7 +158,11 @@ function doDownload(
recordDownloadSuccess();
tracker.reportExportResult(trackerPage, true, trackerParams);
if (options.worksheetId) {
await addDownloadLog(options.worksheetId, exportId);
await addDownloadLog(
options.worksheetId,
exportId,
expectedUserId,
);
}
} else {
tracker.reportExportResult(trackerPage, false, trackerParams);