async function fun(array){
    const promise = array.map(v => {
        return new Promise((resolve,reject) => {
                        // 处理每个请求不同参数
                        let params = new FormData();
                        params.name = v;
            aiName(params).then(res=>resolve(res)).catch(err=>reject(err))
        })) 
    })
    const {data}  = await Promise.all(promise);
    if (data) console.log(data) ;
} 

const datas = ['小明','小红','小李'];

fun(datas);