解决 eps 解析异常

This commit is contained in:
icssoa 2022-05-16 20:56:45 +08:00
parent bc30b0d891
commit e622e50f22

View File

@ -92,13 +92,16 @@ export function useEps(service: Service) {
// 设置 // 设置
async function set(d: any, c?: boolean) { async function set(d: any, c?: boolean) {
// 接口列表
const list: any[] = []; const list: any[] = [];
if (!d) { if (!d) {
return false; return false;
} }
if (isArray(d)) {
d = { d };
}
for (const i in d) { for (const i in d) {
if (isArray(d[i])) { if (isArray(d[i])) {
d[i].forEach((e: any) => { d[i].forEach((e: any) => {
@ -200,7 +203,7 @@ export function useEps(service: Service) {
}; };
}); });
set({ eps }); set(eps);
} catch (err) { } catch (err) {
console.error("[Eps] 解析失败!", err); console.error("[Eps] 解析失败!", err);
} }