Before using AXIos, you typically wrap axios into a class library.

1. Wrap AXIos as ajaxRequest.js

In the SRC directory, create a utils or libs directory to store the normally wrapped utility libraries.

--src
    --utils
        --ajaxRequest.js
Copy the code

2. Use ajaxRequest. Js

3. Call from Vuex actions or component

4. Stratification of Vuex