sa2kit 1.6.106 → 1.6.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15882,9 +15882,9 @@ var UniversalExportClient = class {
15882
15882
  };
15883
15883
  if (typeof request.configId === "string") {
15884
15884
  requestBody.configId = request.configId;
15885
- } else {
15885
+ } else if (request.configId && typeof request.configId === "object") {
15886
15886
  requestBody.config = request.configId;
15887
- if (request.configId?.id) {
15887
+ if (request.configId.id) {
15888
15888
  requestBody.configId = request.configId.id;
15889
15889
  }
15890
15890
  }
@@ -16033,7 +16033,10 @@ var UniversalExportClient = class {
16033
16033
  * 转换API返回的导出结果
16034
16034
  */
16035
16035
  transformExportResultFromAPI(apiResult) {
16036
- const fileBlob = this.createFileBlobFromBase64(apiResult.fileData, apiResult.fileName);
16036
+ const fileBlob = this.createFileBlobFromBase64(
16037
+ apiResult.fileData ?? apiResult.fileBlob,
16038
+ apiResult.fileName
16039
+ );
16037
16040
  return {
16038
16041
  exportId: apiResult.exportId,
16039
16042
  fileName: apiResult.fileName,
@@ -16837,10 +16840,10 @@ var BookingAdminPanel = ({
16837
16840
  "Content-Type": "application/json"
16838
16841
  },
16839
16842
  body: JSON.stringify({
16843
+ configId: exportConfig.id,
16840
16844
  config: exportConfig,
16841
16845
  data: exportData,
16842
16846
  customFileName: `\u9884\u8BA2\u4FE1\u606F_${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}${enableUserPriceCalculation ? "_\u542B\u7528\u6237\u603B\u4EF7" : ""}`,
16843
- // 不传递分页参数,避免导出时被分页限制
16844
16847
  pagination: void 0
16845
16848
  })
16846
16849
  });
@@ -16849,10 +16852,11 @@ var BookingAdminPanel = ({
16849
16852
  throw new Error(errorData.error || `\u5BFC\u51FA\u5931\u8D25: ${response.statusText}`);
16850
16853
  }
16851
16854
  const responseData = await response.json();
16852
- if (responseData.result && responseData.result.fileData) {
16855
+ const base64Payload = responseData.result?.fileData ?? responseData.result?.fileBlob;
16856
+ if (responseData.result && base64Payload) {
16853
16857
  console.log("\u{1F4C1} [BookingAdminPanel] \u68C0\u6D4B\u5230\u6587\u4EF6\u6570\u636E\uFF0C\u5F00\u59CB\u4E0B\u8F7D");
16854
- const { fileData, fileName } = responseData.result;
16855
- const binaryString = atob(fileData);
16858
+ const { fileName } = responseData.result;
16859
+ const binaryString = atob(base64Payload);
16856
16860
  const bytes = new Uint8Array(binaryString.length);
16857
16861
  for (let i = 0; i < binaryString.length; i++) {
16858
16862
  bytes[i] = binaryString.charCodeAt(i);