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
b909156b
Commit
b909156b
authored
Apr 15, 2020
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.15直播
parent
39db792e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
129 additions
and
60 deletions
+129
-60
src/components/livedModel/livedControls.vue
+7
-2
src/components/livedModel/livedExplainingCommodities.vue
+3
-3
src/components/livedModel/livedIsEnded.vue
+4
-4
src/components/livedModel/livedposterDia.vue
+14
-7
src/components/livedModel/notStarted.vue
+36
-5
src/components/setting/index.vue
+25
-24
src/pages/live/index.vue
+8
-8
src/pages/liveOver/index.vue
+8
-1
src/pages/lived/index.vue
+24
-6
No files found.
src/components/livedModel/livedControls.vue
View file @
b909156b
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
v-if=
"(info.liveBroadcastState==1||info.liveBroadcastState==3)&&list"
v-if=
"(info.liveBroadcastState==1||info.liveBroadcastState==3)&&list"
:updateGoods=
"updateGoods"
:updateGoods=
"updateGoods"
:goodsList=
"list"
:goodsList=
"list"
:isFocusComments=
"isFocusComments"
></livedExplainingCommodities>
></livedExplainingCommodities>
<!-- 商品列表弹层 -->
<!-- 商品列表弹层 -->
<livedGoodsDia
<livedGoodsDia
...
@@ -119,6 +120,8 @@ export default {
...
@@ -119,6 +120,8 @@ export default {
getBottom
:
0
,
//动态绑定输入框位置
getBottom
:
0
,
//动态绑定输入框位置
loadingShare
:
false
,
loadingShare
:
false
,
isClick
:
true
,
isClick
:
true
,
isFocusComments
:
false
,
//是否在评论中,如果在评论中就隐藏掉上屏商品
};
};
},
},
components
:
{
components
:
{
...
@@ -182,7 +185,7 @@ export default {
...
@@ -182,7 +185,7 @@ export default {
methods
:
{
methods
:
{
// 数量大于1w
// 数量大于1w
watchMan
(
val
)
{
watchMan
(
val
)
{
return
val
-
0
>
10000
?
Math
.
floor
(
val
/
10000
*
100
)
/
100
+
"w"
:
val
;
return
val
-
0
>
10000
?
((
val
-
0
)
/
10000
).
toFixed
(
1
)
+
"w"
:
val
;
},
},
// 点赞
// 点赞
addLike
(
val
)
{
addLike
(
val
)
{
...
@@ -282,10 +285,12 @@ export default {
...
@@ -282,10 +285,12 @@ export default {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
isSend
=
false
;
this
.
isSend
=
false
;
this
.
sendVal
=
""
;
this
.
sendVal
=
""
;
this
.
isFocusComments
=
false
;
},
300
);
},
300
);
},
},
// 获取焦点
// 获取焦点
onFocus
(
e
){
onFocus
(
e
){
this
.
isFocusComments
=
true
;
this
.
getBottom
=
(
e
.
mp
.
detail
.
height
-
10
);
this
.
getBottom
=
(
e
.
mp
.
detail
.
height
-
10
);
},
},
// 点击发送留言
// 点击发送留言
...
@@ -500,7 +505,7 @@ export default {
...
@@ -500,7 +505,7 @@ export default {
font-size
:
16px
;
font-size
:
16px
;
.sendIpt
{
.sendIpt
{
width
:
70vw
;
width
:
70vw
;
color
:
#999
;
color
:
white
;
margin-left
:
10px
;
margin-left
:
10px
;
}
}
.send
{
.send
{
...
...
src/components/livedModel/livedExplainingCommodities.vue
View file @
b909156b
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</div>
</div>
</div>
</div>
<!-- 左上角展示讲解中商品 -->
<!-- 左上角展示讲解中商品 -->
<div
class=
"fixedGoods"
v-else-if=
"showFixedGoods&&fixedGoodsList&&fixedGoodsList.length>0"
>
<div
class=
"fixedGoods"
v-else-if=
"showFixedGoods&&fixedGoodsList&&fixedGoodsList.length>0
&&!isFocusComments
"
>
<div
class=
"goodsList"
v-for=
"(item,index) in fixedGoodsList"
:key=
"index"
@
click=
"toGoodsInfo(item)"
>
<div
class=
"goodsList"
v-for=
"(item,index) in fixedGoodsList"
:key=
"index"
@
click=
"toGoodsInfo(item)"
>
<div
class=
"explain"
v-if=
"item.upperScreenState==1"
>
讲解中
</div>
<div
class=
"explain"
v-if=
"item.upperScreenState==1"
>
讲解中
</div>
<image
:src=
"item.productImgUrl"
mode=
"aspectFill"
alt=
""
></image>
<image
:src=
"item.productImgUrl"
mode=
"aspectFill"
alt=
""
></image>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
import
{
DFSImg
}
from
"@/utils/index"
;
import
{
DFSImg
}
from
"@/utils/index"
;
import
live
from
"@/api/live"
;
import
live
from
"@/api/live"
;
export
default
{
export
default
{
props
:
[
"updateGoods"
,
"goodsList"
],
props
:
[
"updateGoods"
,
"goodsList"
,
"isFocusComments"
],
name
:
""
,
name
:
""
,
data
()
{
data
()
{
return
{
return
{
...
@@ -269,7 +269,7 @@ img {
...
@@ -269,7 +269,7 @@ img {
}
}
.fixedGoods
{
.fixedGoods
{
position
:
fixed
;
position
:
fixed
;
top
:
14
vh
;
top
:
22
vh
;
left
:
12px
;
left
:
12px
;
.goodsList
{
.goodsList
{
width
:
78px
;
width
:
78px
;
...
...
src/components/livedModel/livedIsEnded.vue
View file @
b909156b
...
@@ -5,19 +5,19 @@
...
@@ -5,19 +5,19 @@
<p
class=
"endTxt"
>
直播已
{{
status
==
2
?
'结束'
:
"失效"
}}
</p>
<p
class=
"endTxt"
>
直播已
{{
status
==
2
?
'结束'
:
"失效"
}}
</p>
<p
class=
"time"
>
<p
class=
"time"
>
<span>
直播时长:
</span>
<span>
直播时长:
</span>
<span>
{{
endInfo
.
liveTime
}}
</span>
<span>
{{
status
==
2
?
endInfo
.
liveTime
:
'00:00:00'
}}
</span>
</p>
</p>
<div
class=
"data"
>
<div
class=
"data"
>
<div>
<div>
<p>
{{
endInfo
.
watchNum
}}
</p>
<p>
{{
status
==
2
?
endInfo
.
watchNum
:
0
}}
</p>
<p>
观看
</p>
<p>
观看
</p>
</div>
</div>
<div>
<div>
<p>
{{
endInfo
.
guestBookNum
}}
</p>
<p>
{{
status
==
2
?
endInfo
.
guestBookNum
:
0
}}
</p>
<p>
评论
</p>
<p>
评论
</p>
</div>
</div>
<div>
<div>
<p>
{{
endInfo
.
likeNum
}}
</p>
<p>
{{
status
==
2
?
endInfo
.
likeNum
:
0
}}
</p>
<p>
赞
</p>
<p>
赞
</p>
</div>
</div>
</div>
</div>
...
...
src/components/livedModel/livedposterDia.vue
View file @
b909156b
...
@@ -116,6 +116,18 @@ export default {
...
@@ -116,6 +116,18 @@ export default {
ctx
.
fillRect
(
0
,
330
*
bili
,
310
*
bili
,
40
*
bili
);
ctx
.
fillRect
(
0
,
330
*
bili
,
310
*
bili
,
40
*
bili
);
if
(
this
.
info
.
livedStatus
==
0
){
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/1a33da04-8224-4980-9299-a4a8e32be678.png'
,
path
=>
{
ctx
.
drawImage
(
path
,
160
*
bili
,
340
*
bili
,
20
*
bili
,
20
*
bili
);
ctx
.
save
()
ctx
.
setTextAlign
(
"left"
);
ctx
.
setFillStyle
(
"#3F2F00"
);
ctx
.
setFontSize
(
14
);
ctx
.
fillText
(
this
.
info
.
livedTime
,
188
*
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/1eaa8c87-e20a-4b5b-8c21-596dac8fa093.png'
,
path
=>
{
ctx
.
drawImage
(
path
,
20
*
bili
,
340
*
bili
,
26
*
bili
,
20
*
bili
);
ctx
.
drawImage
(
path
,
20
*
bili
,
340
*
bili
,
26
*
bili
,
20
*
bili
);
ctx
.
save
()
ctx
.
save
()
...
@@ -124,18 +136,13 @@ export default {
...
@@ -124,18 +136,13 @@ export default {
ctx
.
setFontSize
(
14
);
ctx
.
setFontSize
(
14
);
ctx
.
fillText
(
this
.
info
.
livedStatus
==
1
?
'直播中'
:
'直播预告'
,
52
*
bili
,
355
*
bili
);
ctx
.
fillText
(
this
.
info
.
livedStatus
==
1
?
'直播中'
:
'直播预告'
,
52
*
bili
,
355
*
bili
);
if
(
this
.
info
.
livedStatus
==
0
){
this
.
saveThe
(
'https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/public/png/1a33da04-8224-4980-9299-a4a8e32be678.png'
,
path
=>
{
ctx
.
drawImage
(
path
,
160
*
bili
,
340
*
bili
,
20
*
bili
,
20
*
bili
);
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
,
188
*
bili
,
355
*
bili
);
ctx
.
fillText
(
this
.
info
.
livedTime
,
188
*
bili
,
355
*
bili
);
})
}
})
})
...
...
src/components/livedModel/notStarted.vue
View file @
b909156b
...
@@ -45,10 +45,36 @@ export default {
...
@@ -45,10 +45,36 @@ export default {
methods
:
{
methods
:
{
// 开播提醒
// 开播提醒
remind
()
{
remind
()
{
let
_this
=
this
;
let
_this
=
this
;
console
.
log
(
"点击开播,'------------34"
);
wx
.
getSetting
({
withSubscriptions
:
true
,
success
(
res
)
{
console
.
log
(
res
.
subscriptionsSetting
,
'subscriptionsSetting'
)
if
(
!
res
.
subscriptionsSetting
.
mainSwitch
){
wx
.
showModal
({
content
:
'检测到您没打开订阅消息的权限,是否去设置打开?'
,
confirmText
:
'确认'
,
confirmColor
:
'#07c160'
,
success
:
(
res2
)
=>
{
if
(
res2
.
confirm
)
{
wx
.
openSetting
({
withSubscriptions
:
true
,
success
(
res1
)
{
console
.
log
(
res1
.
authSetting
,
'authSetting'
)
}
})
}
}
})
}
else
{
try
{
try
{
const
subscribeMessageObj
=
this
.
$store
.
state
.
subscribeMessageObj
;
const
subscribeMessageObj
=
_
this
.
$store
.
state
.
subscribeMessageObj
;
if
(
if
(
subscribeMessageObj
&&
subscribeMessageObj
&&
Object
.
keys
(
subscribeMessageObj
).
length
>
0
Object
.
keys
(
subscribeMessageObj
).
length
>
0
...
@@ -84,7 +110,7 @@ export default {
...
@@ -84,7 +110,7 @@ export default {
console
.
log
(
"message fail response: "
,
res
);
console
.
log
(
"message fail response: "
,
res
);
wx
.
showToast
({
wx
.
showToast
({
title
:
res
,
title
:
'订阅失败,是否授权或者网络错误'
,
icon
:
"none"
icon
:
"none"
});
});
}
}
...
@@ -92,18 +118,23 @@ export default {
...
@@ -92,18 +118,23 @@ export default {
}
}
}
else
{
}
else
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'订阅失败
'
,
title
:
'订阅失败,是否授权或者网络错误
'
,
icon
:
"none"
icon
:
"none"
});
});
console
.
log
(
'开播失败'
)
console
.
log
(
'开播失败'
)
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'订阅失败
'
,
title
:
'订阅失败,是否授权或者网络错误
'
,
icon
:
"none"
icon
:
"none"
});
});
console
.
error
(
"subscribeMessage-err"
,
err
);
console
.
error
(
"subscribeMessage-err"
,
err
);
}
}
}
}
})
},
},
// 是否登录
// 是否登录
isLogin
()
{
isLogin
()
{
...
...
src/components/setting/index.vue
View file @
b909156b
...
@@ -221,31 +221,32 @@ export default {
...
@@ -221,31 +221,32 @@ export default {
},
},
//开始直播
//开始直播
startLive
(){
startLive
(){
//判断网络环境
wx
.
getNetworkType
({
success
:
(
res
)
=>
{
if
(
res
.
errMsg
==
'getNetworkType:ok'
){
if
(
res
.
networkType
!=
'wifi'
){
wx
.
showModal
({
title
:
'流量提醒'
,
content
:
'你目前处于非WIFI环境,是否继续'
,
confirmText
:
'继续'
,
confirmColor
:
'#07c160'
,
success
:
(
res1
)
=>
{
if
(
res1
.
confirm
)
{
this
.
$emit
(
'setBeautyStart'
,
'start'
)
console
.
log
(
'用户点击确定'
)
}
else
if
(
res1
.
cancel
)
{
// console.log('用户点击取消')
}
}
})
}
else
{
this
.
$emit
(
'setBeautyStart'
,
'start'
)
this
.
$emit
(
'setBeautyStart'
,
'start'
)
}
//判断网络环境
}
// wx.getNetworkType({
}
// success : (res) => {
})
// if(res.errMsg == 'getNetworkType:ok'){
// if(res.networkType != 'wifi'){
// wx.showModal({
// title: '流量提醒',
// content: '你目前处于非WIFI环境,是否继续',
// confirmText : '继续',
// confirmColor : '#07c160',
// success : (res1) => {
// if (res1.confirm) {
// this.$emit('setBeautyStart','start')
// console.log('用户点击确定')
// } else if (res1.cancel) {
// // console.log('用户点击取消')
// }
// }
// })
// }else{
// this.$emit('setBeautyStart','start')
// }
// }
// }
// })
}
}
}
}
...
...
src/pages/live/index.vue
View file @
b909156b
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
:whiteness=
"whiteness"
:whiteness=
"whiteness"
:device-position=
"devicePosition"
:device-position=
"devicePosition"
:enable-mic=
"enableMic"
:enable-mic=
"enableMic"
:remote-mirror=
"remoteMirror"
:remote-mirror=
"mirror"
:local-mirror=
"remoteMirror"
:mirror=
"mirror"
:mirror=
"mirror"
:local-mirror=
"remoteMirror"
:waiting-image=
"liveInfo.coverUrl"
:waiting-image=
"liveInfo.coverUrl"
style=
"width: 100%; height: 100vh;position:fixed;top:0;left:0;z-index:-1"
style=
"width: 100%; height: 100vh;position:fixed;top:0;left:0;z-index:-1"
@
statechange=
"statechange"
@
statechange=
"statechange"
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
@
updateRemoteMirror=
"updateRemoteMirror"
@
updateRemoteMirror=
"updateRemoteMirror"
@
updateEnableMic=
"updateEnableMic"
@
updateEnableMic=
"updateEnableMic"
v-if=
"isSetBeauty"
v-if=
"isSetBeauty"
@
setBeautyStart=
"
startLive
"
@
setBeautyStart=
"
checkLiveEnv
"
>
>
</setting>
</setting>
<!-- 评论 -->
<!-- 评论 -->
...
@@ -160,7 +160,7 @@ export default {
...
@@ -160,7 +160,7 @@ export default {
clear
:
'HD'
,
clear
:
'HD'
,
devicePosition
:
'front'
,
//前置或者后置 back => 后置
devicePosition
:
'front'
,
//前置或者后置 back => 后置
enableMic
:
true
,
//麦克风是否开启
enableMic
:
true
,
//麦克风是否开启
remoteMirror
:
'
en
able'
,
//镜像
remoteMirror
:
'
dis
able'
,
//镜像
userInfo
:
null
,
userInfo
:
null
,
...
@@ -219,7 +219,7 @@ export default {
...
@@ -219,7 +219,7 @@ export default {
isDetailControlLock
:
true
,
isDetailControlLock
:
true
,
mirror
:
tru
e
,
mirror
:
fals
e
,
}
}
},
},
filter
(){
filter
(){
...
@@ -731,11 +731,11 @@ export default {
...
@@ -731,11 +731,11 @@ export default {
}
}
}
}
//观看
//观看
this
.
look
=
result
.
historyWatchNum
-
0
>=
10000
?
Math
.
floor
(
result
.
historyWatchNum
/
10000
)
+
"w"
:
result
.
historyWatchNum
this
.
look
=
result
.
historyWatchNum
-
0
>=
10000
?
((
result
.
historyWatchNum
-
0
)
/
10000
).
toFixed
(
1
)
+
"w"
:
result
.
historyWatchNum
//在线
//在线
this
.
online
=
result
.
watchNum
-
0
>=
10000
?
Math
.
floor
(
result
.
watchNum
/
10000
)
+
"w"
:
result
.
watchNum
this
.
online
=
result
.
watchNum
-
0
>=
10000
?
((
result
.
watchNum
-
0
)
/
10000
).
toFixed
(
1
)
+
"w"
:
result
.
watchNum
//点赞
//点赞
this
.
praise
=
result
.
likeInfo
.
likeNum
-
0
>=
10000
?
Math
.
floor
(
result
.
likeInfo
.
likeNum
/
10000
)
+
"w"
:
result
.
likeInfo
.
likeNum
this
.
praise
=
result
.
likeInfo
.
likeNum
-
0
>=
10000
?
((
result
.
likeInfo
.
likeNum
-
0
)
/
10000
).
toFixed
(
1
)
+
"w"
:
result
.
likeInfo
.
likeNum
//评论
//评论
result
.
guestBookList
.
forEach
(
item
=>
{
result
.
guestBookList
.
forEach
(
item
=>
{
this
.
commentsList
.
push
(
item
)
this
.
commentsList
.
push
(
item
)
...
...
src/pages/liveOver/index.vue
View file @
b909156b
...
@@ -95,10 +95,17 @@ export default {
...
@@ -95,10 +95,17 @@ export default {
}).
then
(
res
=>
{
}).
then
(
res
=>
{
// console.log(res.data.code == 200)
// console.log(res.data.code == 200)
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
let
result
=
res
.
data
.
data
// console.log(res.data.data)
// console.log(res.data.data)
res
.
data
.
data
.
coverUrl
=
DFSImg
(
res
.
data
.
data
.
coverUrl
)
res
.
data
.
data
.
coverUrl
=
DFSImg
(
res
.
data
.
data
.
coverUrl
)
this
.
overInfo
=
res
.
data
.
data
result
.
watchNum
=
result
.
watchNum
-
0
>
10000
?
((
result
.
watchNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
watchNum
result
.
goodsClickNum
=
result
.
goodsClickNum
-
0
>
10000
?
((
result
.
goodsClickNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
goodsClickNum
result
.
shareNum
=
result
.
shareNum
-
0
>
10000
?
((
result
.
shareNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
shareNum
result
.
guestBookNum
=
result
.
guestBookNum
-
0
>
10000
?
((
result
.
guestBookNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
guestBookNum
result
.
likeNum
=
result
.
likeNum
-
0
>
10000
?
((
result
.
likeNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
likeNum
this
.
overInfo
=
result
console
.
log
(
this
.
overInfo
)
console
.
log
(
this
.
overInfo
)
}
}
...
...
src/pages/lived/index.vue
View file @
b909156b
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
></livedIsEnded>
></livedIsEnded>
<!-- 控件层 -->
<!-- 控件层 -->
<livedControls
<livedControls
v-if=
"liveNoticeInfo&&liveNoticeInfo.liveBroadcastState!=2"
v-if=
"liveNoticeInfo&&liveNoticeInfo.liveBroadcastState!=2
&&liveNoticeInfo.liveBroadcastState!=4
"
:info=
"liveNoticeInfo"
:info=
"liveNoticeInfo"
:entryNoticeText=
"entryNoticeText"
:entryNoticeText=
"entryNoticeText"
:guestBookList=
"guestBookList"
:guestBookList=
"guestBookList"
...
@@ -129,7 +129,8 @@ export default {
...
@@ -129,7 +129,8 @@ export default {
isTimeFirstReq
:
true
,
//第一次数据请求
isTimeFirstReq
:
true
,
//第一次数据请求
newCommentsTime
:
0
,
newCommentsTime
:
0
,
userActivebeginTime
:
0
userActivebeginTime
:
0
,
videoContext
:
null
,
};
};
},
},
components
:
{
components
:
{
...
@@ -140,6 +141,11 @@ export default {
...
@@ -140,6 +141,11 @@ export default {
},
},
computed
:
{},
computed
:
{},
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
this
.
videoContext
){
this
.
videoContext
.
resume
()
this
.
videoContext
.
play
()
}
console
.
log
(
"onLoad"
,
options
);
console
.
log
(
"onLoad"
,
options
);
this
.
isTimeLock
=
true
;
this
.
isTimeLock
=
true
;
this
.
isTimeFirstReq
=
true
;
this
.
isTimeFirstReq
=
true
;
...
@@ -168,7 +174,9 @@ export default {
...
@@ -168,7 +174,9 @@ export default {
}
}
});
});
if
(
options
.
params
){
if
(
options
.
params
){
this
.
params
=
JSON
.
parse
(
options
.
params
);
this
.
params
=
JSON
.
parse
(
options
.
params
);
console
.
log
(
this
.
params
,
"-----------------133"
);
console
.
log
(
this
.
params
,
"-----------------133"
);
this
.
$store
.
commit
(
"setOfflineShopCode"
,
this
.
params
.
offlineShopCode
);
this
.
$store
.
commit
(
"setOfflineShopCode"
,
this
.
params
.
offlineShopCode
);
this
.
liveId
=
this
.
params
.
liveId
;
this
.
liveId
=
this
.
params
.
liveId
;
...
@@ -271,6 +279,11 @@ export default {
...
@@ -271,6 +279,11 @@ export default {
this
.
userEntry
(
"OUT"
);
this
.
userEntry
(
"OUT"
);
},
},
onShow
()
{
onShow
()
{
if
(
this
.
videoContext
){
this
.
videoContext
.
resume
()
this
.
videoContext
.
play
()
}
console
.
log
(
"onShow"
);
console
.
log
(
"onShow"
);
this
.
userEntry
(
"IN"
);
this
.
userEntry
(
"IN"
);
this
.
isLogin
()
this
.
isLogin
()
...
@@ -279,8 +292,8 @@ export default {
...
@@ -279,8 +292,8 @@ export default {
this
.
liveNoticeInfo
.
liveBroadcastState
=
-
1
;
this
.
liveNoticeInfo
.
liveBroadcastState
=
-
1
;
this
.
liveNoticeInfo
=
{};
this
.
liveNoticeInfo
=
{};
this
.
liveNoticeInfo
.
boStreamRTMP
=
""
;
this
.
liveNoticeInfo
.
boStreamRTMP
=
""
;
let
videoContext
=
wx
.
createLivePlayerContext
(
"liveDemo"
);
this
.
videoContext
=
wx
.
createLivePlayerContext
(
"liveDemo"
);
videoContext
.
stop
();
this
.
videoContext
.
stop
();
this
.
userEntry
(
"OUT"
);
this
.
userEntry
(
"OUT"
);
this
.
firstComing
=
true
;
this
.
firstComing
=
true
;
if
(
this
.
infoTiming
)
{
if
(
this
.
infoTiming
)
{
...
@@ -355,6 +368,7 @@ export default {
...
@@ -355,6 +368,7 @@ export default {
});
});
},
},
back
()
{
back
()
{
console
.
log
(
this
.
backPath
,
'this.backPath'
)
let
query
=
{
let
query
=
{
sessionid
:
wx
.
getStorageSync
(
"sessionid"
)
||
""
sessionid
:
wx
.
getStorageSync
(
"sessionid"
)
||
""
};
};
...
@@ -514,7 +528,7 @@ export default {
...
@@ -514,7 +528,7 @@ export default {
// 直播中且接口直播中---主要操作
// 直播中且接口直播中---主要操作
// 数据初始化
// 数据初始化
this
.
entryNoticeText
=
""
;
this
.
entryNoticeText
=
""
;
this
.
liveNoticeInfo
.
historyWatchNum
=
resData
.
historyWatchNum
;
//观看人数
this
.
liveNoticeInfo
.
historyWatchNum
=
resData
.
historyWatchNum
-
0
>=
10000
?
((
resData
.
historyWatchNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
resData
.
historyWatchNum
;
//观看人数
if
(
resData
.
entryNoticeList
.
length
>
0
)
{
if
(
resData
.
entryNoticeList
.
length
>
0
)
{
if
(
resData
.
entryNoticeList
.
length
==
1
)
{
if
(
resData
.
entryNoticeList
.
length
==
1
)
{
this
.
entryNoticeText
=
`
${
resData
.
entryNoticeList
[
0
].
userName
}
`
;
//用户进入
this
.
entryNoticeText
=
`
${
resData
.
entryNoticeList
[
0
].
userName
}
`
;
//用户进入
...
@@ -564,7 +578,11 @@ export default {
...
@@ -564,7 +578,11 @@ export default {
};
};
live
.
getLiveStatisticsById
(
query
).
then
(
res
=>
{
live
.
getLiveStatisticsById
(
query
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
endInfo
=
res
.
data
.
data
;
let
result
=
res
.
data
.
data
result
.
watchNum
=
result
.
watchNum
-
0
>
10000
?
((
result
.
watchNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
watchNum
result
.
guestBookNum
=
result
.
guestBookNum
-
0
>
10000
?
((
result
.
guestBookNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
guestBookNum
result
.
likeNum
=
result
.
likeNum
-
0
>
10000
?
((
result
.
likeNum
-
0
)
/
10000
).
toFixed
(
1
)
+
'w'
:
result
.
likeNum
this
.
endInfo
=
result
;
}
}
});
});
},
},
...
...
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