---告警帮助文档中英文
This commit is contained in:
@@ -19,8 +19,8 @@ export const xlsxUrl = `${
|
||||
* console.log(res)
|
||||
* });
|
||||
*/
|
||||
export async function readLoalXlsx(id: string): Promise<Record<string, any>[]> {
|
||||
let result = await fetch(`${xlsxUrl}/${id}.xlsx`);
|
||||
export async function readLoalXlsx(lang:string,id: string): Promise<Record<string, any>[]> {
|
||||
let result = await fetch(`${xlsxUrl}/${lang}/${id}.xlsx`);
|
||||
let fileBuffer = await result.arrayBuffer();
|
||||
// 判断是否xlsx文件
|
||||
const data = new Uint8Array(fileBuffer);
|
||||
@@ -30,7 +30,7 @@ export async function readLoalXlsx(id: string): Promise<Record<string, any>[]> {
|
||||
data[2] === 0x03 &&
|
||||
data[3] === 0x04;
|
||||
if (!isXlsxFile) {
|
||||
result = await fetch(`${xlsxUrl}/all.xlsx`);
|
||||
result = await fetch(`${xlsxUrl}/${lang}/all.xlsx`);
|
||||
fileBuffer = await result.arrayBuffer();
|
||||
}
|
||||
return readSheet(fileBuffer, 0);
|
||||
|
||||
Reference in New Issue
Block a user