axios优化无论是then或catch都会执行的代码(finally)/es7-es12新特性
Promise.prototype.finally()
new Promise((resolve, reject) => { setTimeout(() => { resolve('success') // reject('fail') }, 1000) }).then(res => { console.log(res) }).catch(err => { console.log(err) }).finally(() => { console.log('finally') })

浙公网安备 33010602011771号