DOME
接口
const userUploadAtt = (File,config) => axios.post("接口",File,config)
处理数据
let input = this.$refs.upload
创建一个空的FormData对象
let data = new FormData();
使用FormData.append来添加键/值对到表单里面;
data.append('file', input.files[0]);
upload(){
userUploa
vue-resource不再维护之后,我也用起了axios,但是死活无法设置服务器发送过来的cookie
后来查询文档发现,这个是要单独配置的。
// `withCredentials` indicates whether or not cross-site Access-Control requests
// should be made using credentials
withCredentials: false, // default
当我们把此配置项设置成默认配置项并且设置成tr