This commit is contained in:
Pan
2017-04-20 14:32:41 +08:00
parent 7bedb8610c
commit 6eca8e4751
17 changed files with 325 additions and 341 deletions

View File

@@ -57,17 +57,20 @@
}
},
accept: (file, done) => {
const token = this.$store.getters.token;
getToken(token).then(response => {
file.token = response.data.qiniu_token;
file.key = response.data.qiniu_key;
file.url = response.data.qiniu_url;
done();
})
/* 七牛*/
// const token = this.$store.getters.token;
// getToken(token).then(response => {
// file.token = response.data.qiniu_token;
// file.key = response.data.qiniu_key;
// file.url = response.data.qiniu_url;
// done();
// })
done();
},
sending: (file, xhr, formData) => {
formData.append('token', file.token);
formData.append('key', file.key);
/* 七牛*/
// formData.append('token', file.token);
// formData.append('key', file.key);
vm.initOnce = false;
}
});