|
|
|
|
@ -12,7 +12,7 @@
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
:before-upload="beforeUpload"
|
|
|
|
|
class="editor-slide-upload"
|
|
|
|
|
action="https://httpbin.org/post"
|
|
|
|
|
:action="action"
|
|
|
|
|
list-type="picture-card"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="small" type="primary">
|
|
|
|
|
@ -44,6 +44,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
action:`${process.env.VUE_APP_BASE_API}/api/admin/upload-file`,
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
listObj: {},
|
|
|
|
|
fileList: []
|
|
|
|
|
@ -55,6 +56,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
handleSubmit() {
|
|
|
|
|
const arr = Object.keys(this.listObj).map(v => this.listObj[v])
|
|
|
|
|
|
|
|
|
|
if (!this.checkAllSuccess()) {
|
|
|
|
|
this.$message('请等待所有图片上传成功。如有网络问题,请刷新页面重新上传!')
|
|
|
|
|
return
|
|
|
|
|
@ -69,9 +71,10 @@ export default {
|
|
|
|
|
const objKeyArr = Object.keys(this.listObj)
|
|
|
|
|
for (let i = 0, len = objKeyArr.length; i < len; i++) {
|
|
|
|
|
if (this.listObj[objKeyArr[i]].uid === uid) {
|
|
|
|
|
this.listObj[objKeyArr[i]].url = response.files.file
|
|
|
|
|
// this.listObj[objKeyArr[i]].url = response.files.file
|
|
|
|
|
this.listObj[objKeyArr[i]].url = response.url
|
|
|
|
|
this.listObj[objKeyArr[i]].hasSuccess = true
|
|
|
|
|
return
|
|
|
|
|
// return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|