Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
863063c1
Commit
863063c1
authored
Apr 23, 2020
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播2.0
parent
905a5786
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
19 deletions
+72
-19
src/api/live.js
+5
-0
src/components/livedModel/isPauseShow.vue
+1
-0
src/components/livedModel/livedControls.vue
+10
-5
src/components/livedModel/livedIsEnded.vue
+1
-0
src/components/livedModel/livedIsMsg.vue
+13
-2
src/components/livedModel/notStarted.vue
+1
-0
src/pages/index/index.vue
+1
-1
src/pages/lived/index.vue
+40
-11
No files found.
src/api/live.js
View file @
863063c1
...
@@ -88,4 +88,8 @@ export default {
...
@@ -88,4 +88,8 @@ export default {
saveCustomerInviterInviteeRel
(
params
)
{
saveCustomerInviterInviteeRel
(
params
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/saveCustomerInviterInviteeRel/`
+
params
+
``
,
{})
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/user/saveCustomerInviterInviteeRel/`
+
params
+
``
,
{})
},
},
//查看回放评论
queryPlaybackComments
(
options
){
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getLiveGuestAndLikeNumById`
,
options
);
}
};
};
\ No newline at end of file
src/components/livedModel/isPauseShow.vue
View file @
863063c1
...
@@ -29,6 +29,7 @@ export default {
...
@@ -29,6 +29,7 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
z-index
:
2
;
.tit
{
.tit
{
font-size
:
30px
;
font-size
:
30px
;
font-weight
:
bold
;
font-weight
:
bold
;
...
...
src/components/livedModel/livedControls.vue
View file @
863063c1
<
template
>
<
template
>
<div
class=
"livedControls"
>
<div
class=
"livedControls"
:style=
"
{'bottom' : info.openPlayback == 0
&&
info.playbackUrl
&&
info.playbackUrl[0]
&&
info.liveBroadcastState == 2 ? '40px' : '20px'}"
>
<!-- 公告层 -->
<!-- 公告层 -->
<livedAnnouncement
v-if=
"info.liveNotice"
:liveNotice=
"info.liveNotice"
></livedAnnouncement>
<livedAnnouncement
v-if=
"info.liveNotice
&& !info.playbackUrl
"
:liveNotice=
"info.liveNotice"
></livedAnnouncement>
<!-- 用户进入通知 -->
<!-- 用户进入通知 -->
<div
class=
"userComing userComingAni"
v-if=
"userComing"
>
<div
class=
"userComing userComingAni"
v-if=
"userComing"
>
<span>
{{
entryNoticeText
}}
</span>
<span>
{{
entryNoticeText
}}
</span>
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
:guestBookList=
"guestBookList"
:guestBookList=
"guestBookList"
:updateVal=
"updateVal"
:updateVal=
"updateVal"
:isSend=
"isSend"
:isSend=
"isSend"
:liveId=
"liveId"
:fixedHeight=
"getBottom"
:fixedHeight=
"getBottom"
></livedIsMsg>
></livedIsMsg>
<!-- 带货商品层 -->
<!-- 带货商品层 -->
...
@@ -34,13 +35,16 @@
...
@@ -34,13 +35,16 @@
<!-- 分享弹层 -->
<!-- 分享弹层 -->
<livedShareDia
v-if=
"loadingShare"
:showShareDia=
"showShareDia"
@
closeShareDia=
"closeShareDia"
:info=
"info"
></livedShareDia>
<livedShareDia
v-if=
"loadingShare"
:showShareDia=
"showShareDia"
@
closeShareDia=
"closeShareDia"
:info=
"info"
></livedShareDia>
<!-- 底部控制层 -->
<!-- 底部控制层 -->
<div
class=
"control flex"
>
<div
class=
"control flex"
>
<template
v-if=
"!isSend"
>
<template
v-if=
"!isSend"
>
<div
class=
"goodsImg"
@
click=
"showGoodsList"
v-if=
"info.liveBroadcastSales==0"
>
<div
class=
"goodsImg"
@
click=
"showGoodsList"
v-if=
"info.liveBroadcastSales==0"
>
<img
src=
"../../../static/images/lived/goodsImg.png"
alt
/>
<img
src=
"../../../static/images/lived/goodsImg.png"
alt
/>
<p
class=
"goodsNum"
v-if=
"list.length>0"
>
{{
list
.
length
}}
</p>
<p
class=
"goodsNum"
v-if=
"list.length>0"
>
{{
list
.
length
}}
</p>
</div>
</div>
<div
class=
"iptCopy"
@
click=
"isLogin"
>
跟主播说点什么...
</div>
<div
class=
"goodsImg"
v-else
></div>
<div
class=
"iptCopy"
v-if=
"!info.playbackUrl"
@
click=
"isLogin"
>
跟主播说点什么...
</div>
<div
class=
"iptCopy"
style=
"background:none;"
v-else
></div>
<div
class=
"shareIcon"
@
click=
"showShare"
>
<div
class=
"shareIcon"
@
click=
"showShare"
>
<img
src=
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAADwElEQVR4Xu2aS6hNURjH//+RgYGRKAMDr1tmFJGBSxmIjGTgKq/rUURi5qKQkhKlLt1IHkl05VUG7r3lkW4MPMIVRXkNFMqAqL++2len45y99mPtc/bu7FWnc2qv9X3f/7fX41trHaLFC1tcP0oAZQ9ocQLlEGjxDlBOguUQKIdAixPI1RCQ1EbyZSPfSW4ASHoGYCqABwC2kBxsBIhcAJB0CsDKCsGfAKwleTNrCHkB0A9gbpXY3wDWkDyTJYQ8AxjWvY3k4awgFAGAad9PcmcWEIoCwLQfJ7nBN4QiATDtl22yJPnDF4iiATDdAwGEdz4gFBGA6bacwXrCo7QQmg5A0iQAJ2osgy5tliusInnLVTHsecMBSBoHYAaAmcG3/R6ZUITlCgbhXML2jTsPkDQdwLrgkzTeeu22kjySxGjmPSBj4ZWa95HsigshMwCSxgDYHnz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H7GXPcAHxSLbKHtAkd+ej9jLHuCDYpFtlD2gyG/PR+wt3wP+AsW7I1AzjlUOAAAAAElFTkSuQmCC"
alt=
""
>
</div>
</div>
...
@@ -59,6 +63,7 @@
...
@@ -59,6 +63,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<div
class=
"sendOut"
:style=
"
{'bottom':getBottom+'px'}">
<div
class=
"sendOut"
:style=
"
{'bottom':getBottom+'px'}">
...
@@ -332,9 +337,9 @@ export default {
...
@@ -332,9 +337,9 @@ export default {
}
}
.livedControls
{
.livedControls
{
position
:
fixed
;
position
:
fixed
;
bottom
:
20px
;
left
:
0
;
left
:
0
;
width
:
100vw
;
width
:
100vw
;
z-index
:
2
;
.userComing
{
.userComing
{
margin-bottom
:
10px
;
margin-bottom
:
10px
;
background
:
rgba
(
#000
,
0.4
);
background
:
rgba
(
#000
,
0.4
);
...
...
src/components/livedModel/livedIsEnded.vue
View file @
863063c1
...
@@ -234,6 +234,7 @@ export default {
...
@@ -234,6 +234,7 @@ export default {
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
display
:
flex
;
display
:
flex
;
z-index
:
2
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
.end
{
.end
{
...
...
src/components/livedModel/livedIsMsg.vue
View file @
863063c1
...
@@ -17,8 +17,9 @@
...
@@ -17,8 +17,9 @@
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
liveApi
from
"@/api/live"
;
export
default
{
export
default
{
props
:[
"guestBookList"
,
"updateVal"
,
"isSend"
,
"fixedHeight"
],
props
:[
"guestBookList"
,
"updateVal"
,
"isSend"
,
"fixedHeight"
,
"liveId"
],
name
:
""
,
name
:
""
,
data
()
{
data
()
{
return
{
return
{
...
@@ -36,12 +37,22 @@ export default {
...
@@ -36,12 +37,22 @@ export default {
computed
:
{},
computed
:
{},
created
()
{},
created
()
{},
onLoad
(){
onLoad
(){
this
.
init
()
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
scrolltolower
(){
scrolltolower
(){
},
init
(){
let
query
=
{
id
:
this
.
liveId
,
userActivebeginTime
:
1
,
beginTime
:
1
}
liveApi
.
queryPlaybackComments
(
query
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
})
}
}
}
}
};
};
...
...
src/components/livedModel/notStarted.vue
View file @
863063c1
...
@@ -175,6 +175,7 @@ export default {
...
@@ -175,6 +175,7 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
z-index
:
2
;
.title{
.title{
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
bold
;
font-weight
:
bold
;
...
...
src/pages/index/index.vue
View file @
863063c1
...
@@ -312,7 +312,7 @@ export default {
...
@@ -312,7 +312,7 @@ export default {
let
params
=
''
let
params
=
''
if
(
querys
.
length
>
midNum
){
if
(
querys
.
length
>
midNum
){
if
(
querys
[
midNum
+
2
]){
if
(
querys
[
midNum
+
2
]){
params
+=
`&spokesmanGroupId=
${
querys
[
midNum
-
1
]}
&spokesmanShopId=
${
querys
[
midNum
]}
&spokesmanRelId=
${
query
[
midNum
+
1
]}
&userId=
${
querys
[
midNum
+
2
]}
`
params
+=
`&spokesmanGroupId=
${
querys
[
midNum
-
1
]}
&spokesmanShopId=
${
querys
[
midNum
]}
&spokesmanRelId=
${
query
s
[
midNum
+
1
]}
&userId=
${
querys
[
midNum
+
2
]}
`
}
else
{
}
else
{
params
+=
`&spokesmanGroupId=
${
querys
[
midNum
-
1
]}
&spokesmanShopId=
${
querys
[
midNum
]}
&spokesmanRelId=
${
querys
[
midNum
+
1
]}
`
params
+=
`&spokesmanGroupId=
${
querys
[
midNum
-
1
]}
&spokesmanShopId=
${
querys
[
midNum
]}
&spokesmanRelId=
${
querys
[
midNum
+
1
]}
`
}
}
...
...
src/pages/lived/index.vue
View file @
863063c1
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<isPauseShow
v-if=
"liveNoticeInfo.liveBroadcastState==3"
:info=
"liveNoticeInfo"
></isPauseShow>
<isPauseShow
v-if=
"liveNoticeInfo.liveBroadcastState==3"
:info=
"liveNoticeInfo"
></isPauseShow>
<!-- 结束展示 -->
<!-- 结束展示 -->
<livedIsEnded
<livedIsEnded
v-if=
"
liveNoticeInfo.liveBroadcastState==2 || liveNoticeInfo.liveBroadcastState==4
"
v-if=
"
(liveNoticeInfo.openPlayback == 1 && (liveNoticeInfo.liveBroadcastState==2 || liveNoticeInfo.liveBroadcastState==4)) || (liveNoticeInfo.openPlayback == 0 && !liveNoticeInfo.playbackUrl && (liveNoticeInfo.liveBroadcastState==4 || liveNoticeInfo.liveBroadcastState==2))
"
:updateGoods=
"updateGoods"
:updateGoods=
"updateGoods"
:endInfo=
"endInfo"
:endInfo=
"endInfo"
:status=
"liveNoticeInfo.liveBroadcastState"
:status=
"liveNoticeInfo.liveBroadcastState"
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
></livedIsEnded>
></livedIsEnded>
<!-- 控件层 -->
<!-- 控件层 -->
<livedControls
<livedControls
v-if=
"liveNoticeInfo
&&liveNoticeInfo.liveBroadcastState!=2&&liveNoticeInfo.liveBroadcastState!=4
"
v-if=
"liveNoticeInfo
.liveBroadcastState==0 || liveNoticeInfo.liveBroadcastState==1 || (liveNoticeInfo.liveBroadcastState==2 && liveNoticeInfo.openPlayback == 0 && liveNoticeInfo.playbackUrl) || liveNoticeInfo.liveBroadcastState==3
"
:info=
"liveNoticeInfo"
:info=
"liveNoticeInfo"
:entryNoticeText=
"entryNoticeText"
:entryNoticeText=
"entryNoticeText"
:guestBookList=
"guestBookList"
:guestBookList=
"guestBookList"
...
@@ -55,6 +55,17 @@
...
@@ -55,6 +55,17 @@
:goodsList=
"goodsList"
:goodsList=
"goodsList"
@
toSendMsg=
"toSendMsg"
@
toSendMsg=
"toSendMsg"
></livedControls>
></livedControls>
<video
v-if=
"liveNoticeInfo.openPlayback == 0 && liveNoticeInfo.playbackUrl && liveNoticeInfo.playbackUrl[0] && liveNoticeInfo.liveBroadcastState == 2"
style=
"width:100%;height:100vh;z-index:-1"
:src=
"liveNoticeInfo.playbackUrl[0]"
autoplay
loop
:show-fullscreen-btn=
"false"
object-fit=
"cover"
/>
<div
class=
"masker"
></div>
</div>
</div>
<!-- 直播 -->
<!-- 直播 -->
<live-player
<live-player
...
@@ -73,12 +84,7 @@
...
@@ -73,12 +84,7 @@
@
statechange=
"changes"
@
statechange=
"changes"
/>
/>
<!--
<video
style=
"width:100%;height:100vh;"
src=
"http://vjs.zencdn.net/v/oceans.mp4"
autoplay
:show-fullscreen-btn=
"false"
/>
-->
<!-- object-fit="fillCrop" -->
<!-- object-fit="fillCrop" -->
...
@@ -455,9 +461,21 @@ export default {
...
@@ -455,9 +461,21 @@ export default {
timingGetInfo
(
serverTime
)
{
timingGetInfo
(
serverTime
)
{
if
(
this
.
isTimeLock
)
{
if
(
this
.
isTimeLock
)
{
this
.
isTimeLock
=
false
;
this
.
isTimeLock
=
false
;
let
dataTime
=
this
.
isTimeFirstReq
?
serverTime
-
2000
let
dataTime
=
''
:
this
.
newCommentsTime
;
if
(
this
.
liveNoticeInfo
.
openPlayback
==
0
&&
this
.
liveNoticeInfo
.
playbackUrl
&&
this
.
liveNoticeInfo
.
playbackUrl
[
0
]
&&
this
.
liveNoticeInfo
.
liveBroadcastState
==
2
){
console
.
log
(
'回放功能------------------------------'
+
new
Date
(
this
.
liveNoticeInfo
.
realStartTime
).
getTime
())
dataTime
=
new
Date
(
this
.
liveNoticeInfo
.
realStartTime
).
getTime
()
}
else
{
dataTime
=
this
.
isTimeFirstReq
?
serverTime
-
2000
:
this
.
newCommentsTime
;
}
// let dataTime = this.isTimeFirstReq
// ? serverTime - 2000
// : this.newCommentsTime;
let
userTime
=
this
.
isTimeFirstReq
let
userTime
=
this
.
isTimeFirstReq
?
serverTime
-
2000
?
serverTime
-
2000
:
this
.
userActivebeginTime
;
:
this
.
userActivebeginTime
;
...
@@ -774,4 +792,14 @@ img {
...
@@ -774,4 +792,14 @@ img {
z-index
:
-1
;
z-index
:
-1
;
}
}
}
}
.masker
{
position
:
fixed
;
width
:
100vw
;
height
:
100vh
;
top
:
0
;
left
:
0
;
background-color
:
rgba
(
102
,
102
,
102
,
0.38
);
z-index
:
1
;
pointer-events
:
none
;
}
</
style
>
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment