微擎实现自定义H5页面调用 JSSDK 分享接口,获取微信自带地图接口等
<html> <head> <title>测试 register_jssdk</title> {php echo register_jssdk(true);} <!-- 放到其他引入的 js 之前 --> </head> <body> <script> wx.ready(function () { sharedata = { title: '微信JS-SDK Demo', desc: '微信JS-SDK,帮助第三方为用户提供更优质的移动web服务', link: 'http://demo.open.weixin.qq.com/jssdk/',//本域链接 imgUrl: 'http://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRt8Qia4lv7k3M9J1SKqKCImxJCt7j9rHYicKDI45jRPBxdzdyREWnk0ia0N5TMnMfth7SdxtzMvVgXg/0',//本域链接 /* success: function(){ alert('success'); }, cancel: function(){ alert('cancel'); } */ }; wx.onMenuShareAppMessage(sharedata); wx.onMenuShareTimeline(sharedata); wx.onMenuShareQQ(sharedata); wx.onMenuShareQZone(sharedata); wx.onMenuShareWeibo(sharedata); //更多调用,查官方文档 }); </script> </body> </html>