Fix(订单):评价上传文件回调报错导致无法预览图片
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user