Commit 56f4e2f0 by 张卓

文章转发埋点,调到分享成功方法

parent 7afedc4a
...@@ -401,25 +401,6 @@ export default { ...@@ -401,25 +401,6 @@ export default {
this.shareOrderSn = res.target.data[len].orderSn; this.shareOrderSn = res.target.data[len].orderSn;
this.shareTid = res.target.data[len].shareTid; this.shareTid = res.target.data[len].shareTid;
this.newWindowHref = res.target.data[len].shareImgUrl;// + '&fromVisitorOpenId=' + wx.getStorageSync("openid") 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); console.log("分享信息:", this.shareLogoUrl, this.shareShopName,1111111,this.newWindowHref);
}, },
//加载成功 //加载成功
...@@ -495,7 +476,25 @@ export default { ...@@ -495,7 +476,25 @@ export default {
this.shareUrl = url ; 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(this.shareUrl, "index12");
console.log(`/pages/index/main?share=${encodeURIComponent(this.shareUrl)}`, '测试直播分享相关') console.log(`/pages/index/main?share=${encodeURIComponent(this.shareUrl)}`, '测试直播分享相关')
return { return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment