Fix(订单):评价上传文件回调报错导致无法预览图片

This commit is contained in:
lifizer
2024-04-24 14:35:22 +08:00
parent c65bb0e312
commit 8b813d1682
2 changed files with 16 additions and 8 deletions
+16 -6
View File
@@ -107,18 +107,28 @@ export default {
default: true default: true
} }
}, },
watch: {
dataList: {
handler(val) {
this.upload_before_list = val
this.upload_cache_list = []
if (val.length > 0) {
val.map(item => {
debugger
item && this.upload_cache_list.push(item.path)
})
}
this.emit()
},
immediate: true
}
},
onReady(res) { onReady(res) {
this.$nextTick(() => { this.$nextTick(() => {
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {
this.videoContext[i] = uni.createVideoContext(`myVideo_${i}`); this.videoContext[i] = uni.createVideoContext(`myVideo_${i}`);
} }
}); });
},
created() {
},
mounted() {
}, },
methods: { methods: {
videoPlay(e) { videoPlay(e) {
-2
View File
@@ -47,7 +47,6 @@
<view class="upload-wrapper"> <view class="upload-wrapper">
<view class="video-upload"> <view class="video-upload">
<tm-upload <tm-upload
:dataList="videoArr"
:upload_img_wh="uploadImgWH" :upload_img_wh="uploadImgWH"
:upload_max="1" :upload_max="1"
:upload_count="1" :upload_count="1"
@@ -59,7 +58,6 @@
</view> </view>
<view class="pic-upload"> <view class="pic-upload">
<tm-upload <tm-upload
:dataList="picArr"
:upload_img_wh="uploadImgWH" :upload_img_wh="uploadImgWH"
:upload_max="9 - videoArr.length" :upload_max="9 - videoArr.length"
:upload_count="9 - videoArr.length" :upload_count="9 - videoArr.length"