提交 0fd245fd 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

微信中二次分享方法初始化

上级 97810411
......@@ -85,6 +85,25 @@
this.$rocNative.appInit();
//this.isWeb = this.$rocNative.isWeb;
this.shareObj.shareUrl = location.href; //微信分享链接
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
});
// 分享到朋友圈
wx.onMenuShareTimeline({
title,desc,link,imgUrl
});
});
//微信分享初始化--end
if(!this.isWeb) {
this.getPersonScore();
};
......
......@@ -170,6 +170,26 @@
this.getMainInfo();
}*/
this.shareObj.shareUrl = location.href; //微信分享链接
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
});
// 分享到朋友圈
wx.onMenuShareTimeline({
title,desc,link,imgUrl
});
});
//微信分享初始化--end
/*从app获取用户信息*/
this.getUserInfo();
const _this = this
......
......@@ -111,6 +111,25 @@
mounted() {
this.isWeb = this.$rocNative.isWeb;
this.shareObj.shareUrl = location.href; //微信分享链接
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
});
// 分享到朋友圈
wx.onMenuShareTimeline({
title,desc,link,imgUrl
});
});
//微信分享初始化--end
this.dealRightText();
},
methods: {
......
......@@ -79,6 +79,25 @@
this.$rocNative.appInit();
this.isWeb = this.$rocNative.isWeb;
this.shareObj.shareUrl = location.href; //微信分享链接
//微信分享初始化--start
this.$picaWxShare({
type: (process.env.NUXT_ENV_APP != 'prod') ? 15 : '',
authUrl: window.location.href,
},(wx)=>{
const title = wxShare.title1;
const desc = wxShare.title2;
const link = window.location.href;
const imgUrl = wxShare.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
title,desc,link,imgUrl
});
// 分享到朋友圈
wx.onMenuShareTimeline({
title,desc,link,imgUrl
});
});
//微信分享初始化--end
if(!this.isWeb) {
this.getPersonScore();
};
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册