@@ -103,11 +129,13 @@
},
action: `${process.env.VUE_APP_UPLOAD_API}`,
filesList: [],
- videosList:[],
+ videosList:[],
+ videosPicList:[],
form: {
title: "",
date:'',
picture: [],
+ video_pics:[],
videos:[],
introduction: "",
content: ''
@@ -141,6 +169,7 @@
handleRemoveV(file, fileList) {
this.videosList = fileList
},
+
handlesuccessV(response, file, fileList) {
if (response && response.hasOwnProperty('errcode')) {
this.$Message.warning(response.errmsg || '')
@@ -148,7 +177,19 @@
return
}
this.videosList = fileList
- },
+ },
+ handleRemoveVp(file, fileList) {
+ this.videosPicList = fileList
+ },
+ handlesuccessVp(response, file, fileList) {
+ if (response && response.hasOwnProperty('errcode')) {
+ this.$Message.warning(response.errmsg || '')
+ this.videosPicList = []
+ return
+ }
+ this.videosPicList = fileList
+ },
+
submit() {
@@ -184,6 +225,21 @@
this.form.videos = []
}
+ let vp_files = []
+ if (this.videosPicList.length > 0) {
+ for (var v of this.videosPicList) {
+ if (v.response) {
+ vp_files.push(v.response.id)
+ } else {
+ vp_files.push(v.id)
+ }
+ }
+ this.form.video_pics = vp_files
+ } else {
+ this.form.video_pics = []
+ }
+
+
console.log("this.form", this.form)
// return
@@ -232,6 +288,16 @@
})
})
}
+ if (res.video_pics_details && res.video_pics_details.length > 0) {
+ this.videosPicList = []
+ res.video_pics_details.map(item => {
+ this.videosPicList.push({
+ name: item.original_name,
+ id: item.id,
+ url: item.url
+ })
+ })
+ }
})
}
@@ -249,11 +315,13 @@
this.id = ''
this.showWang = false
this.filesList = []
- this.videosList = []
+ this.videosList = []
+ this.videosPicList = []
this.form = {
title: "",
date:'',
picture: [],
+ video_pics:[],
videos:[],
introduction: "",
content: ''
@@ -269,7 +337,8 @@