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" v-if="!form.coverVideo"
class="btn-upload" class="btn-upload"
>上传视频</view> >上传视频</view>
<video <view v-else class="img-wrap">
v-else <video
:src="form.coverVideo" :src="form.coverVideo"
:poster="form.coverVideo + '?vframe/jpg/offset/1'" :poster="form.coverVideo + '?vframe/jpg/offset/1'"
:controls="false" :controls="false"
play-btn-position="center" play-btn-position="center"
class="video-item" class="video-item"
/> />
<view
v-if="!reviewing"
style="position: absolute; top: 0; right: 0;"
class="delete-badge"
@click.stop="deleteVideo"
>
x
</view>
</view>
</view> </view>
</template> </template>
</u-cell> </u-cell>
@@ -828,6 +837,12 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}) })
}, },
// 删除视频封面
deleteVideo() {
if (this.reviewing) return
this.form.coverVideo = ''
this.$forceUpdate()
},
chooseShopImg() { chooseShopImg() {
if (this.reviewing) return if (this.reviewing) return
const _this = this const _this = this
+23 -8
View File
@@ -309,14 +309,23 @@
v-if="!form.coverVideo" v-if="!form.coverVideo"
class="btn-upload" class="btn-upload"
>上传视频</view> >上传视频</view>
<video <view v-else class="img-wrap">
v-else <video
:src="form.coverVideo" :src="form.coverVideo"
:poster="form.coverVideo + '?vframe/jpg/offset/1'" :poster="form.coverVideo + '?vframe/jpg/offset/1'"
:controls="false" :controls="false"
play-btn-position="center" play-btn-position="center"
class="video-item" class="video-item"
/> />
<view
v-if="!reviewing"
style="position: absolute; top: 0; right: 0;"
class="delete-badge"
@click.stop="deleteVideo"
>
x
</view>
</view>
</view> </view>
</template> </template>
</u-cell> </u-cell>
@@ -1031,6 +1040,12 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}) })
}, },
// 删除视频封面
deleteVideo() {
if (this.reviewing) return
this.form.coverVideo = ''
this.$forceUpdate()
},
chooseShopImg() { chooseShopImg() {
if (this.reviewing) return if (this.reviewing) return
const _this = this const _this = this