8 changed files with 156 additions and 23 deletions
@ -0,0 +1,59 @@ |
|||||
|
<template> |
||||
|
<view class="bg"> |
||||
|
<video :src="showImg(src)" controls class="myVideo" :poster="showImg(poster)"></video> |
||||
|
<view class="title"> |
||||
|
{{title}} |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
src: '', |
||||
|
poster: '', |
||||
|
title: '' |
||||
|
} |
||||
|
}, |
||||
|
onLoad(option) { |
||||
|
const item = JSON.parse(decodeURIComponent(option.item)); |
||||
|
this.src = item.multimedia_url |
||||
|
this.poster = item.head_img |
||||
|
this.title = item.title |
||||
|
}, |
||||
|
onReady() { |
||||
|
uni.setNavigationBarTitle({ |
||||
|
title: this.title |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
.bg { |
||||
|
width: 100%; |
||||
|
height: 100vh; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.myVideo { |
||||
|
width: 100%; |
||||
|
height: 100vh; |
||||
|
position: absolute; |
||||
|
top: 50%; |
||||
|
left: 50%; |
||||
|
transform: translate(-50%,-50%); |
||||
|
} |
||||
|
|
||||
|
.title { |
||||
|
width: 699rpx; |
||||
|
font-family: PingFang SC; |
||||
|
font-weight: 500; |
||||
|
font-size: 29rpx; |
||||
|
color: #FFFFFF; |
||||
|
position: fixed; |
||||
|
left: 28rpx; |
||||
|
bottom: 140rpx; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue