---完善活动告警
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user