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 6365ba13
authored
Oct 08, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
直播背景图片兼容ios
2 parents
b6febf04
35c0e2f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
85 deletions
src/components/LiveBox.vue
src/components/PayModal.vue
src/components/LiveBox.vue
View file @
6365ba1
<
template
>
<!-- v-if="LiveProps[liveDetail.status].isLive" -->
<div
class=
"videoContainer"
>
<div
class=
"small-box"
@
click=
"isSmallBox = false"
v-show=
"isSmallBox"
>
<<<<<<
< HEAD
<div
class=
"small-box"
@
click=
"isSmallBox = false"
v-show=
"isSmallBox"
>
<img
class=
"icon-small-live"
src=
"@/assets/images/icon-small-live.jpg"
/>
<div
class=
"flex small-content"
>
<!--
<div
v-if=
"LiveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
-->
<div
class=
"live-line"
>
<div
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
=======
<div
class=
"small-box"
@
click=
"isSmallBox = false"
v-show=
"isSmallBox"
>
<img
class=
"icon-small-live"
src=
"@/assets/images/icon-small-live.png"
/>
>>>>>>> 35c0e2f924989636ebeee213cc6d151e6716a671
<div
class=
"flex small-content"
>
<!--
<div
v-if=
"LiveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
-->
<div
class=
"live-line"
v-if=
"LiveProps[liveDetail.status].isLive"
>
<div
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
</div>
<img
v-if=
"!LiveProps[liveDetail.status].isLive"
:src=
"IMAGES.REPLAY_ICON"
class=
"live-replayIcon"
/>
<div
class=
"text"
>
{{
LiveProps
[
liveDetail
.
status
].
status
}}
</div>
</div>
<!--
<div
class=
"text"
>
{{
LiveStatus
[
liveDetail
.
status
]
==
'live'
?
'直播'
:
'回放'
}}
</div>
-->
<!--
<div
class=
"text"
>
{{
LiveProps
[
liveDetail
.
status
].
status
}}
</div>
-->
<div
class=
"text"
>
{{
LiveProps
[
liveDetail
.
status
].
status
}}
</div>
</div>
</div>
<!-- @click="openFullscreen" -->
<!-- @touchmove.stop.prevent 禁止使用滚动 -->
<div
:style=
"videoStyle"
@
touchmove
.
stop
.
prevent
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>
<!-- @click="openFullscreen" -->
<!-- @touchmove.stop.prevent 禁止使用滚动 -->
<div
:style=
"videoStyle"
@
touchmove
.
stop
.
prevent
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
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
<div
:class=
"
{ videoShort: isAction }">
<div
class=
"mask"
>
<div
class=
"status flex"
>
<div
v-if=
"LiveProps[liveDetail.status].isLive"
class=
"live-line"
>
<div
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
</div>
<!-- 回放图标 -->
<img
v-if=
"!LiveProps[liveDetail.status].isLive"
:src=
"IMAGES.REPLAY_ICON"
class=
"live-replayIcon"
/>
<div
class=
"text"
>
{{
LiveProps
[
liveDetail
.
status
].
text
}}
</div>
</div>
<!-- 回放图标 -->
<!-- :src="" -->
<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>
<template
v-if=
"isShowGif"
>
<img
class=
"coverGif"
:src=
"LiveProps[liveDetail.status].covergif"
alt=
""
/>
</
template
>
</div>
<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
v-else
:src=
"IMAGES.COVER_REPLAY"
alt=
""
/>
-->
</
template
>
</div>
<div
class=
"fullscreen-btn"
@
click=
"openFullscreen(false)"
>
<img
:src=
"IMAGES.FULL_SCREEN"
/>
</div>
<div
class=
"poster-btn"
@
click=
"showKf = true"
>
<img
:src=
"detail.floatingMaskDiagram"
/>
<div
class=
"fullscreen-btn"
@
click=
"openFullscreen(false)"
>
<img
:src=
"IMAGES.FULL_SCREEN"
/>
</div>
<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"
/>
</div>
<video
id=
"player-container-id"
preload=
"auto"
playsinline
webkit-playsinline
></video>
<group-modal
v-model=
"showKf"
:detail=
"detail"
/>
<action
:bgBlack=
"true"
class=
"BgAction"
v-show=
"videoFullscreen && isAction"
></action>
</div>
<action
:bgBlack=
"true"
class=
"BgAction"
v-show=
"videoFullscreen && isAction"
></action>
</div>
</div>
</template>
<
script
type=
"text/ecmascript-6"
>
...
...
@@ -116,8 +118,6 @@ export default {
showKf
:
false
,
isShowGif
:
false
,
videoStyle
:
''
,
// LiveStatus: CONSTANTS.LiveStatus,
// LiveProps: CONSTANTS.LiveProps,
isSmallBox
:
false
,
//是否显示小容器直播
LiveProps
,
IMAGES
...
...
@@ -150,10 +150,10 @@ export default {
},
mounted
()
{
console
.
log
(
this
.
liveDetail
,
'============'
)
this
.
createPlayerCover
()
this
.
createPlayer
()
this
.
play
()
<<<<<<<
HEAD
// console.log('2222222222', this.liveDetail);
// const _this = this
// if (!this.IsIOS) {
...
...
@@ -198,6 +198,9 @@ export default {
// })
// _this.dealTcPlayerErr14(_this)
// })
=======
// console.log('2222222222', this.liveDetail)
>>>>>>>
35
c0e2f924989636ebeee213cc6d151e6716a671
},
methods
:
{
createPlayerCover
()
{
...
...
@@ -210,23 +213,25 @@ export default {
wxConfig
.
ready
(()
=>
{
wx
.
getNetworkType
({
success
:
(
result
)
=>
{
console
.
log
(
'===='
,
{
result
});
//
console.log('====', { result });
this
.
player
.
ready
(()
=>
{
// 设置播放器初始化完成后的回调
this
.
fixHls
()
const
src
=
this
.
LiveProps
[
this
.
liveDetail
.
status
].
isLive
?
this
.
liveDetail
.
playPath
:
(
this
.
liveDetail
.
liveBroadcastRecordingFileList
||
[])[
0
]?.
videoUrl
this
.
player
.
src
(
src
)
// this.player.src('http://play.glsx.com.cn/live/live.m3u8')
this
.
player
.
poster
()
this
.
player
.
play
()
// 播放视频
// console.log('this.draggable', this.draggable)
this
.
draggable
(
document
.
getElementById
(
'live-box'
),
this
.
openFullscreen
,
'icon-live-close'
)
//
})
}
})
})
},
controlBarStyle
()
{
var
[
controlBar
]
=
document
.
getElementsByClassName
(
'vjs-control-bar'
)
controlBar
.
style
.
bottom
=
this
.
isAction
?
'10vh'
:
'0'
},
fixHls
()
{
if
(
Hls
.
isSupported
())
{
this
.
video
=
document
.
getElementById
(
PLAYERDOMID
)
...
...
@@ -238,7 +243,7 @@ export default {
},
// 打开关闭全屏
openFullscreen
(
status
=
true
)
{
console
.
log
(
'openFullscreen'
)
//
console.log('openFullscreen')
this
.
isShowGif
=
false
const
[
live
]
=
document
.
getElementsByClassName
(
'live-box'
)
const
[
volumePanel
]
=
document
.
getElementsByClassName
(
'vjs-volume-panel '
)
...
...
@@ -247,6 +252,7 @@ export default {
this
.
player
.
play
()
this
.
videoFullscreen
=
status
live
.
id
=
status
?
''
:
'live-box'
this
.
controlBarStyle
()
this
.
$emit
(
'handleLiveFull'
,
{
isFull
:
this
.
videoFullscreen
})
},
// 处理tcplayer错误码14
...
...
@@ -274,10 +280,6 @@ export default {
changeGifStatus
()
{
this
.
isShowGif
=
!
this
.
isShowGif
},
handleClose
()
{
// e.stopPropagation()
console
.
log
(
'关闭--22222222222222222'
)
},
continueVideo
()
{
this
.
player
.
play
()
}
...
...
@@ -289,7 +291,7 @@ export default {
position
:
fixed
;
top
:
18%
;
right
:
0
;
z-index
:
2
;
z-index
:
7
;
//
position
:
relative
;
width
:
52px
;
...
...
@@ -307,6 +309,7 @@ export default {
//
object-fit
:
cover
;
}
.small-content
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
z-index
:
9
;
...
...
@@ -318,6 +321,15 @@ export default {
border-radius
:
0
0
10px
10px
;
//
padding
:
;
text-align
:
right
;
.live-replayIcon
{
position
:
absolute
;
left
:
7px
;
top
:
5px
;
display
:
inline-block
;
width
:
10px
;
height
:
10px
;
z-index
:
9
;
}
.text
{
z-index
:
40
;
margin-left
:
15px
;
...
...
@@ -434,7 +446,7 @@ export default {
/
deep
/
.vjs-control-bar
{
opacity
:
1
!important
;
bottom
:
10vh
;
//
bottom
:
10vh
;
background
:
none
!important
;
//
background-color
:
rgba
(
0
,
0
,
0
,
0.3
);
}
...
...
src/components/PayModal.vue
View file @
6365ba1
...
...
@@ -176,9 +176,10 @@ export default {
}
if
(
userInfo
.
phone
)
this
.
emit
(
obj
)
else
{
if
(
!
hasPhoneSelect
)
this
.
emit
(
obj
)
else
ssoApi
.
captchaLogin
({
mobile
:
params
.
userPhone
,
// if (!hasPhoneSelect) this.emit(obj)
// else
ssoApi
.
captchaLogin
({
mobile
:
params
.
userPhone
||
'88888888888'
,
captcha
:
8888
,
source
:
'CROWDFUNDING_H5'
}).
then
(({
code
,
data
,
message
})
=>
{
...
...
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