vr-shopxo-uniapp/pages/plugins/live/pull/pull.vue

61 lines
1.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view :class="theme_view + ' live-bg'">
<view class="w h">
<live-video :src="live_config?.pull_flv_url || ''" @ended="ended"></live-video>
</view>
<view class="live-content">
<template v-if="!is_live_ended">
<live-content :live-config="live_config" @live-back="live_back"></live-content>
</template>
<template v-else>
<view class="live-ended flex-row align-c jc-c">
<view class="flex-col align-c">
<text class="live-ended-text">直播已结束</text>
<button plain size="mini" class="mt-10 live-ended-button" @click="back"><text class="cr-f pa-5" @tap="live_back">退</text></button>
</view>
</view>
</template>
</view>
</view>
</template>
<script>
import liveVideo from './components/video/video.vue';
import liveContent from './components/live-content/live-content.vue';
// 引入混入公共逻辑避免nvue和vue使用同一套逻辑出现问题
import mixins from './mixins/mixins.js';
const app = getApp();
export default {
components: {
liveVideo,
liveContent
},
mixins: [mixins],
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
}
},
}
</script>
<style lang="scss" scoped>
.live-bg {
background-image: linear-gradient(to bottom,#ba623c,#14766a);
}
.live-content {
position: absolute;
top: 0;
left: 0;
z-index: 9;
width: 100%;
height: 100%;
}
.live-ended {
width: 100vw;
height: 100vh;
background-image: linear-gradient(to bottom,#AD18F9,#05DFC7);
.live-ended-text {
color:#fff;
font-size:16px;
}
}
</style>