v
This commit is contained in:
parent
7e4b4eef18
commit
4140c256a0
@ -4,28 +4,29 @@
|
|||||||
<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">
|
||||||
<view class="uni-padding-wrap">
|
{{'ddd' + heightOut}}
|
||||||
<view class="page-section swiper">
|
111
|
||||||
<view class="page-section-spacing">
|
<view>
|
||||||
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
|
<view class="uni-padding-wrap">
|
||||||
<swiper-item>
|
<view class="page-section swiper">
|
||||||
<view class="swiper-item uni-bg-red">A</view>
|
<view class="page-section-spacing">
|
||||||
</swiper-item>
|
<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-green">B</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-blue">C</view>
|
</swiper-item>
|
||||||
</swiper-item>
|
</swiper>
|
||||||
</swiper>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -53,23 +54,23 @@
|
|||||||
type: true,
|
type: true,
|
||||||
banner: false,
|
banner: false,
|
||||||
protocol: false,
|
protocol: false,
|
||||||
heightes: '',
|
heightOut: '',
|
||||||
imgurl: [],
|
imgurl: [],
|
||||||
indicatorDots: true,
|
loop: 'true',
|
||||||
autoplay: true,
|
vide0_url: '',
|
||||||
loop : 'true',
|
|
||||||
interval: 3000,
|
|
||||||
duration: 500,
|
|
||||||
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')
|
||||||
@ -107,7 +109,7 @@
|
|||||||
this.$u.api.pageList({}).then((res) => {
|
this.$u.api.pageList({}).then((res) => {
|
||||||
console.log('协议', res)
|
console.log('协议', res)
|
||||||
let data_image = res.data.welcome_page
|
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.list = data_image;
|
||||||
this.vide0_url = vide0_url;
|
this.vide0_url = vide0_url;
|
||||||
console.log(this.list)
|
console.log(this.list)
|
||||||
@ -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秒倒计时调用
|
|
||||||
this.remaining_time()
|
// 3秒倒计时调用
|
||||||
// 获取屏幕高度
|
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,7 +229,8 @@
|
|||||||
background: #C4CAC6;
|
background: #C4CAC6;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
#myVideo{
|
|
||||||
|
#myVideo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 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{
|
|
||||||
background-color: none!important;
|
.uni-video-container {
|
||||||
|
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