---完善活动告警

This commit is contained in:
lai
2023-09-27 20:48:38 +08:00
parent 35ca8e2fe7
commit 72313018cb
6 changed files with 737 additions and 73 deletions

View File

@@ -20,7 +20,11 @@ export const xlsxUrl = `${
* });
*/
export async function readLoalXlsx(id: string): Promise<Record<string, any>[]> {
const fileBolb = await (await fetch(`${xlsxUrl}/${id}.xlsx`)).arrayBuffer();
let fileBolb = await (await fetch(`${xlsxUrl}/${id}.xlsx`)).arrayBuffer();
console.log(fileBolb.byteLength)
if(!fileBolb.byteLength){
fileBolb = await (await fetch(`${xlsxUrl}/all.xlsx`)).arrayBuffer();
}
return readSheet(fileBolb, 0);
}