//改造前:

function getData(){
axios(url).then().catch().finally()
}

//改造后:
let data = function(){}
let error= function(){}
let end= function(){}

async function getData(){
try{
let ans = await axios(url)
data(ans)
}catch(e){
error(e)
}
end()
}