Commit 7aa7e852 by 张立顺

修改样式

1 parent f9388c9c
<template> <template>
<!-- v-if="LiveProps[liveDetail.status].isLive" --> <!-- v-if="LiveProps[liveDetail.status].isLive" -->
<div class="videoContainer"> <div class="videoContainer">
<div <div class="small-box"
class="small-box" @click="isSmallBox = false"
@click="isSmallBox = false" v-show="isSmallBox">
v-show="isSmallBox" <img class="icon-small-live"
> src="@/assets/images/icon-small-live.png" />
<img
class="icon-small-live"
src="@/assets/images/icon-small-live.png"
/>
<div class="flex small-content"> <div class="flex small-content">
<!-- <div v-if="LiveStatus[liveDetail.status] == 'live'" class="live-line"> --> <!-- <div v-if="LiveStatus[liveDetail.status] == 'live'" class="live-line"> -->
<div class="live-line"> <div class="live-line">
...@@ -23,37 +19,29 @@ ...@@ -23,37 +19,29 @@
</div> </div>
</div> </div>
<!-- @click="openFullscreen" --> <!-- @click="openFullscreen" -->
<div <div :style="videoStyle"
:style="videoStyle" id="live-box"
id="live-box" :class="['live-box', { videoFullscreen: videoFullscreen }]"
:class="['live-box', { videoFullscreen: videoFullscreen }]" v-show="!isSmallBox">
v-show="!isSmallBox" <div class="sprite-icon icon-live-close"
> v-show="!videoFullscreen && !isSmallBox"
<div @click="isSmallBox = true"></div>
class="sprite-icon icon-live-close"
v-show="!videoFullscreen && !isSmallBox"
@click="isSmallBox = true"
></div>
<div :class="{ videoShort: isAction }"> <div :class="{ videoShort: isAction }">
<div class="mask"> <div class="mask">
<div class="status flex"> <div class="status flex">
<!-- <div v-if="LiveStatus[liveDetail.status] == 'live'" class="live-line"> --> <!-- <div v-if="LiveStatus[liveDetail.status] == 'live'" class="live-line"> -->
<div <div v-if="LiveProps[liveDetail.status].isLive"
v-if="LiveProps[liveDetail.status].isLive" class="live-line">
class="live-line"
>
<div class="side"></div> <div class="side"></div>
<div class="center side"></div> <div class="center side"></div>
<div class="side"></div> <div class="side"></div>
</div> </div>
<!-- 回放图标 --> <!-- 回放图标 -->
<!-- :src="" --> <!-- :src="" -->
<img <img v-if="!LiveProps[liveDetail.status].isLive"
v-if="!LiveProps[liveDetail.status].isLive" :src="IMAGES.REPLAY_ICON"
:src="IMAGES.REPLAY_ICON" class="live-replayIcon" />
class="live-replayIcon"
/>
<!-- <div class="text">{{ LiveStatus[liveDetail.status] == 'live' ? '正在直播' : '直播回放' }}</div> --> <!-- <div class="text">{{ LiveStatus[liveDetail.status] == 'live' ? '正在直播' : '直播回放' }}</div> -->
<div class="text">{{ LiveProps[liveDetail.status].text }}</div> <div class="text">{{ LiveProps[liveDetail.status].text }}</div>
...@@ -61,44 +49,32 @@ ...@@ -61,44 +49,32 @@
<template v-if="isShowGif"> <template v-if="isShowGif">
<!-- v-if="LiveProps[liveDetail.status].covergif" --> <!-- v-if="LiveProps[liveDetail.status].covergif" -->
<!-- <img v-if="LiveStatus[liveDetail.status] == 'live'" src="https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif" alt="" /> --> <!-- <img v-if="LiveStatus[liveDetail.status] == 'live'" src="https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif" alt="" /> -->
<img <img class="coverGif"
class="coverGif" :src="LiveProps[liveDetail.status].covergif"
:src="LiveProps[liveDetail.status].covergif" alt="" />
alt=""
/>
<!-- <img v-else <!-- <img v-else
:src="IMAGES.COVER_REPLAY" :src="IMAGES.COVER_REPLAY"
alt="" /> --> alt="" /> -->
</template> </template>
</div> </div>
<div <div class="fullscreen-btn"
class="fullscreen-btn" @click="openFullscreen(false)">
@click="openFullscreen(false)"
>
<img :src="IMAGES.FULL_SCREEN" /> <img :src="IMAGES.FULL_SCREEN" />
</div> </div>
<div <div class="poster-btn"
class="poster-btn" @click="showKf = true">
@click="showKf = true"
>
<img :src="detail.floatingMaskDiagram" /> <img :src="detail.floatingMaskDiagram" />
</div> </div>
<video <video id="player-container-id"
id="player-container-id" preload="auto"
preload="auto" playsinline
playsinline webkit-playsinline></video>
webkit-playsinline <group-modal v-model="showKf"
></video> :detail="detail" />
<group-modal
v-model="showKf"
:detail="detail"
/>
</div> </div>
<action <action :bgBlack="true"
:bgBlack="true" class="BgAction"
class="BgAction" v-show="videoFullscreen && isAction"></action>
v-show="videoFullscreen && isAction"
></action>
</div> </div>
</div> </div>
</template> </template>
...@@ -131,7 +107,7 @@ const LiveProps = Object.freeze({ ...@@ -131,7 +107,7 @@ const LiveProps = Object.freeze({
const PLAYERDOMID = 'player-container-id' const PLAYERDOMID = 'player-container-id'
export default { export default {
name: 'LiveBox', name: 'LiveBox',
data () { data() {
return { return {
player: null, player: null,
videoFullscreen: false, videoFullscreen: false,
...@@ -146,7 +122,7 @@ export default { ...@@ -146,7 +122,7 @@ export default {
} }
}, },
computed: { computed: {
isAction () { isAction() {
const { activityStatus, buyFlag } = this.detail const { activityStatus, buyFlag } = this.detail
return activityStatus != 3 && buyFlag != 2 //TODO CONSTANT return activityStatus != 3 && buyFlag != 2 //TODO CONSTANT
} }
...@@ -171,7 +147,7 @@ export default { ...@@ -171,7 +147,7 @@ export default {
} }
}, },
mounted () { mounted() {
console.log(this.liveDetail, '============') console.log(this.liveDetail, '============')
this.createPlayerCover() this.createPlayerCover()
this.createPlayer() this.createPlayer()
...@@ -222,13 +198,13 @@ export default { ...@@ -222,13 +198,13 @@ export default {
// }) // })
}, },
methods: { methods: {
createPlayerCover () { createPlayerCover() {
!this.IsIOS && (this.isShowGif = true) !this.IsIOS && (this.isShowGif = true)
}, },
createPlayer () { createPlayer() {
this.player = TCPlayer(PLAYERDOMID, TCPlayerConfig) this.player = TCPlayer(PLAYERDOMID, TCPlayerConfig)
}, },
play () { play() {
wxConfig.ready(() => { wxConfig.ready(() => {
wx.getNetworkType({ wx.getNetworkType({
success: (result) => { success: (result) => {
...@@ -249,7 +225,7 @@ export default { ...@@ -249,7 +225,7 @@ export default {
}) })
}, },
fixHls () { fixHls() {
if (Hls.isSupported()) { if (Hls.isSupported()) {
this.video = document.getElementById(PLAYERDOMID) this.video = document.getElementById(PLAYERDOMID)
this.hls = new Hls() this.hls = new Hls()
...@@ -259,7 +235,7 @@ export default { ...@@ -259,7 +235,7 @@ export default {
} }
}, },
// 打开关闭全屏 // 打开关闭全屏
openFullscreen (status = true) { openFullscreen(status = true) {
console.log('openFullscreen') console.log('openFullscreen')
this.isShowGif = false this.isShowGif = false
const [live] = document.getElementsByClassName('live-box') const [live] = document.getElementsByClassName('live-box')
...@@ -272,7 +248,7 @@ export default { ...@@ -272,7 +248,7 @@ export default {
this.$emit('handleLiveFull', { isFull: this.videoFullscreen }) this.$emit('handleLiveFull', { isFull: this.videoFullscreen })
}, },
// 处理tcplayer错误码14 // 处理tcplayer错误码14
dealTcPlayerErr14 () { dealTcPlayerErr14() {
this.hls.on(Hls.Events.ERROR, function (event, data) { this.hls.on(Hls.Events.ERROR, function (event, data) {
if (data.fatal) { if (data.fatal) {
switch (data.type) { switch (data.type) {
...@@ -293,14 +269,14 @@ export default { ...@@ -293,14 +269,14 @@ export default {
} }
}) })
}, },
changeGifStatus () { changeGifStatus() {
this.isShowGif = !this.isShowGif this.isShowGif = !this.isShowGif
}, },
handleClose () { handleClose() {
// e.stopPropagation() // e.stopPropagation()
console.log('关闭--22222222222222222') console.log('关闭--22222222222222222')
}, },
continueVideo () { continueVideo() {
this.player.play() this.player.play()
} }
} }
...@@ -324,13 +300,14 @@ export default { ...@@ -324,13 +300,14 @@ export default {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; // object-fit: cover;
} }
.small-content { .small-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 9; z-index: 9;
line-height: 21px; line-height: 21px;
// padding-left: 5px;
// padding: ; // padding: ;
justify-content: center; justify-content: center;
// padding: ; // padding: ;
...@@ -436,6 +413,7 @@ export default { ...@@ -436,6 +413,7 @@ export default {
bottom: 0 !important; bottom: 0 !important;
border: none !important; border: none !important;
background: #000000; background: #000000;
overflow-y: hidden;
.videoShort { .videoShort {
// height: calc(100vh - 13.333vh) !important; // height: calc(100vh - 13.333vh) !important;
height: 100%; height: 100%;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
module.exports = { module.exports = {
title: '加载中...', title: '加载中...',
request: { request: {
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址, baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!