vuejs2 - vue js get函数不起作用但post正在工作
问题描述
我正在尝试使用来自 vue 组件的 axios 发送获取请求。但是我无法从服务器获得任何响应。当我使用post方法时工作正常。
created:function(){
let Uri = process.env.VUE_APP_URL +'/apiF/customer/myOrders';
this.axios.get(Uri).then((response) => {
this.order_details = response.data
}).catch(error => {
this.errors_exist=true;
if (error.response.status == 422){
this.errors = error.response.data.errors;
}
})
},
解决方案
推荐阅读
- jquery - 加载内容后如何停止无限滚动
- windows - 如何在 Windows 上将可执行文件添加到 AWS Lambda .jar?
- postgresql - 如何在羽毛/反对 ORM 中查询 jsonb (postgtresql)?
- python - 如何基于 2 列从另一个数据框中获取数据
- linux - 从 Virtualbox 运行 awk 脚本时遇到困难
- encryption - 这是什么编码/加密方法?一系列 4 位数字
- android - 如何将 jadx 保存的项目转换为 APK?
- haskell-stack - Haskell 模块和数据
- c++ - 如何更改 char 的值?
- java - 编写一个程序,从键盘读取字符,直到它读取换行符 '\n'