Fix: 【旅居商城小程序】旅居商家PC端上传的主页视频,在安卓和电脑端小程序未显示
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
>
|
||||
<swiper-item v-for="(item, index) in store.banner" :key="index">
|
||||
<video
|
||||
v-if="item.includes('.mp4')"
|
||||
:src="item"
|
||||
v-if="item.type === 'video'"
|
||||
:src="item.url"
|
||||
style="width: 100%; height: 100%"
|
||||
@play="videoPlay"
|
||||
@ended="videoEnd"
|
||||
@@ -28,7 +28,7 @@
|
||||
></video>
|
||||
<image
|
||||
v-else
|
||||
:src="item"
|
||||
:src="item.url"
|
||||
style="width: 100%; height: 100%"
|
||||
></image>
|
||||
</swiper-item>
|
||||
@@ -678,8 +678,17 @@ export default {
|
||||
getFarmerData() {
|
||||
getJiaLouDetail(this.id).then(res => {
|
||||
this.store = res.data || {}
|
||||
this.store.banner = res.data.banner.map(img => {
|
||||
return {
|
||||
type: 'img',
|
||||
url: img
|
||||
}
|
||||
})
|
||||
if(res.data.video) {
|
||||
this.store.banner.unshift(res.data.video)
|
||||
this.store.banner.unshift({
|
||||
type: 'video',
|
||||
url: res.data.video
|
||||
})
|
||||
}
|
||||
this.getNews()
|
||||
this.getJiaLouProductList()
|
||||
|
||||
Reference in New Issue
Block a user