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 0f70c03f
authored
Sep 23, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商品未配置
1 parent
c978a0ee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
34 deletions
src/api/shopmallApi.js
src/assets/css/crowdfunding.scss
src/assets/images/active-empty.png
src/components/LiveBox.vue
src/views/crowdfunding/index.vue
src/api/shopmallApi.js
View file @
0f70c03
...
...
@@ -7,7 +7,8 @@ export default {
data
:
{
method
:
'scrm.api.shopmall.weapp.activity.detail'
,
id
}
},
returnAll
:
true
})
},
/**参团人数 */
...
...
@@ -17,7 +18,8 @@ export default {
data
:
{
method
:
'scrm.api.shopmall.weapp.activity.group'
,
id
,
}
},
returnAll
:
true
})
},
/** 创建订单(立即购买) */
...
...
src/assets/css/crowdfunding.scss
View file @
0f70c03
...
...
@@ -35,6 +35,28 @@
.layout
{
padding-bottom
:
100px
;
.empty-page
{
position
:
absolute
;
top
:
0
;
left
:
0
;
bottom
:
0
;
box-sizing
:
border-box
;
width
:
100%
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
14px
;
color
:
#ACACAC
;
}
.empty-img
{
width
:
223px
;
height
:
120px
;
margin-bottom
:
30px
;
}
.to-top
{
position
:
fixed
;
right
:
10px
;
...
...
@@ -510,4 +532,4 @@
height
:
21px
;
}
}
}
\ No newline at end of file
}
src/assets/images/active-empty.png
0 → 100644
View file @
0f70c03
21.9 KB
src/components/LiveBox.vue
View file @
0f70c03
...
...
@@ -4,15 +4,16 @@
<div
class=
"mask"
@
click=
"openFullscreen"
>
<div
class=
"sprite-icon icon-live-close"
@
click=
"handleClose"
></div>
<div
class=
"status flex"
>
<div
class=
"live-line"
>
<div
v-if=
"liveStatus[liveDetail.status] == 'live'"
class=
"live-line"
>
<div
class=
"side"
></div>
<div
class=
"center side"
></div>
<div
class=
"side"
></div>
</div>
<div
class=
"text"
>
正在直播
</div>
<div
class=
"text"
>
{{
liveStatus
[
liveDetail
.
status
]
==
'live'
?
'正在直播'
:
'直播回放'
}}
</div>
</div>
<template
v-if=
"isShowGif"
>
<img
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
v-else
src=
"https://wimg.588ku.com/gif620/20/04/23/79a7882dfb0c59497976fd8b3bfe60ef.gif"
alt=
""
/>
</
template
>
</div>
<div
class=
"fullscreen-btn"
@
click=
"openFullscreen(false)"
>
...
...
@@ -37,10 +38,12 @@ export default {
videoFullscreen
:
false
,
showKf
:
false
,
isShowGif
:
false
,
// detail: {
// customerServiceQrImg: 'https://img02.glsx.com.cn/weapp/resource/h5/images/123.png'
// },
videoStyle
:
''
videoStyle
:
''
,
liveStatus
:
{
0
:
'ready'
,
1
:
'live'
,
2
:
'end'
}
}
},
props
:
{
...
...
@@ -75,31 +78,20 @@ export default {
// bind them together
_this
.
hls
.
attachMedia
(
_this
.
video
)
}
_this
.
player
=
TCPlayer
(
'player-container-id'
,
{
// fileID: '387702305074716718', // 点播ID
// appID: '1311227058', // 点播APPID
// src: 'webrtc://play.glsx.com.cn/crowdFunding/7f65f8f80989b46',
let
playParams
=
{
autoplay
:
true
,
// 自动播放
loop
:
true
,
// 循环播放
volume
:
1
,
muted
:
false
,
// 是否静音
// muted: false, // 是否静音
controlBar
:
{
// 控制条配置
// fullscreenToggle: false // 隐藏全屏按钮
playToggle
:
false
,
progressControl
:
false
,
// volumePanel: false,
currentTimeDisplay
:
false
,
durationDisplay
:
false
,
timeDivider
:
false
,
playbackRateMenuButton
:
false
,
fullscreenToggle
:
false
,
QualitySwitcherMenuButton
:
false
fullscreenToggle
:
false
// 隐藏全屏按钮
},
webrtcConfig
:
{
// webrtcConfig 参数列表
showLog
:
true
// 打印webrtc日志
}
})
_this
.
player
.
src
(
'webrtc://play.glsx.com.cn/live/live_normal'
)
}
_this
.
player
=
TCPlayer
(
'player-container-id'
,
playParams
)
let
src
=
this
.
liveStatus
[
this
.
liveDetail
.
status
]
==
'live'
?
this
.
liveDetail
.
playPath
:
(
this
.
liveDetail
.
liveBroadcastRecordingFileList
.
length
?
this
.
liveDetail
.
liveBroadcastRecordingFileList
[
0
].
videoUrl
:
''
)
_this
.
player
.
src
(
src
)
wx
.
getNetworkType
({
success
:
(
result
)
=>
{
_this
.
player
.
ready
(
function
()
{
// 设置播放器初始化完成后的回调
...
...
@@ -109,12 +101,12 @@ export default {
})
}
})
_this
.
player
.
on
(
'play'
,
()
=>
{
this
.
changeGifStatus
()
})
_this
.
player
.
on
(
'pause'
,
()
=>
{
this
.
changeGifStatus
()
})
//
_this.player.on('play', () => {
//
this.changeGifStatus()
//
})
//
_this.player.on('pause', () => {
//
this.changeGifStatus()
//
})
_this
.
dealTcPlayerErr14
()
})
},
...
...
@@ -125,6 +117,7 @@ export default {
let
[
volumePanel
]
=
document
.
getElementsByClassName
(
'vjs-volume-panel '
)
let
[
volume
]
=
volumePanel
.
getElementsByClassName
(
'vjs-mute-control'
)
volume
.
click
()
console
.
log
(
volume
)
this
.
player
.
play
()
this
.
videoFullscreen
=
status
live
.
id
=
status
?
''
:
'live-box'
...
...
src/views/crowdfunding/index.vue
View file @
0f70c03
This diff is collapsed.
Click to expand it.
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