Commit 8bead5a4 authored by xinzhedeai's avatar xinzhedeai

图片上传方法添加

parent 2d0fbb0d
...@@ -40,5 +40,5 @@ ...@@ -40,5 +40,5 @@
.list-function-btn-wrapper { .list-function-btn-wrapper {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
padding-right: 0.02rem; padding-right: 0.18rem;
} }
\ No newline at end of file
...@@ -123,6 +123,30 @@ var http = { ...@@ -123,6 +123,30 @@ var http = {
}) })
}) })
}, },
postFile: function(url, params) {
return new Promise((resolve, reject) => {
axios({
url,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json', // 'multipart/form-data;',
'Authorization': localStorage.getItem('Authorization')
},
}).then(res => {
let response = res.data
console.log('res.statusCode', response)
if(response.statusCode >= 300){
// alert('系统发生错误')
return
}
resolve(res.data)
})
.catch(err => {
reject(err.data)
})
})
},
downloadFile: function(url, params) { downloadFile: function(url, params) {
console.log('downloadfILE',params) console.log('downloadfILE',params)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
......
...@@ -11,13 +11,6 @@ ...@@ -11,13 +11,6 @@
html, body{ html, body{
background-color: #fff; background-color: #fff;
} }
.content{
}
.pd-01rem{
padding-bottom: 0.1rem;
}
/* 表单相关 */ /* 表单相关 */
.formValue{ .formValue{
float: right; float: right;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment