Commit 9037082c authored by zhangyanni's avatar zhangyanni

测试小程序分享

parent 85980615
......@@ -80,7 +80,7 @@
}
if(location.href.indexOf('activitydetail')>-1||location.href.indexOf('phoneRequireDetail')>-1||location.href.indexOf('projectdetails')>-1){
var scriptVal = document.getElementsByTagName("script")[0],jsSrc = document.createElement("script");
jsSrc.src = "https://res.wx.qq.com/open/js/jweixin-1.3.2.js";
jsSrc.src = "https://res.wx.qq.com/open/js/jweixin-1.6.0.js";
scriptVal.parentNode.insertBefore( jsSrc, scriptVal )
}
......
......@@ -341,16 +341,21 @@
if(isMini){
// this.dialogVisible = false;
// this.miniPopupVisible = true;
wx.miniProgram.postMessage({
data: JSON.stringify({
title: "您的好友邀请您参与"+that.detailInfo.channelTitle,
desc: that.detailInfo.channelTitle,
path: '/pages/sharepage/sharepage?shareUrl=' + JSON.stringfy({url: encodeURIComponent(document.location.href)}) //重点,share.js是小程序的页面中,从分享进入的h5的落地页
})
});
// wx.miniProgram.postMessage({
// data: JSON.stringify({
// title: "您的好友邀请您参与"+that.detailInfo.channelTitle,
// desc: that.detailInfo.channelTitle,
// path: '/pages/sharepage/sharepage?shareUrl=' + JSON.stringfy({url: encodeURIComponent(document.location.href)}) //重点,share.js是小程序的页面中,从分享进入的h5的落地页
// })
// });
// wx.miniProgram.navigateTo({
//
// url: '/pages/empty/empty?detailInfo='+JSON.stringify(that.detailInfo)
//
// })
wx.miniProgram.navigateTo({
url: '/pages/empty/empty?detailInfo='+JSON.stringify(that.detailInfo)
url: '/pages/empty/empty'
})
}else{
......
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