29944
This commit is contained in:
@@ -141,12 +141,21 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
res.tempFiles.forEach(v => {
|
||||
this.upload(v)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
upload (img) {
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
formData.append('file', img)
|
||||
|
||||
this.$loading()
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
@@ -157,8 +166,6 @@
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
|
||||
@@ -150,12 +150,21 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
res.tempFiles.forEach(v => {
|
||||
this.upload(v)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
upload (img) {
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
formData.append('file', img)
|
||||
|
||||
this.$loading()
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
@@ -166,8 +175,6 @@
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
|
||||
@@ -171,12 +171,21 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
res.tempFiles.forEach(v => {
|
||||
this.upload(v)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
upload (img) {
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
formData.append('file', img)
|
||||
|
||||
this.$loading()
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
@@ -187,8 +196,6 @@
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
|
||||
@@ -141,14 +141,22 @@
|
||||
|
||||
addPhoto () {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
success: res => {
|
||||
this.$loading()
|
||||
res.tempFiles.forEach(v => {
|
||||
this.upload(v)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
upload (img) {
|
||||
let formData = new FormData()
|
||||
formData.append('file', res.tempFiles[0])
|
||||
formData.append('file', img)
|
||||
|
||||
this.$loading()
|
||||
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 0) {
|
||||
this.richList.push({
|
||||
type: 'img',
|
||||
@@ -158,8 +166,6 @@
|
||||
this.$u.toast(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
|
||||
Reference in New Issue
Block a user