44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
<template>
|
|
<view style="width:750rpx" :style="{'height':height}">
|
|
<image @click="calose()" style="width:30rpx;height:30rpx;position: fixed;top:80rpx;right:30rpx;" src="/static/image/clons.png"></image>
|
|
<video :src="url" class="video" :style="{'padding-top':top,'height': width}" :autoplay="true"></video>
|
|
</view>
|
|
</template>
|
|
<style>
|
|
.video{
|
|
width: 750rpx;
|
|
|
|
}
|
|
</style>
|
|
<script>
|
|
export default {
|
|
name:"video",
|
|
data(){
|
|
return {
|
|
url:"",
|
|
top:0,
|
|
height:0,
|
|
width:0
|
|
}
|
|
},
|
|
onLoad(a){
|
|
const res = uni.getSystemInfoSync();
|
|
let height = res.windowHeight
|
|
let width = res.windowWidth
|
|
this.width = width + ( (height - width) / 2) + 'px'
|
|
console.log(this.width)
|
|
this.top = (height - width) / 2+ 'px'
|
|
console.log(this.top)
|
|
this.height = height + 'px';
|
|
console.log(a)
|
|
this.url = a.url
|
|
},
|
|
methods:{
|
|
calose(){
|
|
uni.navigateBack({
|
|
delta: 1
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script> |