const storageMap = {
0: 'list1',
1: 'list2',
2: 'list3'
}
for (const type of ['0', '1', '2']) {
let res = await api().catch(err => err)
// res = { info: [] }
sessionStorage.setItem(storageMap[type], JSON.stringify(res.info))
}