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
56f4e2f0
Commit
56f4e2f0
authored
Jan 12, 2021
by
张卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章转发埋点,调到分享成功方法
parent
7afedc4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
src/pages/index/index.vue
+19
-20
No files found.
src/pages/index/index.vue
View file @
56f4e2f0
...
...
@@ -401,25 +401,6 @@ export default {
this
.
shareOrderSn
=
res
.
target
.
data
[
len
].
orderSn
;
this
.
shareTid
=
res
.
target
.
data
[
len
].
shareTid
;
this
.
newWindowHref
=
res
.
target
.
data
[
len
].
shareImgUrl
;
// + '&fromVisitorOpenId=' + wx.getStorageSync("openid")
if
(
this
.
newWindowHref
.
indexOf
(
'fromVisitorOpenId'
)
==-
1
)
{
this
.
newWindowHref
+=
'&fromVisitorOpenId='
+
wx
.
getStorageSync
(
"openid"
)
}
//文章详情分享埋点
if
(
this
.
newWindowHref
.
indexOf
(
'articleId'
)
!=-
1
)
{
// this.newWindowHref += ;
var
articleId
=
''
var
vars
=
this
.
newWindowHref
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
console
.
log
(
pair
,
2222
)
if
(
pair
[
0
]
==
'articleId'
)
{
articleId
=
pair
[
1
];
}
}
indexApi
.
forward
({
articleId
:
articleId
,}).
then
(
res
=>
{
})
}
console
.
log
(
"分享信息:"
,
this
.
shareLogoUrl
,
this
.
shareShopName
,
1111111
,
this
.
newWindowHref
);
},
//加载成功
...
...
@@ -495,7 +476,25 @@ export default {
this
.
shareUrl
=
url
;
}
if
(
this
.
shareUrl
.
indexOf
(
'fromVisitorOpenId'
)
==-
1
)
{
this
.
shareUrl
+=
'&fromVisitorOpenId='
+
wx
.
getStorageSync
(
"openid"
)
}
//文章详情分享埋点
if
(
this
.
shareUrl
.
indexOf
(
'articleId'
)
!=-
1
)
{
// this.shareUrl += ;
var
articleId
=
''
var
vars
=
this
.
shareUrl
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
console
.
log
(
pair
,
2222
)
if
(
pair
[
0
]
==
'articleId'
)
{
articleId
=
pair
[
1
];
}
}
indexApi
.
forward
({
articleId
:
articleId
,}).
then
(
res
=>
{
})
}
console
.
log
(
this
.
shareUrl
,
"index12"
);
console
.
log
(
`/pages/index/main?share=
${
encodeURIComponent
(
this
.
shareUrl
)}
`
,
'测试直播分享相关'
)
return
{
...
...
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