This commit is contained in:
yanran200730
2022-06-02 14:49:05 +08:00
parent cac2023ed4
commit 75832e6b0a
4 changed files with 20 additions and 76 deletions

View File

@@ -154,26 +154,12 @@
count: 9,
sizeType: ['compressed'],
success: res => {
res.tempFiles.forEach(v => {
this.upload(v)
})
}
})
},
upload (img) {
let formData = new FormData()
formData.append('file', img)
this.$loading()
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
if (res.code === 0) {
res.tempFilePaths.forEach(v => {
this.richList.push({
type: 'img',
value: res.data.url
value: v
})
})
} else {
this.$u.toast(res.msg)
}
})
},

View File

@@ -163,26 +163,12 @@
count: 9,
sizeType: ['compressed'],
success: res => {
res.tempFiles.forEach(v => {
this.upload(v)
})
}
})
},
upload (img) {
let formData = new FormData()
formData.append('file', img)
this.$loading()
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
if (res.code === 0) {
res.tempFilePaths.forEach(v => {
this.richList.push({
type: 'img',
value: res.data.url
value: v
})
})
} else {
this.$u.toast(res.msg)
}
})
},

View File

@@ -184,26 +184,12 @@
count: 9,
sizeType: ['compressed'],
success: res => {
res.tempFiles.forEach(v => {
this.upload(v)
})
}
})
},
upload (img) {
let formData = new FormData()
formData.append('file', img)
this.$loading()
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
if (res.code === 0) {
res.tempFilePaths.forEach(v => {
this.richList.push({
type: 'img',
value: res.data.url
value: v
})
})
} else {
this.$u.toast(res.msg)
}
})
},

View File

@@ -154,26 +154,12 @@
count: 9,
sizeType: ['compressed'],
success: res => {
res.tempFiles.forEach(v => {
this.upload(v)
})
}
})
},
upload (img) {
let formData = new FormData()
formData.append('file', img)
this.$loading()
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
if (res.code === 0) {
res.tempFilePaths.forEach(v => {
this.richList.push({
type: 'img',
value: res.data.url
value: v
})
})
} else {
this.$u.toast(res.msg)
}
})
},