|
@@ -31,7 +31,7 @@ const actions = {
|
|
async utilMethod({ commit }, payload) {
|
|
async utilMethod({ commit }, payload) {
|
|
const res = await this.$axios.$post(`${api.util}`, payload);
|
|
const res = await this.$axios.$post(`${api.util}`, payload);
|
|
},
|
|
},
|
|
- async taskupload({ commit }, { file, uri }) {
|
|
|
|
|
|
+ async upload({ commit }, { file, uri }) {
|
|
// const res = await this.$axios.$post(`${api.taskupload}`, payload, null, { 'Content-Type': 'multipart/form-data' });
|
|
// const res = await this.$axios.$post(`${api.taskupload}`, payload, null, { 'Content-Type': 'multipart/form-data' });
|
|
let param = new FormData(); //创建form对象
|
|
let param = new FormData(); //创建form对象
|
|
param.append('file', file); //通过append向form对象添加数据
|
|
param.append('file', file); //通过append向form对象添加数据
|