test
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
mol
2023-12-14 13:39:26 +08:00
parent 4242665b7a
commit 23d56963e4

View File

@ -16,7 +16,17 @@ function parser() {
return j();
}
logger('食谱加载成功');
recipeData = data;
const keys = data.shift()
console.log(keys)
recipeData = data.map(d => {
const res = {}
keys.forEach((key, index) => {
if (key) {
res[key] = d[index]
}
})
return res
});
loaded = true;
r(recipeData);
});
@ -31,3 +41,7 @@ export default async function getDb() {
return recipeData;
}
}
getDb().then((res) => {
console.log(recipeData)
})