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
8a2079f8
Commit
8a2079f8
authored
Mar 25, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信分享埋点
parent
55d2c52c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
src/api/live.js
+6
-1
src/components/livedModel/livedposterDia.vue
+6
-0
src/pages/lived/index.vue
+16
-7
No files found.
src/api/live.js
View file @
8a2079f8
...
@@ -63,6 +63,10 @@ export default {
...
@@ -63,6 +63,10 @@ export default {
},
},
// 获取直播配置
// 获取直播配置
getConfigValueByConfigCode
(
options
)
{
getConfigValueByConfigCode
(
options
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getConfigValueByConfigCode?configCode`
,
options
);
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/getConfigValueByConfigCode`
,
options
);
},
// 分享时记录
addShareRecord
(
options
)
{
return
requestPOST
(
`
${
process
.
env
.
OLSHOP_URL
}
/liveBroadcastInfo/addShareRecord`
,
options
);
},
},
};
};
\ No newline at end of file
src/components/livedModel/livedposterDia.vue
View file @
8a2079f8
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
live
from
"@/api/live"
;
export
default
{
export
default
{
props
:
[
"showPosterDia"
,
"posterInfo"
],
props
:
[
"showPosterDia"
,
"posterInfo"
],
name
:
""
,
name
:
""
,
...
@@ -127,6 +128,11 @@ export default {
...
@@ -127,6 +128,11 @@ export default {
});
});
},
},
getImg
()
{
getImg
()
{
let
query
=
{
liveBroadcastId
:
this
.
liveId
,
shareType
:
"HB"
};
live
.
addShareRecord
(
query
).
then
();
this
.
handleSave
();
this
.
handleSave
();
},
},
// 点击保存时,将画布生成海报
// 点击保存时,将画布生成海报
...
...
src/pages/lived/index.vue
View file @
8a2079f8
...
@@ -133,7 +133,7 @@ export default {
...
@@ -133,7 +133,7 @@ export default {
onLoad
(
options
)
{
onLoad
(
options
)
{
wx
.
setKeepScreenOn
({
wx
.
setKeepScreenOn
({
keepScreenOn
:
true
keepScreenOn
:
true
})
})
;
getNavbarInfo
(
res
=>
{
getNavbarInfo
(
res
=>
{
console
.
log
(
res
,
"--------------------125"
);
console
.
log
(
res
,
"--------------------125"
);
this
.
navTop
=
res
.
navTop
;
this
.
navTop
=
res
.
navTop
;
...
@@ -183,6 +183,11 @@ export default {
...
@@ -183,6 +183,11 @@ export default {
},
},
onShareAppMessage
(
options
)
{
onShareAppMessage
(
options
)
{
let
query
=
{
liveBroadcastId
:
this
.
liveId
,
shareType
:
"WX"
};
live
.
addShareRecord
(
query
).
then
();
let
_this
=
this
;
let
_this
=
this
;
if
(
this
.
hasInvitationStatus
==
1
)
{
if
(
this
.
hasInvitationStatus
==
1
)
{
Object
.
assign
(
this
.
params
,
this
.
params
,
this
.
spokesmanObj
);
Object
.
assign
(
this
.
params
,
this
.
params
,
this
.
spokesmanObj
);
...
@@ -371,12 +376,12 @@ export default {
...
@@ -371,12 +376,12 @@ export default {
this
.
liveNoticeInfo
.
liveBroadcastState
==
1
&&
this
.
liveNoticeInfo
.
liveBroadcastState
==
1
&&
resData
.
liveState
==
"PAUSE_LIVE"
resData
.
liveState
==
"PAUSE_LIVE"
)
{
)
{
this
.
liveNoticeInfo
.
liveBroadcastState
=
3
this
.
liveNoticeInfo
.
liveBroadcastState
=
3
;
}
else
if
(
}
else
if
(
this
.
liveNoticeInfo
.
liveBroadcastState
==
3
&&
this
.
liveNoticeInfo
.
liveBroadcastState
==
3
&&
resData
.
liveState
==
"IN_LIVE"
resData
.
liveState
==
"IN_LIVE"
)
{
)
{
this
.
liveNoticeInfo
.
liveBroadcastState
=
1
this
.
liveNoticeInfo
.
liveBroadcastState
=
1
;
}
}
this
.
guestBookList
=
resData
.
guestBookList
;
//评论列表
this
.
guestBookList
=
resData
.
guestBookList
;
//评论列表
this
.
likeInfo
=
resData
.
likeInfo
;
//点赞信息
this
.
likeInfo
=
resData
.
likeInfo
;
//点赞信息
...
@@ -388,9 +393,9 @@ export default {
...
@@ -388,9 +393,9 @@ export default {
if
(
resData
.
entryNoticeList
.
length
==
1
)
{
if
(
resData
.
entryNoticeList
.
length
==
1
)
{
this
.
entryNoticeText
=
`
${
resData
.
entryNoticeList
[
0
].
userName
}
`
;
//用户进入
this
.
entryNoticeText
=
`
${
resData
.
entryNoticeList
[
0
].
userName
}
`
;
//用户进入
}
else
{
}
else
{
this
.
entryNoticeText
=
`
${
this
.
entryNoticeText
=
`
${
resData
.
entryNoticeList
[
0
].
userName
}
等
${
resData
.
entryNoticeList
[
0
].
userName
resData
.
entryNoticeList
.
length
}
等
${
resData
.
entryNoticeList
.
length
}
人`
;
//用户进入
}
人`
;
//用户进入
}
}
}
}
this
.
updateVal
=
Math
.
random
();
//监听使用数据
this
.
updateVal
=
Math
.
random
();
//监听使用数据
...
@@ -566,7 +571,11 @@ img {
...
@@ -566,7 +571,11 @@ img {
}
}
}
}
.toShop
{
.toShop
{
background
:
linear-gradient
(
90deg
,
rgba
(
255
,
135
,
125
,
1
),
rgba
(
251
,
86
,
109
,
1
));
background
:
linear-gradient
(
90deg
,
rgba
(
255
,
135
,
125
,
1
),
rgba
(
251
,
86
,
109
,
1
)
);
padding
:
0
8px
;
padding
:
0
8px
;
color
:
#fff
;
color
:
#fff
;
font-size
:
14px
;
font-size
:
14px
;
...
...
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