uploadImg(obj) {
const that = this
GetFormParams({ uploadType: 'DDemand' }).then(res => {
this.fileList.signature = res.signature
this.fileList.policy = res.policy
this.fileList.file = obj.file
const param = new FormData() // 创建form对象
param.append('file', obj.file)
param.append('policy', res.policy)
param.append('signature', res.signature)
const config = {
headers: { 'Content-Type': 'multipart/form-data' }
} // 添加请求头
axios.post(obj.action, param, config)// 上传图片
.then(function(response) {
console.log('又拍云结果', response, res.ImageZone + response.data.url)
const obj = {
ImageWidth: 0,
ImageHeigh: 0
}
obj.ImageUrl = res.ImageZone + response.data.url
})
.catch(function(error) {
console.log(error)
})
}).catch(e => {
console.log('e', e)
})
},