import { api } from 'common/api'

api.apiName(params)
    .then(res => {
        /* ... */
    })
    .catch(error => {
        /* catch */
    })
    .finally(() => {
        /* finally */
    })


// 或者采用异步
async function foo() {
    try {
        const res = await api.apiName(params)
        /* ... */
    } catch (error) {
        /* catch */
    } finally {
        /* finally */
    }
}