Home > Web Front-end > JS Tutorial > About vue2.0 setting proxyTable to use axios for cross-domain requests

About vue2.0 setting proxyTable to use axios for cross-domain requests

小云云
Release: 2018-01-05 17:41:41
Original
4407 people have browsed it

This article mainly introduces vue2.0 to set up proxyTable to use axios for cross-domain requests. The editor thinks it is quite good, so I will share it with you now and give it as a reference. Let’s follow the editor to take a look, I hope it can help everyone.

What we request here is the API of Zhihu Daily, provided by @izzyleung. This is the github address.

In the project built by vue-cli, install axios first


npm install axios -S
Copy after login

The method of encapsulation with vuex is not considered here for the time being, but only directly in the current component use.

First introduce in

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template