+
95
-

vue中如何使用axios进行ajax拦截数据?

vue
vue中如何使用axios进行ajax拦截数据?

网友回复

+
15
-

axios设置一下就好了

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>BFW NEW PAGE</title>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/axios-0.18.js"></script>
    <script type="text/javascript" charset="utf-8">
        const axiosInstance = axios.create({
            timeout: 2000,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded',
                'X-Requested-With': 'XMLHttpReque...

点击查看剩余70%

我知道答案,我要回答