29944
This commit is contained in:
@@ -141,26 +141,33 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
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) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
if (!this.content) {
|
||||
return this.$u.toast('文本不能为空')
|
||||
|
||||
@@ -150,26 +150,33 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
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) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
if (!this.content) {
|
||||
return this.$u.toast('文本不能为空')
|
||||
|
||||
@@ -171,26 +171,33 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
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) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
if (!this.content) {
|
||||
return this.$u.toast('文本不能为空')
|
||||
|
||||
@@ -141,27 +141,33 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
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) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
value: res.data.url
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
if (!this.content) {
|
||||
return this.$u.toast('文本不能为空')
|
||||
|
||||
Reference in New Issue
Block a user