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
de9500aa
Commit
de9500aa
authored
Apr 22, 2020
by
程默
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product_dev' of
http://code.mayi888.com/chengmo/mayi-mp-shop
into product_dev
parents
837fb3cb
905a5786
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
440 additions
and
66 deletions
+440
-66
src/api/liveing.js
+13
-0
src/components/livedModel/liveReplay.vue
+16
-0
src/components/livedModel/livedControls.vue
+8
-2
src/components/livedModel/livedExplainingCommodities.vue
+6
-3
src/components/livedModel/livedGoodsDia.vue
+1
-1
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/index/index.vue
+1
-1
src/pages/live/index.vue
+19
-8
src/pages/liveList/index.vue
+256
-4
src/pages/liveOver/index.vue
+8
-1
src/pages/lived/index.vue
+33
-6
static/images/chuangjian.png
+0
-0
No files found.
src/api/liveing.js
View file @
de9500aa
...
@@ -36,5 +36,17 @@ export default {
...
@@ -36,5 +36,17 @@ export default {
//获取服务器时间戳
//获取服务器时间戳
queryServerTimeNow
(){
queryServerTimeNow
(){
return
requestGET
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getServerTimeNow`
)
return
requestGET
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getServerTimeNow`
)
},
// 根据号码查询主播创建直播权限状态
queryLivePermissions
(
options
){
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveAnchor/getAuthorityByPhone`
,
options
)
},
//申请直播权限
applyAuthority
(
options
){
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveAnchor/applyAuthority`
,
options
)
},
// 添加申请主播结果通知订阅消息
addLiveResultMsg
(
options
){
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/broadcastReminderRecord/addLiveAnchorByCustomer`
,
options
)
}
}
}
}
\ No newline at end of file
src/components/livedModel/liveReplay.vue
0 → 100644
View file @
de9500aa
<
template
>
<div
class=
"replay"
>
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
\ No newline at end of file
src/components/livedModel/livedControls.vue
View file @
de9500aa
...
@@ -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
);
},
},
// 点击发送留言
// 点击发送留言
...
@@ -442,6 +447,7 @@ export default {
...
@@ -442,6 +447,7 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
bottom
:
0
;
bottom
:
0
;
right
:
-30px
;
right
:
-30px
;
pointer-events
:
none
;
.img
{
.img
{
position
:
absolute
;
position
:
absolute
;
bottom
:
0
;
bottom
:
0
;
...
@@ -500,7 +506,7 @@ export default {
...
@@ -500,7 +506,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 @
de9500aa
...
@@ -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
{
...
@@ -51,6 +51,9 @@ export default {
...
@@ -51,6 +51,9 @@ export default {
watch
:
{
watch
:
{
updateGoods
()
{
updateGoods
()
{
console
.
log
(
this
.
goodsList
,
'---------------------------------46goodsList'
)
console
.
log
(
this
.
goodsList
,
'---------------------------------46goodsList'
)
this
.
goodsList
.
forEach
((
item
,
index
)
=>
{
this
.
$set
(
this
.
goodsList
[
index
],
'minPrice'
,
Number
(
item
.
minPrice
).
toFixed
(
2
))
})
console
.
log
(
this
.
firstCom
,
'this.firstCom----------'
)
console
.
log
(
this
.
firstCom
,
'this.firstCom----------'
)
if
(
this
.
firstCom
==
true
)
{
if
(
this
.
firstCom
==
true
)
{
this
.
list
=
[];
this
.
list
=
[];
...
@@ -269,7 +272,7 @@ img {
...
@@ -269,7 +272,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/livedGoodsDia.vue
View file @
de9500aa
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
updateGoods
(){
updateGoods
(){
this
.
list
=
this
.
goodsList
;
this
.
list
=
this
.
goodsList
;
this
.
list
.
forEach
((
item
,
index
)
=>
{
this
.
list
.
forEach
((
item
,
index
)
=>
{
item
.
minPrice
=
Number
(
item
.
minPrice
);
item
.
minPrice
=
Number
(
item
.
minPrice
)
.
toFixed
(
2
)
;
});
});
},
},
},
},
...
...
src/components/livedModel/livedIsEnded.vue
View file @
de9500aa
...
@@ -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 @
de9500aa
...
@@ -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 @
de9500aa
...
@@ -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 @
de9500aa
...
@@ -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/index/index.vue
View file @
de9500aa
...
@@ -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=
${
midNum
}
&spokesmanRelId=
${
midNum
+
1
}
&userId=
${
querys
[
midNum
+
2
]}
`
params
+=
`&spokesmanGroupId=
${
querys
[
midNum
-
1
]}
&spokesmanShopId=
${
querys
[
midNum
]}
&spokesmanRelId=
${
query
[
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/live/index.vue
View file @
de9500aa
...
@@ -11,14 +11,15 @@
...
@@ -11,14 +11,15 @@
: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"
@
error=
"binderror"
@
error=
"binderror"
@
netstatus=
"bindnetstatus"
@
netstatus=
"bindnetstatus"
v-if=
"refreshLive"
/>
/>
<image
class=
"bg-img"
v-if=
"isBgImg"
:src=
"liveInfo.coverUrl"
mode=
"aspectFill"
alt=
""
></image>
<image
class=
"bg-img"
v-if=
"isBgImg"
:src=
"liveInfo.coverUrl"
mode=
"aspectFill"
alt=
""
></image>
<div
class=
"content"
:style=
"
{'padding-top':navHeight +'px'}">
<div
class=
"content"
:style=
"
{'padding-top':navHeight +'px'}">
...
@@ -115,7 +116,7 @@
...
@@ -115,7 +116,7 @@
@
updateRemoteMirror=
"updateRemoteMirror"
@
updateRemoteMirror=
"updateRemoteMirror"
@
updateEnableMic=
"updateEnableMic"
@
updateEnableMic=
"updateEnableMic"
v-if=
"isSetBeauty"
v-if=
"isSetBeauty"
@
setBeautyStart=
"
startLive
"
@
setBeautyStart=
"
checkLiveEnv
"
>
>
</setting>
</setting>
<!-- 评论 -->
<!-- 评论 -->
...
@@ -220,6 +221,10 @@ export default {
...
@@ -220,6 +221,10 @@ export default {
isDetailControlLock
:
true
,
isDetailControlLock
:
true
,
mirror
:
true
,
mirror
:
true
,
refreshLive
:
true
}
}
},
},
filter
(){
filter
(){
...
@@ -282,6 +287,7 @@ export default {
...
@@ -282,6 +287,7 @@ export default {
this
.
isTimeFirstReq
=
true
;
this
.
isTimeFirstReq
=
true
;
this
.
overOrStop
=
1
;
this
.
overOrStop
=
1
;
this
.
isDetailLock
=
true
;
this
.
isDetailLock
=
true
;
this
.
refreshLive
=
true
;
this
.
online
=
0
//在线
this
.
online
=
0
//在线
this
.
look
=
0
//观看
this
.
look
=
0
//观看
...
@@ -350,7 +356,12 @@ export default {
...
@@ -350,7 +356,12 @@ export default {
if
(
type
==
'record'
){
if
(
type
==
'record'
){
if
(
!
res
.
authSetting
[
"scope.record"
])
{
if
(
!
res
.
authSetting
[
"scope.record"
])
{
this
.
refreshLive
=
false
;
this
.
openConfirm
(
type
);
this
.
openConfirm
(
type
);
}
else
{
this
.
refreshLive
=
true
;
this
.
pusher
=
wx
.
createLivePusherContext
(
'pusher'
);
this
.
pusher
.
startPreview
()
}
}
}
else
if
(
type
==
'camera'
){
}
else
if
(
type
==
'camera'
){
if
(
!
res
.
authSetting
[
"scope.camera"
])
{
if
(
!
res
.
authSetting
[
"scope.camera"
])
{
...
@@ -731,11 +742,11 @@ export default {
...
@@ -731,11 +742,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
)
...
@@ -1076,13 +1087,13 @@ export default {
...
@@ -1076,13 +1087,13 @@ export default {
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
width
:
39px
;
width
:
39px
;
height
:
1
2
px
;
height
:
1
6
px
;
color
:
white
;
color
:
white
;
background-color
:
#FF4240
;
background-color
:
#FF4240
;
border-bottom-right-radius
:
2px
;
border-bottom-right-radius
:
2px
;
font-size
:
11px
;
font-size
:
11px
;
text-align
:
center
;
text-align
:
center
;
line-height
:
1
2
px
;
line-height
:
1
6
px
;
}
}
.item-top
{
.item-top
{
height
:
78px
;
height
:
78px
;
...
...
src/pages/liveList/index.vue
View file @
de9500aa
...
@@ -48,6 +48,11 @@
...
@@ -48,6 +48,11 @@
</div>
</div>
<div
class=
"live-time"
>
开播时间:
{{
item
.
startTime
}}
</div>
<div
class=
"live-time"
>
开播时间:
{{
item
.
startTime
}}
</div>
</div>
</div>
<div
class=
"create-live"
v-if=
"liveList.length"
@
click=
"createLive"
>
<img
src=
"../../../static/images/chuangjian.png"
alt=
""
>
<span>
创建直播计划
</span>
</div>
</div>
</div>
<!-- 未登陆 -->
<!-- 未登陆 -->
...
@@ -63,6 +68,10 @@
...
@@ -63,6 +68,10 @@
暂无直播
暂无直播
</div>
</div>
<div
class=
"to-create-live"
v-if=
"!liveList.length && isLogin"
@
click=
"createLive"
>
创建直播计划
</div>
<!-- 绑定手机号 -->
<!-- 绑定手机号 -->
<div
class=
"toCLogin1"
v-if=
"isShowPhone"
>
<div
class=
"toCLogin1"
v-if=
"isShowPhone"
>
<div
class=
"btn_info1"
>
<div
class=
"btn_info1"
>
...
@@ -80,8 +89,9 @@
...
@@ -80,8 +89,9 @@
import
{
getNavbarInfo
,
DFSImg
}
from
'../../utils/common.js'
import
{
getNavbarInfo
,
DFSImg
}
from
'../../utils/common.js'
import
{
wx_decode
}
from
"@/utils/wxIndex.js"
;
import
{
wx_decode
}
from
"@/utils/wxIndex.js"
;
import
login
from
"@/api/login"
;
import
login
from
"@/api/login"
;
import
indexApi
from
'@/api/liveing'
import
liveApi
from
'@/api/liveing'
import
liveApi
from
'@/api/liveing'
import
livedApi
from
'@/api/live'
import
shop
from
"@/api/shop"
;
export
default
{
export
default
{
data
(){
data
(){
return
{
return
{
...
@@ -106,6 +116,8 @@ export default {
...
@@ -106,6 +116,8 @@ export default {
shopId
:
process
.
env
.
SHOP_MIXID
,
shopId
:
process
.
env
.
SHOP_MIXID
,
baseUrl
:
process
.
env
.
BASE_URL
,
baseUrl
:
process
.
env
.
BASE_URL
,
}
}
},
},
created
(){
created
(){
...
@@ -119,6 +131,9 @@ export default {
...
@@ -119,6 +131,9 @@ export default {
},
},
onShow
(){
onShow
(){
this
.
getMsgConfig
();
wx
.
setKeepScreenOn
({
wx
.
setKeepScreenOn
({
keepScreenOn
:
false
keepScreenOn
:
false
})
})
...
@@ -288,7 +303,9 @@ export default {
...
@@ -288,7 +303,9 @@ export default {
e
.
mp
.
detail
.
iv
e
.
mp
.
detail
.
iv
);
);
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
this
.
$store
.
commit
(
'setUserInfo'
,
this
.
userInfo
)
this
.
$store
.
commit
(
'setUserInfo'
,
this
.
userInfo
)
this
.
savePhone
();
console
.
log
(
this
.
userInfo
)
console
.
log
(
this
.
userInfo
)
//是会员 直接登录
//是会员 直接登录
...
@@ -307,6 +324,7 @@ export default {
...
@@ -307,6 +324,7 @@ export default {
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
this
.
$store
.
commit
(
'setUserInfo'
,
this
.
userInfo
)
this
.
$store
.
commit
(
'setUserInfo'
,
this
.
userInfo
)
this
.
savePhone
();
if
(
this
.
unionId
)
{
if
(
this
.
unionId
)
{
...
@@ -413,6 +431,7 @@ export default {
...
@@ -413,6 +431,7 @@ export default {
this
.
$store
.
commit
(
'setLoginStatus'
,
1
)
this
.
$store
.
commit
(
'setLoginStatus'
,
1
)
console
.
log
(
'getOpenid2'
,
getOpenid
)
console
.
log
(
'getOpenid2'
,
getOpenid
)
this
.
isLogin
=
true
this
.
isLogin
=
true
this
.
savePhone
();
this
.
getLiveList
();
//获取直播计划列表
this
.
getLiveList
();
//获取直播计划列表
}
}
},
},
...
@@ -421,7 +440,7 @@ export default {
...
@@ -421,7 +440,7 @@ export default {
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
index
Api
.
queryLiveList
().
then
(
res
=>
{
live
Api
.
queryLiveList
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
"200"
){
if
(
res
.
data
.
code
==
"200"
){
wx
.
hideLoading
()
wx
.
hideLoading
()
...
@@ -446,6 +465,212 @@ export default {
...
@@ -446,6 +465,212 @@ export default {
wx
.
hideLoading
()
wx
.
hideLoading
()
})
})
},
},
createLive
(){
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
liveApi
.
queryLivePermissions
({
anchorPhone
:
wx
.
getStorageSync
(
"phoneNumber"
)}).
then
(
res
=>
{
//0,null : 未提交申请 1.审核中 2.审核通过 3.审核失败
let
result
=
res
.
data
.
data
wx
.
hideLoading
()
if
(
res
.
data
.
code
==
'200'
){
if
(
result
==
0
||
result
==
null
){
wx
.
showModal
({
title
:
''
,
content
:
'您还没有直播权限'
,
confirmColor
:
'#07c160'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
this
.
applyLive
();
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
}
}
})
}
else
if
(
result
==
1
){
wx
.
showModal
({
title
:
''
,
content
:
'权限审核中'
,
confirmColor
:
'#07c160'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
}
}
})
}
else
if
(
result
==
2
){
let
backPath
=
`/createLive`
;
let
query
=
{
sessionid
:
wx
.
getStorageSync
(
'sessionid'
)
||
''
,
}
wx
.
reLaunch
({
url
:
`../index/main?from=liveList&backpath=
${
backPath
}
¶ms=
${
JSON
.
stringify
(
query
)}
`
});
}
else
if
(
result
==
3
){
wx
.
showModal
({
title
:
''
,
content
:
'抱歉,您的审核没有通过'
,
confirmColor
:
'#07c160'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
)
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
}
}
})
}
}
})
},
savePhone
(){
livedApi
.
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
'200'
){
wx
.
setStorage
({
key
:
"phoneNumber"
,
data
:
res
.
data
.
data
.
mobilephone
});
}
})
},
applyLive
(){
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
liveApi
.
applyAuthority
({
anchorPhone
:
wx
.
getStorageSync
(
"phoneNumber"
),
anchorName
:
JSON
.
parse
(
wx
.
getStorageSync
(
"userInfo"
)).
nickName
}).
then
(
res
=>
{
console
.
log
(
res
.
data
)
wx
.
hideLoading
()
if
(
res
.
data
.
code
==
'200'
){
if
(
res
.
data
.
data
==
'true'
){
//申请成功
this
.
subscribeMsg
();
}
else
{
//申请失败
wx
.
showToast
({
title
:
'申请失败'
,
icon
:
"none"
});
}
}
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
'申请失败'
,
icon
:
"none"
});
})
},
subscribeMsg
(){
let
_this
=
this
;
console
.
log
(
_this
.
$store
.
state
.
subscribeMessageObj
,
'subscribeMessageObj'
)
wx
.
getSetting
({
withSubscriptions
:
true
,
success
(
res
)
{
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
{
const
subscribeMessageObj
=
_this
.
$store
.
state
.
subscribeMessageObj
;
console
.
log
(
subscribeMessageObj
,
'subscribeMessageObj'
)
if
(
subscribeMessageObj
&&
Object
.
keys
(
subscribeMessageObj
).
length
>
0
)
{
// TODO 开播订阅
const
tmplIds
=
[];
for
(
var
key
in
subscribeMessageObj
)
{
// 改成开播key
if
(
key
==
"anchor_result"
)
{
tmplIds
.
push
(
subscribeMessageObj
[
key
]);
}
}
console
.
log
(
tmplIds
,
'tmplIds'
)
if
(
tmplIds
.
length
>
0
)
{
wx
.
requestSubscribeMessage
({
tmplIds
:
tmplIds
,
success
:(
res
)
=>
{
if
(
res
[
tmplIds
[
0
]]
==
"accept"
){
wx
.
showToast
({
title
:
"您已成功订阅~"
,
icon
:
"success"
});
let
query
=
{
anchorPhone
:
wx
.
getStorageSync
(
"phoneNumber"
),
openId
:
wx
.
getStorageSync
(
"openid"
),
subMessageTemplateId
:
tmplIds
[
0
],
};
liveApi
.
addLiveResultMsg
(
query
).
then
(
res
=>
{});
}
},
fail
(
res
)
{
console
.
log
(
'订阅失败3'
)
wx
.
showToast
({
title
:
'订阅失败,是否授权或者网络错误'
,
icon
:
"none"
});
}
});
}
}
else
{
console
.
log
(
'订阅失败1'
)
wx
.
showToast
({
title
:
'订阅失败,是否授权或者网络错误'
,
icon
:
"none"
});
}
}
catch
(
err
)
{
console
.
log
(
'订阅失败2'
)
wx
.
showToast
({
title
:
'订阅失败,是否授权或者网络错误'
,
icon
:
"none"
});
}
}
}
})
},
getMsgConfig
()
{
if
(
!
this
.
$store
.
state
.
subscribeMessageObj
)
{
shop
.
getWxMiniSubscribeMessageConfig
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
const
data
=
res
.
data
.
data
;
console
.
log
(
"wx mini subscribe message data: "
,
data
);
if
(
data
!=
null
)
{
const
subscribeMessageObj
=
{};
for
(
var
key
in
data
)
{
if
(
data
[
key
]
&&
data
[
key
].
template_id
)
{
subscribeMessageObj
[
key
]
=
data
[
key
].
template_id
;
}
}
this
.
$store
.
commit
(
"setSubscribeMessageObj"
,
subscribeMessageObj
);
}
}
});
}
},
},
},
onPullDownRefresh
(){
onPullDownRefresh
(){
// wx.showLoading({
// wx.showLoading({
...
@@ -476,8 +701,9 @@ export default {
...
@@ -476,8 +701,9 @@ export default {
}
}
.container1
{
.container1
{
min-height
:
100vh
;
min-height
:
100vh
;
height
:
50vh
;
//
height
:
50vh
;
padding-bottom
:
12px
;
//
margin-bottom
:
60px
;
padding-bottom
:
60px
;
background-color
:
#efefef
;
background-color
:
#efefef
;
}
}
.history-wrap
{
.history-wrap
{
...
@@ -633,6 +859,28 @@ export default {
...
@@ -633,6 +859,28 @@ export default {
color
:
#999999
;
color
:
#999999
;
}
}
}
}
.create-live
{
img{
width
:
20px
;
height
:
17px
;
margin-right
:
6px
;
}
position
:
fixed
;
bottom
:
0
;
left
:
0
;
width
:
100
%;
height
:
49px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
19px
;
color
:
white
;
background-image
:-webkit-linear-gradient
(
to
right
,
#FF877D
,
#FB566D
);
background-image
:-moz-linear-gradient
(
to
right
,
#FF877D
,
#FB566D
);
background-image
:-o-linear-gradient
(
to
right
,
#FF877D
,
#FB566D
);
background-image
:
linear-gradient
(
to
right
,
#FF877D
,
#FB566D
);
z-index
:
100
;
}
}
}
.no-login-wrap
{
.no-login-wrap
{
text-align
:
center
;
text-align
:
center
;
...
@@ -660,6 +908,10 @@ export default {
...
@@ -660,6 +908,10 @@ export default {
font-size
:
30px
;
font-size
:
30px
;
color
:
#999999
;
color
:
#999999
;
}
}
.to-create-live
{
@include
btn;
margin
:
45px
auto
0
;
}
.toCLogin1
{
.toCLogin1
{
position
:
absolute
;
position
:
absolute
;
...
...
src/pages/liveOver/index.vue
View file @
de9500aa
...
@@ -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 @
de9500aa
...
@@ -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"
...
@@ -72,6 +72,15 @@
...
@@ -72,6 +72,15 @@
@
error=
"error"
@
error=
"error"
@
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" -->
<!-- orientation="horizontal" -->
<!-- orientation="horizontal" -->
</div>
</div>
...
@@ -129,7 +138,8 @@ export default {
...
@@ -129,7 +138,8 @@ export default {
isTimeFirstReq
:
true
,
//第一次数据请求
isTimeFirstReq
:
true
,
//第一次数据请求
newCommentsTime
:
0
,
newCommentsTime
:
0
,
userActivebeginTime
:
0
userActivebeginTime
:
0
,
videoContext
:
null
,
};
};
},
},
components
:
{
components
:
{
...
@@ -140,6 +150,11 @@ export default {
...
@@ -140,6 +150,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 +183,9 @@ export default {
...
@@ -168,7 +183,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 +288,11 @@ export default {
...
@@ -271,6 +288,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 +301,8 @@ export default {
...
@@ -279,8 +301,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 +377,7 @@ export default {
...
@@ -355,6 +377,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 +537,7 @@ export default {
...
@@ -514,7 +537,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 +587,11 @@ export default {
...
@@ -564,7 +587,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
;
}
}
});
});
},
},
...
...
static/images/chuangjian.png
0 → 100644
View file @
de9500aa
854 Bytes
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