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