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
0c1816c9
Commit
0c1816c9
authored
Apr 28, 2020
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播v2.0
parent
bd105099
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
88 additions
and
62 deletions
+88
-62
config/README.md
+0
-0
src/components/livedModel/livedControls.vue
+2
-2
src/components/livedModel/livedGoodsDia.vue
+3
-3
src/components/livedModel/livedIsMsg.vue
+12
-2
src/components/livedModel/livedShareDia.vue
+1
-16
src/components/livedModel/livedposterDia.vue
+43
-21
src/pages/live/index.vue
+4
-0
src/pages/liveList/index.vue
+2
-0
src/pages/liveOver/index.vue
+7
-3
src/pages/lived/index.vue
+4
-15
src/pages/login/index.vue
+10
-0
No files found.
README.md
→
config/
README.md
View file @
0c1816c9
File moved
src/components/livedModel/livedControls.vue
View file @
0c1816c9
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
</div>
</div>
<!-- 评论层 -->
<!-- 评论层 -->
<livedIsMsg
<livedIsMsg
v-if=
"(info.liveBroadcastState!=2 || info.liveBroadcastState!=4) &&guestBookList"
:guestBookList=
"guestBookList"
:guestBookList=
"guestBookList"
:updateVal=
"updateVal"
:updateVal=
"updateVal"
:isSend=
"isSend"
:isSend=
"isSend"
:liveId=
"liveId"
:liveId=
"liveId"
:info=
"info"
:fixedHeight=
"getBottom"
:fixedHeight=
"getBottom"
></livedIsMsg>
></livedIsMsg>
<!-- 带货商品层 -->
<!-- 带货商品层 -->
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<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=
"goodsImg"
v-else
></div>
<div
class=
"goodsImg"
v-else
></div>
<div
class=
"iptCopy"
v-if=
"!info.playbackUrl"
@
click=
"isLogin"
>
跟主播说点什么...
</div>
<div
class=
"iptCopy"
v-if=
"!info.playbackUrl
|| info.liveBroadcastState==3
"
@
click=
"isLogin"
>
跟主播说点什么...
</div>
<div
class=
"iptCopy"
style=
"background:none;"
v-else
></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/R6ZUITlCgbhXML2jTsPkDQdwLrgkzTeeu22kjySxGjmPSBj4ZWa95HsigshMwCSxgDYHnzixpW0fjfJjXEaZwJAkiUsJn5CnGA81b0EoIPkryj2vAKQNA3AAQALojjPsI5trlaQ/ODy4Q2ApIUAzgMY5XL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
""
>
...
...
src/components/livedModel/livedGoodsDia.vue
View file @
0c1816c9
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
<div
class=
"list"
v-if=
"list.length>0"
>
<div
class=
"list"
v-if=
"list.length>0"
>
<div
class=
"item"
v-for=
"(item,index) in list"
:key=
"index"
>
<div
class=
"item"
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"toGoodsInfo(item)"
>
<div
class=
"img"
@
click=
"toGoodsInfo(item)"
>
<div
class=
"img"
>
<div
class=
"num"
>
{{
item
.
number
}}
</div>
<div
class=
"num"
>
{{
item
.
number
}}
</div>
<!--
<img
v-if=
"item.productImgUrl"
:src=
"item.productImgUrl"
alt
/>
-->
<!--
<img
v-if=
"item.productImgUrl"
:src=
"item.productImgUrl"
alt
/>
-->
<image
v-if=
"item.productImgUrl"
:src=
"item.productImgUrl"
mode=
"aspectFill"
alt=
""
></image>
<image
v-if=
"item.productImgUrl"
:src=
"item.productImgUrl"
mode=
"aspectFill"
alt=
""
></image>
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<span>
{{
999
}}
</span>
<span>
{{
999
}}
</span>
</p>
-->
</p>
-->
</div>
</div>
<div
class=
"icon"
@
click=
"isLogin(item)"
>
<div
class=
"icon"
@
click
.
stop
=
"isLogin(item)"
>
<img
src=
"../../../static/images/lived/shopCart.png"
alt=
""
>
<img
src=
"../../../static/images/lived/shopCart.png"
alt=
""
>
</div>
</div>
</div>
</div>
...
...
src/components/livedModel/livedIsMsg.vue
View file @
0c1816c9
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
liveApi
from
"@/api/live"
;
import
liveApi
from
"@/api/live"
;
export
default
{
export
default
{
props
:[
"guestBookList"
,
"updateVal"
,
"isSend"
,
"fixedHeight"
,
"liveId"
],
props
:[
"guestBookList"
,
"updateVal"
,
"isSend"
,
"fixedHeight"
,
"liveId"
,
"info"
],
name
:
""
,
name
:
""
,
data
()
{
data
()
{
return
{
return
{
...
@@ -29,15 +29,22 @@ export default {
...
@@ -29,15 +29,22 @@ export default {
},
},
watch
:{
watch
:{
updateVal
(){
updateVal
(){
if
(
!
this
.
info
.
playbackUrl
){
console
.
log
(
'2222222222222'
)
this
.
list
=
[...
this
.
list
,...
this
.
guestBookList
];
this
.
list
=
[...
this
.
list
,...
this
.
guestBookList
];
this
.
scrollTop
=
this
.
list
.
length
*
1000
;
this
.
scrollTop
=
this
.
list
.
length
*
1000
;
}
}
}
},
},
components
:
{},
components
:
{},
computed
:
{},
computed
:
{},
created
()
{},
created
()
{},
onLoad
(){
onLoad
(){
if
(
this
.
info
.
playbackUrl
&&
this
.
info
.
playbackUrl
[
0
]){
this
.
init
()
this
.
init
()
}
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
...
@@ -51,7 +58,10 @@ export default {
...
@@ -51,7 +58,10 @@ export default {
beginTime
:
1
beginTime
:
1
}
}
liveApi
.
queryPlaybackComments
(
query
).
then
(
res
=>
{
liveApi
.
queryPlaybackComments
(
query
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
if
(
res
.
data
.
code
==
'200'
){
this
.
list
=
res
.
data
.
data
.
guestBookList
.
slice
(
-
100
);
this
.
scrollTop
=
this
.
list
.
length
*
1000
;
}
})
})
}
}
}
}
...
...
src/components/livedModel/livedShareDia.vue
View file @
0c1816c9
...
@@ -134,8 +134,7 @@ export default {
...
@@ -134,8 +134,7 @@ export default {
}
}
console
.
log
(
'query -----------------'
,
query
)
console
.
log
(
'query -----------------'
,
query
)
let
newTime
=
new
Date
(
this
.
info
.
startTime
.
replace
(
/-/g
,
"/"
));
let
newTime
=
new
Date
(
this
.
info
.
startTime
.
replace
(
/-/g
,
"/"
));
query
.
livedTime
=
`
${
newTime
.
getMonth
()
+
1
}
月
${
newTime
.
getDate
()
-
query
.
livedTime
=
`
${
newTime
.
getMonth
()
+
1
}
月
${
newTime
.
getDate
()}
日
${
Number
(
newTime
.
getHours
())
<
10
?
'0'
+
Number
(
newTime
.
getHours
())
:
newTime
.
getHours
()}
:
${
Number
(
newTime
.
getMinutes
())
<
10
?
'0'
+
Number
(
newTime
.
getMinutes
())
:
newTime
.
getMinutes
()}
`
;
1
}
日
${
Number
(
newTime
.
getHours
())
<
10
?
'0'
+
Number
(
newTime
.
getHours
())
:
newTime
.
getHours
()}
:
${
Number
(
newTime
.
getMinutes
())
<
10
?
'0'
+
Number
(
newTime
.
getMinutes
())
:
newTime
.
getMinutes
()}
`
;
let
qrCode
=
DFSImg
(
res
.
data
.
data
);
let
qrCode
=
DFSImg
(
res
.
data
.
data
);
if
(
qrCode
.
indexOf
(
"https"
)
==
-
1
)
{
if
(
qrCode
.
indexOf
(
"https"
)
==
-
1
)
{
query
.
qrCode
=
qrCode
.
replace
(
"http"
,
"https"
);
query
.
qrCode
=
qrCode
.
replace
(
"http"
,
"https"
);
...
@@ -145,21 +144,7 @@ export default {
...
@@ -145,21 +144,7 @@ export default {
live
.
getUserInfo
().
then
(
res1
=>
{
live
.
getUserInfo
().
then
(
res1
=>
{
if
(
res1
.
data
.
code
==
'200'
){
if
(
res1
.
data
.
code
==
'200'
){
this
.
userInfo
=
res1
.
data
.
data
;
this
.
userInfo
=
res1
.
data
.
data
;
// res1.data.data.headPortraitUrl = DFSImg(res1.data.data.headPortraitUrl)
live
.
imgToBase64
(
DFSImg
(
res1
.
data
.
data
.
headPortraitUrl
)).
then
(
res2
=>
{
console
.
log
(
res2
.
data
.
code
,
'res2.data.code'
)
if
(
res2
.
data
.
code
==
'200'
){
console
.
log
(
'2222222222222'
)
let
suffix
=
''
let
index
=
DFSImg
(
res1
.
data
.
data
.
headPortraitUrl
).
lastIndexOf
(
"?"
)
let
index1
=
DFSImg
(
res1
.
data
.
data
.
headPortraitUrl
).
lastIndexOf
(
"."
)
suffix
=
DFSImg
(
res1
.
data
.
data
.
headPortraitUrl
).
substring
(
index1
+
1
,
index
+
1
);
this
.
$set
(
this
.
userInfo
,
'headPortraitUrl'
,
`data:image/
${
suffix
}
;base64,`
+
res2
.
data
.
data
)
console
.
log
(
this
.
userInfo
)
console
.
log
(
'2222222222222'
)
this
.
againLoadingPoster
=
true
;
this
.
againLoadingPoster
=
true
;
}
})
console
.
log
(
this
.
userInfo
)
console
.
log
(
this
.
userInfo
)
...
...
src/components/livedModel/livedposterDia.vue
View file @
0c1816c9
...
@@ -33,7 +33,7 @@ export default {
...
@@ -33,7 +33,7 @@ export default {
info
:
{
info
:
{
posterCoverUrl
:
""
,
posterCoverUrl
:
""
,
livedStatus
:
1
,
//直播状态 0未开播 1一开播
livedStatus
:
1
,
//直播状态 0未开播 1一开播
livedTime
:
"
3月21日 20:20
"
,
livedTime
:
""
,
livedTitle
:
""
,
livedTitle
:
""
,
nickName
:
""
,
nickName
:
""
,
avatarUrl
:
""
,
avatarUrl
:
""
,
...
@@ -69,6 +69,7 @@ export default {
...
@@ -69,6 +69,7 @@ export default {
this
.
$emit
(
"closePosterDia"
);
this
.
$emit
(
"closePosterDia"
);
},
},
init
()
{
init
()
{
wx
.
hideLoading
();
// wx.showLoading({
// wx.showLoading({
// title: "生成中..."
// title: "生成中..."
// });
// });
...
@@ -117,32 +118,34 @@ export default {
...
@@ -117,32 +118,34 @@ export default {
if
(
this
.
info
.
livedStatus
==
0
){
if
(
this
.
info
.
livedStatus
==
0
){
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/1a33da04-8224-4980-9299-a4a8e32be678.png'
,
path
=>
{
console
.
log
(
'直播预告'
)
ctx
.
drawImage
(
path
,
160
*
bili
,
340
*
bili
,
20
*
bili
,
20
*
bili
);
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/2a6cbdf0-91ca-4993-9ec5-963cb30ba9b8.png'
,
path
=>
{
ctx
.
drawImage
(
path
,
160
*
bili
,
340
*
bili
,
18
*
bili
,
18
*
bili
);
ctx
.
save
()
ctx
.
save
()
ctx
.
setTextAlign
(
"left"
);
ctx
.
setTextAlign
(
"left"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFontSize
(
14
);
ctx
.
setFontSize
(
14
);
ctx
.
fillText
(
this
.
info
.
livedTime
,
18
8
*
bili
,
355
*
bili
);
ctx
.
fillText
(
this
.
info
.
livedTime
,
18
4
*
bili
,
355
*
bili
);
})
})
}
}
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/
1eaa8c87-e20a-4b5b-8c21-596dac8fa093
.png'
,
path
=>
{
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/
cc6db4d4-55bb-4add-a9ba-5733499aa5d0
.png'
,
path
=>
{
ctx
.
drawImage
(
path
,
20
*
bili
,
340
*
bili
,
2
6
*
bili
,
20
*
bili
);
ctx
.
drawImage
(
path
,
20
*
bili
,
340
*
bili
,
2
0
*
bili
,
18
*
bili
);
ctx
.
save
()
ctx
.
save
()
ctx
.
setTextAlign
(
"left"
);
ctx
.
setTextAlign
(
"left"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFontSize
(
14
);
ctx
.
setFontSize
(
14
);
ctx
.
fillText
(
this
.
info
.
livedStatus
==
1
?
'直播中'
:
'直播预告'
,
52
*
bili
,
355
*
bili
);
ctx
.
setTextAlign
(
"left"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFontSize
(
14
);
ctx
.
fillText
(
this
.
info
.
livedTime
,
188
*
bili
,
355
*
bili
);
let
liveText
=
''
;
if
(
this
.
info
.
livedStatus
==
0
){
liveText
=
'直播预告'
}
else
if
(
this
.
info
.
livedStatus
==
1
){
liveText
=
'直播中'
}
else
{
liveText
=
'直播结束'
}
ctx
.
fillText
(
liveText
,
48
*
bili
,
355
*
bili
);
})
})
...
@@ -165,13 +168,16 @@ export default {
...
@@ -165,13 +168,16 @@ export default {
ctx
.
save
();
ctx
.
save
();
//头像
//头像
ctx
.
clip
();
ctx
.
clip
();
ctx
.
drawImage
(
info
.
avatarUrl
,
10
*
bili
,
370
*
bili
,
54
*
bili
,
54
*
bili
);
this
.
saveThe
(
info
.
avatarUrl
,
path
=>
{
ctx
.
drawImage
(
path
,
10
*
bili
,
370
*
bili
,
54
*
bili
,
54
*
bili
);
ctx
.
save
();
ctx
.
save
();
ctx
.
stroke
();
ctx
.
stroke
();
ctx
.
draw
();
ctx
.
draw
();
this
.
posterStatus
=
true
;
this
.
posterStatus
=
true
;
console
.
log
(
"--------海报生成成功"
);
console
.
log
(
"--------海报生成成功"
);
})
});
});
});
});
},
},
...
@@ -183,7 +189,7 @@ export default {
...
@@ -183,7 +189,7 @@ export default {
callback
(
res
.
path
);
callback
(
res
.
path
);
},
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
console
.
log
(
'saveTheFail ___________________________'
,
res
)
console
.
log
(
'saveTheFail ___________________________'
,
url
+
'------url-----'
,
res
)
}
}
});
});
},
},
...
@@ -200,18 +206,26 @@ export default {
...
@@ -200,18 +206,26 @@ export default {
// 点击保存时,将画布生成海报
// 点击保存时,将画布生成海报
handleSave
()
{
handleSave
()
{
var
that
=
this
;
var
that
=
this
;
wx
.
getSetting
({
success
(
res
)
{
console
.
log
(
'11111111111'
)
if
(
res
.
authSetting
[
"scope.writePhotosAlbum"
])
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
"正在保存..."
,
title
:
"正在保存..."
,
mask
:
true
mask
:
true
});
});
wx
.
getSetting
({
success
(
res
)
{
if
(
res
.
authSetting
[
"scope.writePhotosAlbum"
])
{
that
.
saveImg
();
that
.
saveImg
();
}
else
if
(
res
.
authSetting
[
"scope.writePhotosAlbum"
]
===
undefined
)
{
}
else
if
(
res
.
authSetting
[
"scope.writePhotosAlbum"
]
===
undefined
)
{
console
.
log
(
'3333333333333'
)
wx
.
authorize
({
wx
.
authorize
({
scope
:
"scope.writePhotosAlbum"
,
scope
:
"scope.writePhotosAlbum"
,
success
()
{
success
()
{
wx
.
showLoading
({
title
:
"正在保存..."
,
mask
:
true
});
that
.
saveImg
();
that
.
saveImg
();
},
},
fail
()
{
fail
()
{
...
@@ -223,9 +237,15 @@ export default {
...
@@ -223,9 +237,15 @@ export default {
}
}
});
});
}
else
{
}
else
{
console
.
log
(
'44444444444444'
)
wx
.
openSetting
({
wx
.
openSetting
({
success
(
res
)
{
success
(
res
)
{
if
(
res
.
authSetting
[
"scope.writePhotosAlbum"
])
{
if
(
res
.
authSetting
[
"scope.writePhotosAlbum"
])
{
wx
.
showLoading
({
title
:
"正在保存..."
,
mask
:
true
});
that
.
saveImg
();
that
.
saveImg
();
}
else
{
}
else
{
wx
.
showToast
({
wx
.
showToast
({
...
@@ -240,7 +260,7 @@ export default {
...
@@ -240,7 +260,7 @@ export default {
fail
:
err
=>
{
fail
:
err
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
wx
.
showToast
({
wx
.
showToast
({
title
:
"出现了错误,请稍后再试"
,
title
:
"出现了错误,请稍后再试
11111
"
,
icon
:
"none"
icon
:
"none"
});
});
}
}
...
@@ -286,7 +306,7 @@ export default {
...
@@ -286,7 +306,7 @@ export default {
fail
:
err
=>
{
fail
:
err
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
wx
.
showToast
({
wx
.
showToast
({
title
:
"出现了错误,请稍后再试"
,
title
:
"出现了错误,请稍后再试
2222
"
,
icon
:
"none"
icon
:
"none"
});
});
}
}
...
@@ -337,6 +357,8 @@ export default {
...
@@ -337,6 +357,8 @@ export default {
margin
:
0
auto
;
margin
:
0
auto
;
background
:
#fff
;
background
:
#fff
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
border-radius
:
5px
;
.myCanvas
{
.myCanvas
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
...
src/pages/live/index.vue
View file @
0c1816c9
...
@@ -336,9 +336,12 @@ export default {
...
@@ -336,9 +336,12 @@ export default {
console
.
log
(
'onHide'
,
this
.
overOrStop
)
console
.
log
(
'onHide'
,
this
.
overOrStop
)
this
.
pusher
.
stop
();
if
(
this
.
overOrStop
){
if
(
this
.
overOrStop
){
if
(
this
.
liveInfo
.
liveBroadcastState
==
1
){
if
(
this
.
liveInfo
.
liveBroadcastState
==
1
){
this
.
changeLiveStatus
(
3
)
this
.
changeLiveStatus
(
3
)
this
.
isSetBeauty
=
false
;
this
.
isSetBeauty
=
false
;
}
}
}
}
...
@@ -655,6 +658,7 @@ export default {
...
@@ -655,6 +658,7 @@ export default {
if
(
this
.
liveCountDown
==
0
){
if
(
this
.
liveCountDown
==
0
){
console
.
log
(
'开始直播'
)
console
.
log
(
'开始直播'
)
this
.
pusher
.
start
();
//开始推流
this
.
pusher
.
start
();
//开始推流
this
.
isCountDown
=
false
;
this
.
isCountDown
=
false
;
this
.
isSetBeauty
=
false
;
this
.
isSetBeauty
=
false
;
...
...
src/pages/liveList/index.vue
View file @
0c1816c9
...
@@ -537,6 +537,7 @@ export default {
...
@@ -537,6 +537,7 @@ export default {
key
:
"phoneNumber"
,
key
:
"phoneNumber"
,
data
:
res
.
data
.
data
.
mobilephone
data
:
res
.
data
.
data
.
mobilephone
});
});
}
}
})
})
},
},
...
@@ -704,6 +705,7 @@ export default {
...
@@ -704,6 +705,7 @@ export default {
//
height
:
50vh
;
//
height
:
50vh
;
//
margin-bottom
:
60px
;
//
margin-bottom
:
60px
;
padding-bottom
:
60px
;
padding-bottom
:
60px
;
box-sizing
:
border-box
;
background-color
:
#efefef
;
background-color
:
#efefef
;
}
}
.history-wrap
{
.history-wrap
{
...
...
src/pages/liveOver/index.vue
View file @
0c1816c9
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<image
class=
"bg-img"
:src=
"overInfo.coverUrl"
mode=
"aspectFill"
alt=
""
></image>
<image
class=
"bg-img"
:src=
"overInfo.coverUrl"
mode=
"aspectFill"
alt=
""
></image>
<div
class=
"conbox"
>
<div
class=
"conbox"
>
<div
class=
"live-over"
>
<div
class=
"live-over"
>
<div
class=
"over-text"
>
直播已
结束
</div>
<div
class=
"over-text"
>
直播已
{{
liveInfo
.
liveBroadcastState
==
2
?
'结束'
:
'失效'
}}
</div>
<div
class=
"live-time"
>
直播时长:
{{
overInfo
.
liveTime
}}
</div>
<div
class=
"live-time"
v-if=
"liveInfo.liveBroadcastState == 2"
>
直播时长:
{{
overInfo
.
liveTime
}}
</div>
</div>
</div>
<div
class=
"live-info"
>
<div
class=
"live-info"
v-if=
"liveInfo.liveBroadcastState == 2"
>
<div
class=
"info-row item-row-one"
>
<div
class=
"info-row item-row-one"
>
<div
class=
"info-item"
>
<div
class=
"info-item"
>
<div
class=
"item-num"
>
{{
overInfo
.
watchNum
}}
</div>
<div
class=
"item-num"
>
{{
overInfo
.
watchNum
}}
</div>
...
@@ -77,6 +77,8 @@ export default {
...
@@ -77,6 +77,8 @@ export default {
},
},
onLoad
(
options
){
onLoad
(
options
){
this
.
overInfo
=
{}
this
.
overInfo
=
{}
if
(
options
.
type
){
if
(
options
.
type
){
...
@@ -85,6 +87,8 @@ export default {
...
@@ -85,6 +87,8 @@ export default {
this
.
liveInfo
=
JSON
.
parse
(
options
.
liveInfo
)
this
.
liveInfo
=
JSON
.
parse
(
options
.
liveInfo
)
console
.
log
(
this
.
liveInfo
)
this
.
getOverInfo
(
options
.
id
)
this
.
getOverInfo
(
options
.
id
)
},
},
...
...
src/pages/lived/index.vue
View file @
0c1816c9
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
:src=
"liveNoticeInfo.playbackUrl[0]"
:src=
"liveNoticeInfo.playbackUrl[0]"
autoplay
autoplay
loop
loop
:controls=
"false"
:show-fullscreen-btn=
"false"
:show-fullscreen-btn=
"false"
object-fit=
"cover"
object-fit=
"cover"
/>
/>
...
@@ -461,21 +462,9 @@ export default {
...
@@ -461,21 +462,9 @@ export default {
timingGetInfo
(
serverTime
)
{
timingGetInfo
(
serverTime
)
{
if
(
this
.
isTimeLock
)
{
if
(
this
.
isTimeLock
)
{
this
.
isTimeLock
=
false
;
this
.
isTimeLock
=
false
;
let
dataTime
=
this
.
isTimeFirstReq
let
dataTime
=
''
?
serverTime
-
2000
if
(
this
.
liveNoticeInfo
.
openPlayback
==
0
&&
:
this
.
newCommentsTime
;
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
;
...
...
src/pages/login/index.vue
View file @
0c1816c9
...
@@ -189,6 +189,15 @@ export default {
...
@@ -189,6 +189,15 @@ export default {
// }¶ms=${encodeURIComponent(this.backParams)}`
// }¶ms=${encodeURIComponent(this.backParams)}`
// });
// });
// 跳转回小程序页面
// 跳转回小程序页面
var
data
=
wx_decode
(
this
.
appid
,
this
.
session_key
,
e
.
mp
.
detail
.
encryptedData
,
e
.
mp
.
detail
.
iv
);
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
this
.
$store
.
commit
(
'setUserInfo'
,
this
.
userInfo
)
this
.
pushPageType
();
this
.
pushPageType
();
}
else
{
}
else
{
var
data
=
wx_decode
(
var
data
=
wx_decode
(
...
@@ -200,6 +209,7 @@ export default {
...
@@ -200,6 +209,7 @@ export default {
this
.
unionId
=
data
.
unionId
||
""
;
this
.
unionId
=
data
.
unionId
||
""
;
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
console
.
log
(
this
.
userInfo
,
"this.userInfo"
);
console
.
log
(
this
.
userInfo
,
"this.userInfo"
);
this
.
$store
.
commit
(
'setUserInfo'
,
this
.
userInfo
)
if
(
this
.
unionId
)
{
if
(
this
.
unionId
)
{
login
login
...
...
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