Commit c2bcafdc authored by wanglianghe's avatar wanglianghe

上传文件路径fix

parent 5f7df710
...@@ -326,7 +326,7 @@ export default { ...@@ -326,7 +326,7 @@ export default {
//上传 //上传
let formData = new FormData(); let formData = new FormData();
formData.append("file", file); formData.append("file", file);
formData.append("path", this.uuid()); // formData.append("path", this.uuid());
uploadFile(formData).then(response => { uploadFile(formData).then(response => {
this.$set(this.form, 'bannerUrlWeb', response.data); this.$set(this.form, 'bannerUrlWeb', response.data);
// this.form.img = response.data; // this.form.img = response.data;
...@@ -342,7 +342,7 @@ export default { ...@@ -342,7 +342,7 @@ export default {
//上传 //上传
let formData = new FormData(); let formData = new FormData();
formData.append("file", file); formData.append("file", file);
formData.append("path", this.uuid()); // formData.append("path", this.uuid());
uploadFile(formData).then(response => { uploadFile(formData).then(response => {
this.$set(this.form, 'bannerUrlApp', response.data); this.$set(this.form, 'bannerUrlApp', response.data);
// this.form.img = response.data; // this.form.img = response.data;
......
...@@ -601,7 +601,7 @@ export default { ...@@ -601,7 +601,7 @@ export default {
//上传 //上传
let formData = new FormData(); let formData = new FormData();
formData.append("file", file); formData.append("file", file);
formData.append("path", this.uuid()); // formData.append("path", this.uuid());
uploadFile(formData).then(response => { uploadFile(formData).then(response => {
this.$set(this.form, 'imgs', response.data); this.$set(this.form, 'imgs', response.data);
// this.form.img = response.data; // this.form.img = response.data;
......
...@@ -811,7 +811,7 @@ export default { ...@@ -811,7 +811,7 @@ export default {
//上传 //上传
let formData = new FormData(); let formData = new FormData();
formData.append("file", file); formData.append("file", file);
formData.append("path", this.uuid()); // formData.append("path", this.uuid());
uploadFile(formData).then(response => { uploadFile(formData).then(response => {
this.$set(this.form, 'img', response.data); this.$set(this.form, 'img', response.data);
// this.form.img = response.data; // this.form.img = response.data;
......
...@@ -324,7 +324,7 @@ export default { ...@@ -324,7 +324,7 @@ export default {
/** 处理上传的文件发生变化 */ /** 处理上传的文件发生变化 */
handleFileChange(file, fileList) { handleFileChange(file, fileList) {
this.upload.data.path = this.uuid() + "/" + file.name; // this.upload.data.path = this.uuid() + "/" + file.name;
}, },
/** 文件上传成功处理 */ /** 文件上传成功处理 */
...@@ -355,7 +355,7 @@ export default { ...@@ -355,7 +355,7 @@ export default {
let formData = new FormData(); let formData = new FormData();
// console.log(file); // console.log(file);
formData.append("file", file); formData.append("file", file);
formData.append("path", this.uuid() + "/" + file.name); // formData.append("path", this.uuid() + "/" + file.name);
uploadFile(formData).then(response => { uploadFile(formData).then(response => {
this.$set(this.form, 'appUrl', response.data); this.$set(this.form, 'appUrl', response.data);
// this.form.img = response.data; // this.form.img = response.data;
......
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