2025-11-26 16:51:13 +08:00
|
|
|
|
<template>
|
2025-11-28 18:19:51 +08:00
|
|
|
|
<view :class="theme_view + ' flex-row pr'" :style="'width:' + windowWidth + 'px;height:' + windowHeight + 'px;'">
|
2025-12-03 16:56:34 +08:00
|
|
|
|
<view class="flex-1 pr" @dblclick="handle_double_click" @touchend="handle_touch_end" :data-ignore="false">
|
2025-12-04 18:14:59 +08:00
|
|
|
|
<live-video ref="live-video" :propSrc="live_config.pull_flv_url || 'http://live-pull-all.shopxo.vip/68f764013572f9240ca7ce6c/shopxo122.m3u8'" @ended="ended"></live-video>
|
2025-12-03 16:56:34 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 简化版点赞效果组件 -->
|
2025-12-04 18:14:59 +08:00
|
|
|
|
<full-screen-like-effect ref="fullScreenLikeEffect" :propCustomImages="like_show_imgs" :style="'width:' + windowWidth + 'px;height:' + windowHeight + 'px;'"></full-screen-like-effect>
|
2025-11-26 16:51:13 +08:00
|
|
|
|
</view>
|
2025-12-03 16:56:34 +08:00
|
|
|
|
<view v-if="!is_loading" class="live-content" :style="'width:' + windowWidth + 'px;height:' + windowHeight + 'px;'">
|
2025-11-28 18:19:51 +08:00
|
|
|
|
<template v-if="!is_live_ended">
|
2025-12-04 18:14:59 +08:00
|
|
|
|
<live-content ref="liveContent" :propLiveConfig="live_config" :propLiveShowImgs="like_show_imgs" @live-back="live_back" @handleDoubleClick="handle_double_click" @handleTouchEnd="handle_touch_end"></live-content>
|
2025-11-28 18:19:51 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else>
|
2025-12-02 17:11:52 +08:00
|
|
|
|
<view class="live-ended flex-row align-c jc-c" :style="'width:' + windowWidth + 'px;height:' + windowHeight + 'px;'" @dblclick="handle_double_click" @touchend="handle_touch_end" :data-ignore="true">
|
2025-11-28 18:19:51 +08:00
|
|
|
|
<view class="flex-col align-c">
|
|
|
|
|
|
<text style="color:#fff;font-size:16px;">直播已结束</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>
|
2025-11-26 16:51:13 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
2025-11-27 17:28:29 +08:00
|
|
|
|
import liveVideo from './components/video/video.vue';
|
|
|
|
|
|
import liveContent from './components/live-content/live-content.vue';
|
2025-12-01 18:25:01 +08:00
|
|
|
|
// 引入点赞效果组件
|
2025-12-02 18:10:03 +08:00
|
|
|
|
import fullScreenLikeEffect from './components/full-screen-like-effect/full-screen-like-effect.vue';
|
2025-11-27 18:11:14 +08:00
|
|
|
|
// 引入混入公共逻辑,避免nvue和vue使用同一套逻辑出现问题
|
|
|
|
|
|
import mixins from './mixins/mixins.js';
|
2025-11-26 16:51:13 +08:00
|
|
|
|
const app = getApp();
|
|
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
|
|
|
liveVideo,
|
2025-12-01 18:25:01 +08:00
|
|
|
|
liveContent,
|
2025-12-02 18:10:03 +08:00
|
|
|
|
fullScreenLikeEffect
|
2025-11-26 16:51:13 +08:00
|
|
|
|
},
|
2025-11-27 18:11:14 +08:00
|
|
|
|
mixins: [mixins],
|
2025-11-26 16:51:13 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-11-27 18:11:14 +08:00
|
|
|
|
theme_view: app.globalData.get_theme_value_view(),
|
2025-11-26 16:51:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2025-11-28 17:20:46 +08:00
|
|
|
|
<style lang="scss" scoped>
|
2025-11-26 16:51:13 +08:00
|
|
|
|
.live-content {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
z-index: 9;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
2025-11-28 18:19:51 +08:00
|
|
|
|
background: transparent;
|
2025-11-26 16:51:13 +08:00
|
|
|
|
}
|
2025-11-28 17:20:46 +08:00
|
|
|
|
.live-ended {
|
|
|
|
|
|
// 添加渐变背景色
|
2025-11-28 17:28:27 +08:00
|
|
|
|
background-image: linear-gradient(to bottom,#AD18F9,#05DFC7);
|
2025-11-28 17:20:46 +08:00
|
|
|
|
}
|
2025-11-28 18:19:51 +08:00
|
|
|
|
.live-ended-button {
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
border-color: #fff;
|
|
|
|
|
|
}
|
2025-11-26 16:51:13 +08:00
|
|
|
|
</style>
|