zmr #57
@ -4,32 +4,33 @@
|
|||||||
<view v-if="type" id="video_mp4">
|
<view v-if="type" id="video_mp4">
|
||||||
<view class="page-body">
|
<view class="page-body">
|
||||||
<view class="page-section">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="type" class="welcome_jumpes" @click="leap_over">跳过{{remaining}}</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 v-if="banner" class="welcome_jumpes" @click="leap_overto">跳过</view>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<view class="uni-padding-wrap" v-if="banner">
|
<view class="uni-padding-wrap" v-if="banner" style="height:300rpx">
|
||||||
|
{{'ddd' + heightOut}}
|
||||||
|
111
|
||||||
|
<view>
|
||||||
<view class="uni-padding-wrap">
|
<view class="uni-padding-wrap">
|
||||||
<view class="page-section swiper">
|
<view class="page-section swiper">
|
||||||
<view class="page-section-spacing">
|
<view class="page-section-spacing">
|
||||||
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
|
<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000">
|
||||||
<swiper-item>
|
<swiper-item v-for="item in list" >
|
||||||
<view class="swiper-item uni-bg-red">A</view>
|
<view class="swiper-item uni-bg-red">
|
||||||
</swiper-item>
|
<image :src=" 'https://' + item.launch_path"></image>
|
||||||
<swiper-item>
|
</view>
|
||||||
<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-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<!-- 用户协议弹窗 -->
|
<!-- 用户协议弹窗 -->
|
||||||
<view class="welcome_backes" v-if="protocol">
|
<view class="welcome_backes" v-if="protocol">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -53,23 +54,23 @@
|
|||||||
type: true,
|
type: true,
|
||||||
banner: false,
|
banner: false,
|
||||||
protocol: false,
|
protocol: false,
|
||||||
heightes: '',
|
heightOut: '',
|
||||||
imgurl: [],
|
imgurl: [],
|
||||||
indicatorDots: true,
|
|
||||||
autoplay: true,
|
|
||||||
loop: 'true',
|
loop: 'true',
|
||||||
interval: 3000,
|
|
||||||
duration: 500,
|
|
||||||
vide0_url: '',
|
vide0_url: '',
|
||||||
agreement: { // 用户协议内容
|
agreement: { // 用户协议内容
|
||||||
document_title: "",
|
document_title: "",
|
||||||
document_content: ""
|
document_content: ""
|
||||||
},
|
},
|
||||||
|
heightesStyle : {
|
||||||
|
height : ''
|
||||||
|
},
|
||||||
title: 'video',
|
title: 'video',
|
||||||
src: '',
|
src: '',
|
||||||
inputValue: '',
|
inputValue: '',
|
||||||
controls: false,
|
controls: false,
|
||||||
autoplayes: true,
|
autoplayes: true,
|
||||||
|
list: [],
|
||||||
danmuList: [{
|
danmuList: [{
|
||||||
text: '第 1s 出现的弹幕',
|
text: '第 1s 出现的弹幕',
|
||||||
color: '#ff0000',
|
color: '#ff0000',
|
||||||
@ -80,12 +81,13 @@
|
|||||||
color: '#ff00ff',
|
color: '#ff00ff',
|
||||||
time: 3
|
time: 3
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
background: ['color1', 'color2', 'color3'],
|
||||||
|
indicatorDots: true,
|
||||||
|
autoplay: true,
|
||||||
|
interval: 2000,
|
||||||
|
duration: 500
|
||||||
};
|
};
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onReady: function(res) {
|
onReady: function(res) {
|
||||||
this.videoContext = uni.createVideoContext('myVideo')
|
this.videoContext = uni.createVideoContext('myVideo')
|
||||||
@ -128,16 +130,21 @@
|
|||||||
leap_over() {
|
leap_over() {
|
||||||
this.type = !this.type
|
this.type = !this.type
|
||||||
this.banner = !this.banner;
|
this.banner = !this.banner;
|
||||||
|
clearInterval(this.timer)
|
||||||
|
// 获取屏幕高度
|
||||||
|
this.getSystemInfo()
|
||||||
},
|
},
|
||||||
leap_overto() {
|
leap_overto() {
|
||||||
this.protocol = true
|
this.protocol = true;
|
||||||
|
this.banner = false;
|
||||||
},
|
},
|
||||||
getSystemInfo() {
|
getSystemInfo() {
|
||||||
|
let that = this;
|
||||||
// 获取屏幕高度
|
// 获取屏幕高度
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
this.heightes = res.windowHeight;
|
that.heightOut = res.windowHeight;
|
||||||
console.log(this.heightes)
|
console.log('666666666666666' + that.heightOut)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -180,19 +187,33 @@
|
|||||||
rgb.push(color)
|
rgb.push(color)
|
||||||
}
|
}
|
||||||
return '#' + rgb.join('')
|
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() {
|
mounted() {
|
||||||
|
|
||||||
// 3秒倒计时调用
|
// 3秒倒计时调用
|
||||||
this.remaining_time()
|
this.remaining_time()
|
||||||
// 获取屏幕高度
|
|
||||||
this.getSystemInfo()
|
|
||||||
this.apiwelcome()
|
this.apiwelcome()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.uni-padding-wrap{
|
||||||
|
// height: 400rpx;
|
||||||
|
}
|
||||||
.welcome_jumpes {
|
.welcome_jumpes {
|
||||||
width: 90rpx;
|
width: 90rpx;
|
||||||
height: 35rpx;
|
height: 35rpx;
|
||||||
@ -208,6 +229,7 @@
|
|||||||
background: #C4CAC6;
|
background: #C4CAC6;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
#myVideo {
|
#myVideo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -216,13 +238,16 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-video {
|
uni-video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-video-container {
|
.uni-video-container {
|
||||||
background-color: none !important;
|
background-color: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.welcome_images {
|
.welcome_images {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user