Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7aa7e852
authored
Sep 29, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改样式
1 parent
f9388c9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
71 deletions
src/components/LiveBox.vue
src/config/env.development.js
src/components/LiveBox.vue
View file @
7aa7e85
<
template
>
<!-- v-if="LiveProps[liveDetail.status].isLive" -->
<div
class=
"videoContainer"
>
<div
class=
"small-box"
@
click=
"isSmallBox = false"
v-show=
"isSmallBox"
>
<img
class=
"icon-small-live"
src=
"@/assets/images/icon-small-live.png"
/>
<div
class=
"small-box"
@
click=
"isSmallBox = false"
v-show=
"isSmallBox"
>
<img
class=
"icon-small-live"
src=
"@/assets/images/icon-small-live.png"
/>
<div
class=
"flex small-content"
>
<!--
<div
v-if=
"LiveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
-->
<div
class=
"live-line"
>
...
...
@@ -23,37 +19,29 @@
</div>
</div>
<!-- @click="openFullscreen" -->
<div
:style=
"videoStyle"
id=
"live-box"
:class=
"['live-box',
{ videoFullscreen: videoFullscreen }]"
v-show="!isSmallBox"
>
<div
class=
"sprite-icon icon-live-close"
v-show=
"!videoFullscreen && !isSmallBox"
@
click=
"isSmallBox = true"
></div>
<div
:style=
"videoStyle"
id=
"live-box"
:class=
"['live-box',
{ videoFullscreen: videoFullscreen }]"
v-show="!isSmallBox">
<div
class=
"sprite-icon icon-live-close"
v-show=
"!videoFullscreen && !isSmallBox"
@
click=
"isSmallBox = true"
></div>
<div
:class=
"
{ videoShort: isAction }">
<div
class=
"mask"
>
<div
class=
"status flex"
>
<!--
<div
v-if=
"LiveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
-->
<div
v-if=
"LiveProps[liveDetail.status].isLive"
class=
"live-line"
>
<div
v-if=
"LiveProps[liveDetail.status].isLive"
class=
"live-line"
>
<div
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
</div>
<!-- 回放图标 -->
<!-- :src="" -->
<img
v-if=
"!LiveProps[liveDetail.status].isLive"
:src=
"IMAGES.REPLAY_ICON"
class=
"live-replayIcon"
/>
<img
v-if=
"!LiveProps[liveDetail.status].isLive"
:src=
"IMAGES.REPLAY_ICON"
class=
"live-replayIcon"
/>
<!--
<div
class=
"text"
>
{{
LiveStatus
[
liveDetail
.
status
]
==
'live'
?
'正在直播'
:
'直播回放'
}}
</div>
-->
<div
class=
"text"
>
{{
LiveProps
[
liveDetail
.
status
].
text
}}
</div>
...
...
@@ -61,44 +49,32 @@
<template
v-if=
"isShowGif"
>
<!-- 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
class=
"coverGif"
:src=
"LiveProps[liveDetail.status].covergif"
alt=
""
/>
<img
class=
"coverGif"
:src=
"LiveProps[liveDetail.status].covergif"
alt=
""
/>
<!--
<img
v-else
:src=
"IMAGES.COVER_REPLAY"
alt=
""
/>
-->
</
template
>
</div>
<div
class=
"fullscreen-btn"
@
click=
"openFullscreen(false)"
>
<div
class=
"fullscreen-btn"
@
click=
"openFullscreen(false)"
>
<img
:src=
"IMAGES.FULL_SCREEN"
/>
</div>
<div
class=
"poster-btn"
@
click=
"showKf = true"
>
<div
class=
"poster-btn"
@
click=
"showKf = true"
>
<img
:src=
"detail.floatingMaskDiagram"
/>
</div>
<video
id=
"player-container-id"
preload=
"auto"
playsinline
webkit-playsinline
></video>
<group-modal
v-model=
"showKf"
:detail=
"detail"
/>
<video
id=
"player-container-id"
preload=
"auto"
playsinline
webkit-playsinline
></video>
<group-modal
v-model=
"showKf"
:detail=
"detail"
/>
</div>
<action
:bgBlack=
"true"
class=
"BgAction"
v-show=
"videoFullscreen && isAction"
></action>
<action
:bgBlack=
"true"
class=
"BgAction"
v-show=
"videoFullscreen && isAction"
></action>
</div>
</div>
</template>
...
...
@@ -131,7 +107,7 @@ const LiveProps = Object.freeze({
const
PLAYERDOMID
=
'player-container-id'
export
default
{
name
:
'LiveBox'
,
data
()
{
data
()
{
return
{
player
:
null
,
videoFullscreen
:
false
,
...
...
@@ -146,7 +122,7 @@ export default {
}
},
computed
:
{
isAction
()
{
isAction
()
{
const
{
activityStatus
,
buyFlag
}
=
this
.
detail
return
activityStatus
!=
3
&&
buyFlag
!=
2
//TODO CONSTANT
}
...
...
@@ -171,7 +147,7 @@ export default {
}
},
mounted
()
{
mounted
()
{
console
.
log
(
this
.
liveDetail
,
'============'
)
this
.
createPlayerCover
()
this
.
createPlayer
()
...
...
@@ -222,13 +198,13 @@ export default {
// })
},
methods
:
{
createPlayerCover
()
{
createPlayerCover
()
{
!
this
.
IsIOS
&&
(
this
.
isShowGif
=
true
)
},
createPlayer
()
{
createPlayer
()
{
this
.
player
=
TCPlayer
(
PLAYERDOMID
,
TCPlayerConfig
)
},
play
()
{
play
()
{
wxConfig
.
ready
(()
=>
{
wx
.
getNetworkType
({
success
:
(
result
)
=>
{
...
...
@@ -249,7 +225,7 @@ export default {
})
},
fixHls
()
{
fixHls
()
{
if
(
Hls
.
isSupported
())
{
this
.
video
=
document
.
getElementById
(
PLAYERDOMID
)
this
.
hls
=
new
Hls
()
...
...
@@ -259,7 +235,7 @@ export default {
}
},
// 打开关闭全屏
openFullscreen
(
status
=
true
)
{
openFullscreen
(
status
=
true
)
{
console
.
log
(
'openFullscreen'
)
this
.
isShowGif
=
false
const
[
live
]
=
document
.
getElementsByClassName
(
'live-box'
)
...
...
@@ -272,7 +248,7 @@ export default {
this
.
$emit
(
'handleLiveFull'
,
{
isFull
:
this
.
videoFullscreen
})
},
// 处理tcplayer错误码14
dealTcPlayerErr14
()
{
dealTcPlayerErr14
()
{
this
.
hls
.
on
(
Hls
.
Events
.
ERROR
,
function
(
event
,
data
)
{
if
(
data
.
fatal
)
{
switch
(
data
.
type
)
{
...
...
@@ -293,14 +269,14 @@ export default {
}
})
},
changeGifStatus
()
{
changeGifStatus
()
{
this
.
isShowGif
=
!
this
.
isShowGif
},
handleClose
()
{
handleClose
()
{
// e.stopPropagation()
console
.
log
(
'关闭--22222222222222222'
)
},
continueVideo
()
{
continueVideo
()
{
this
.
player
.
play
()
}
}
...
...
@@ -324,13 +300,14 @@ export default {
left
:
0
;
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
//
object-fit
:
cover
;
}
.small-content
{
width
:
100%
;
height
:
100%
;
z-index
:
9
;
line-height
:
21px
;
//
padding-left
:
5px
;
//
padding
:
;
justify-content
:
center
;
//
padding
:
;
...
...
@@ -436,6 +413,7 @@ export default {
bottom
:
0
!important
;
border
:
none
!important
;
background
:
#000000
;
overflow-y
:
hidden
;
.videoShort
{
//
height
:
calc
(
100vh
-
13.333vh
)
!important
;
height
:
100%
;
...
...
src/config/env.development.js
View file @
7aa7e85
...
...
@@ -10,7 +10,7 @@
module
.
exports
=
{
title
:
'加载中...'
,
request
:
{
baseURL
:
'http://scrm.
test
.glsx.com.cn'
,
// 本地测试项目地址,
baseURL
:
'http://scrm.
dev
.glsx.com.cn'
,
// 本地测试项目地址,
// 设置超时时间
timeout
:
180000
,
// 携带凭证
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment