Closed 451729494 closed 6 years ago
可以直接使用jQuery的$.post发送请求,如果使用axios,可以去看下文档 https://github.com/axios/axios
@/utils/fetch可以调用吗?
需要先安装axios才能使用 安装axios: npm install axios --save
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
下了 @/utils/fetch @/utils/http 是不是都得引入
@/utils/fetch @/utils/http在main,js里面引入就可以了,你看一下,有的可能是在里面进行了二次封装 src/utils下的公用方法调用 例如:你写了一个 util.number=funtion(){}方法,在.vue里面引入util.js,然后调用方法的时候写成util.number(你的值)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
现在前端已经可以独立跑起来了,我看了源码,你对axios进行了一层封装,怎么才能调用到你封装的axios实现请求后台