|
@@ -25,8 +25,8 @@
|
|
<div v-for="(item, index) in adlist" :key="item.id">
|
|
<div v-for="(item, index) in adlist" :key="item.id">
|
|
<div v-if="index === 0" class="fwc">
|
|
<div v-if="index === 0" class="fwc">
|
|
<div v-if="time" class="countdown">{{ time }}s后关闭广告</div>
|
|
<div v-if="time" class="countdown">{{ time }}s后关闭广告</div>
|
|
- <video ref="videoPlayer" class="w290h330" :src="item.adVideoBase.videoUrl" :controls="false" :autoplay="false" :muted="true" :loop="false" @ended="ended" />
|
|
|
|
- <van-icon name="close" color="#999999" size="34" style="margin:15px auto 0;" @click="showAd = time > 0 ? true : false; getAppGameGiftActivityDetailsList()" />
|
|
|
|
|
|
+ <video ref="videoPlayer" class="w290h330" :src="item.adVideoBase.videoUrl" x5-video-orientation="landscape" x5-video-player-type="h5" :x5-video-player-fullscreen="false" :controls="false" :webkit-playsinline="true" :playsinline="true" :autoplay="true" play-btn-position="center" :show-fullscreen-btn="false" :muted="true" @ended="ended" />
|
|
|
|
+ <van-icon name="close" color="#999999" size="34" style="margin:15px auto 0;" @click="showAd = false; getAppGameGiftActivityDetailsList()" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</van-popup>
|
|
</van-popup>
|
|
@@ -150,7 +150,6 @@ export default {
|
|
this.adlist = await this.$axios.$post('/public/v5/advertising/getAdInfoByAdPlace', { id: 1, adPlace: 24, os: this.$userAgent.isAndroid ? 1 : 2 }, { headers: { Authorization: this.token } });
|
|
this.adlist = await this.$axios.$post('/public/v5/advertising/getAdInfoByAdPlace', { id: 1, adPlace: 24, os: this.$userAgent.isAndroid ? 1 : 2 }, { headers: { Authorization: this.token } });
|
|
this.showAd = true
|
|
this.showAd = true
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.$refs.videoPlayer.play();
|
|
|
|
this.time = 30
|
|
this.time = 30
|
|
const timer = setInterval(
|
|
const timer = setInterval(
|
|
() => --this.time <= 0 && clearInterval(timer),
|
|
() => --this.time <= 0 && clearInterval(timer),
|