Fix:5809 【商城小程序】【商户入驻】商户入驻详情页视频上传位置缺少删除键

This commit is contained in:
linxi
2026-08-20 10:33:31 +08:00
parent 8e00a1e477
commit ae72fc0a8f
2 changed files with 46 additions and 16 deletions
+23 -8
View File
@@ -110,14 +110,23 @@
v-if="!form.coverVideo"
class="btn-upload"
>上传视频</view>
<video
v-else
:src="form.coverVideo"
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
:controls="false"
play-btn-position="center"
class="video-item"
/>
<view v-else class="img-wrap">
<video
:src="form.coverVideo"
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
:controls="false"
play-btn-position="center"
class="video-item"
/>
<view
v-if="!reviewing"
style="position: absolute; top: 0; right: 0;"
class="delete-badge"
@click.stop="deleteVideo"
>
x
</view>
</view>
</view>
</template>
</u-cell>
@@ -828,6 +837,12 @@ export default {
this.$forceUpdate()
})
},
// 删除视频封面
deleteVideo() {
if (this.reviewing) return
this.form.coverVideo = ''
this.$forceUpdate()
},
chooseShopImg() {
if (this.reviewing) return
const _this = this
+23 -8
View File
@@ -309,14 +309,23 @@
v-if="!form.coverVideo"
class="btn-upload"
>上传视频</view>
<video
v-else
:src="form.coverVideo"
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
:controls="false"
play-btn-position="center"
class="video-item"
/>
<view v-else class="img-wrap">
<video
:src="form.coverVideo"
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
:controls="false"
play-btn-position="center"
class="video-item"
/>
<view
v-if="!reviewing"
style="position: absolute; top: 0; right: 0;"
class="delete-badge"
@click.stop="deleteVideo"
>
x
</view>
</view>
</view>
</template>
</u-cell>
@@ -1031,6 +1040,12 @@ export default {
this.$forceUpdate()
})
},
// 删除视频封面
deleteVideo() {
if (this.reviewing) return
this.form.coverVideo = ''
this.$forceUpdate()
},
chooseShopImg() {
if (this.reviewing) return
const _this = this