zmr #57

Merged
zhaomingrui merged 2 commits from zmr into master 2020-07-14 00:37:02 +00:00

View File

@ -4,28 +4,29 @@
<view v-if="type" id="video_mp4">
<view class="page-body">
<view class="page-section">
<video id="myVideo" :src=" 'https://' + vide0_url" :controls="controls" :autoplay="autoplayes" :loop="loop" @error="videoErrorCallback" enable-danmu danmu-btn></video>
<video id="myVideo" :src=" 'https://' + vide0_url" :controls="controls" :autoplay="autoplayes" :loop="loop" @error="videoErrorCallback"
enable-danmu danmu-btn></video>
</view>
</view>
</view>
<view v-if="type" class="welcome_jumpes" @click="leap_over">跳过{{remaining}}</view>
<view v-if="banner" class="welcome_jumpes" @click="leap_overto">跳过</view>
<!-- 轮播图 -->
<view class="uni-padding-wrap" v-if="banner">
<view class="uni-padding-wrap">
<view class="page-section swiper">
<view class="page-section-spacing">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
<view class="uni-padding-wrap" v-if="banner" style="height:300rpx">
{{'ddd' + heightOut}}
111
<view>
<view class="uni-padding-wrap">
<view class="page-section swiper">
<view class="page-section-spacing">
<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000">
<swiper-item v-for="item in list" >
<view class="swiper-item uni-bg-red">
<image :src=" 'https://' + item.launch_path"></image>
</view>
</swiper-item>
</swiper>
</view>
</view>
</view>
</view>
@ -53,23 +54,23 @@
type: true,
banner: false,
protocol: false,
heightes: '',
heightOut: '',
imgurl: [],
indicatorDots: true,
autoplay: true,
loop : 'true',
interval: 3000,
duration: 500,
vide0_url : '',
loop: 'true',
vide0_url: '',
agreement: { //
document_title: "",
document_content: ""
},
heightesStyle : {
height : ''
},
title: 'video',
src: '',
inputValue: '',
controls : false,
autoplayes : true,
inputValue: '',
controls: false,
autoplayes: true,
list: [],
danmuList: [{
text: '第 1s 出现的弹幕',
color: '#ff0000',
@ -80,12 +81,13 @@
color: '#ff00ff',
time: 3
}
]
],
background: ['color1', 'color2', 'color3'],
indicatorDots: true,
autoplay: true,
interval: 2000,
duration: 500
};
},
onLoad() {
},
onReady: function(res) {
this.videoContext = uni.createVideoContext('myVideo')
@ -107,7 +109,7 @@
this.$u.api.pageList({}).then((res) => {
console.log('协议', res)
let data_image = res.data.welcome_page
let vide0_url = res.data.start_page[0].launch_path
let vide0_url = res.data.start_page[0].launch_path
this.list = data_image;
this.vide0_url = vide0_url;
console.log(this.list)
@ -128,16 +130,21 @@
leap_over() {
this.type = !this.type
this.banner = !this.banner;
clearInterval(this.timer)
//
this.getSystemInfo()
},
leap_overto() {
this.protocol = true
this.protocol = true;
this.banner = false;
},
getSystemInfo() {
let that = this;
//
uni.getSystemInfo({
success: function(res) {
this.heightes = res.windowHeight;
console.log(this.heightes)
that.heightOut = res.windowHeight;
console.log('666666666666666' + that.heightOut)
}
});
},
@ -180,19 +187,33 @@
rgb.push(color)
}
return '#' + rgb.join('')
},
changeIndicatorDots(e) {
this.indicatorDots = !this.indicatorDots
},
changeAutoplay(e) {
this.autoplay = !this.autoplay
},
intervalChange(e) {
this.interval = e.target.value
},
durationChange(e) {
this.duration = e.target.value
}
},
mounted() {
// 3
this.remaining_time()
//
this.getSystemInfo()
this.apiwelcome()
}
},
mounted() {
// 3
this.remaining_time()
this.apiwelcome()
}
}
</script>
<style lang="scss" scoped>
.uni-padding-wrap{
// height: 400rpx;
}
.welcome_jumpes {
width: 90rpx;
height: 35rpx;
@ -208,7 +229,8 @@
background: #C4CAC6;
z-index: 10;
}
#myVideo{
#myVideo {
position: absolute;
left: 0;
right: 0;
@ -216,13 +238,16 @@
top: 0;
margin: auto;
}
uni-video{
uni-video {
width: 100%;
height: auto;
}
.uni-video-container{
background-color: none!important;
.uni-video-container {
background-color: none !important;
}
.welcome_images {
width: 100%;
position: fixed;
@ -304,4 +329,4 @@
}
}
}
</style>
</style>