diff --git a/packages/localLife/comment/index.vue b/packages/localLife/comment/index.vue index dfc6c636..87952d63 100644 --- a/packages/localLife/comment/index.vue +++ b/packages/localLife/comment/index.vue @@ -161,7 +161,7 @@ export default { uploadVideo(e.file.url, res => { console.log(res.data.url); this.videoList.push({ url: this.picUrl + res.data.url }) - this.videoList2.push( res.data.url) + this.videoList2.push({ url: res.data.url }) }) }, cancels(e) { @@ -174,12 +174,14 @@ export default { handleSubmit(){ let that= this + // 提取videoList2数组中每个对象的url属性 + const videoUrls = that.videoList2.map(item => item.url).join(","); request(apiArr.createComment,"POST",{ merchant_id:that.info.id, satisfaction:that.rating, comment:that.comment, image_url:that.imgList2.join(","), - video_url:that.videoList2.join(","), + video_url:videoUrls, }).then(res=>{ that.comment="" that.rating = 0