[Vuejs]-How to build a Vue Axios service to return promise tree

2👍

Based on what you’ve posted, it would be:

UserService.login(loginJson).then(response => {
   // handle response...
}).catch(error => {
   // handle error...
})

You’ve already setup login to return the promise from axios, so just continue the chain.

Leave a comment