async function initCanvas(ids) {
var canvasname = [];
if (parent.WWOpenData.initCanvas) {
parent.WWOpenData.initCanvas();
}
if (parent.WWOpenData.prefetch) {
var items = [];
$.each(ids, function (index, item) {
items.push({ type: 'userName', id: item });
});
const result = await new Promise((resolve, reject) => {
parent.WWOpenData.prefetch({ items }, (err, data) => {
if (err) {
return reject(err);
}
resolve(data);
})
});
// 拿到渲染数据
result.items.map((v) => {
canvasname.push(v.data);
});
}
return canvasname;
}
请问是什么问题